@reactive-web-components/rwc 2.55.1 → 2.55.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/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@reactive-web-components/rwc",
3
- "version": "2.55.1",
3
+ "version": "2.55.2",
4
4
  "type": "module",
5
5
  "types": "./shared/index.d.ts",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./shared/index.d.ts",
9
- "import": "./reactive-web-component.Cw00-7Ku.js",
10
- "require": "./reactive-web-component.DggTNna5.umd.cjs"
9
+ "import": "./reactive-web-component.T7i2PANY.js",
10
+ "require": "./reactive-web-component.CYztSrk-.umd.cjs"
11
11
  }
12
12
  },
13
13
  "author": "tamazyanarsen",
@@ -34,6 +34,6 @@
34
34
  "ui",
35
35
  "frontend"
36
36
  ],
37
- "module": "./reactive-web-component.Cw00-7Ku.js",
38
- "main": "./reactive-web-component.DggTNna5.umd.cjs"
37
+ "module": "./reactive-web-component.T7i2PANY.js",
38
+ "main": "./reactive-web-component.CYztSrk-.umd.cjs"
39
39
  }
@@ -1,2 +1,2 @@
1
- (function(o,y){typeof exports=="object"&&typeof module<"u"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):(o=typeof globalThis<"u"?globalThis:o||self,y(o.ReactiveComponent={}))})(this,function(o){"use strict";var Ze=Object.defineProperty;var Qe=(o,y,A)=>y in o?Ze(o,y,{enumerable:!0,configurable:!0,writable:!0,value:A}):o[y]=A;var d=(o,y,A)=>Qe(o,typeof y!="symbol"?y+"":y,A);const y=t=>t&&typeof t=="object"&&("classList"in t||"attributes"in t||"customAttributes"in t||"reactiveClassList"in t||"listeners"in t||"customListeners"in t||"children"in t||"effects"in t||"style"in t||Object.keys(t).some(e=>e.startsWith(".")||e.startsWith("@")||e.startsWith("$")))&&!("hostElement"in t),A=t=>t&&typeof t=="object"&&"hostElement"in t&&"append"in t&&"set"in t&&"addStyle"in t&&"setAttribute"in t&&"addClass"in t&&"addEffect"in t&&"addReactiveContent"in t&&"setReactiveContent"in t&&"clear"in t,F=(t,e,...s)=>{e&&e.apply(t,s)};let W=!0;const m=(...t)=>{W&&console.debug(["[rwc]",...t].join(" | "),...Array.from(t.join("").matchAll(/%c/gm)).map((e,s)=>s%2===0?"color:red":"color:inherit"))},$=t=>t.replace(/([A-Z])/gm,e=>`-${e.toLowerCase()}`),X=t=>t.replace(/-(\w)/gm,(e,s)=>s.toUpperCase()),L=(t,...e)=>{if(!W)return;const s={r:"color: #ff0000",g:"color: #00ff00",b:"color: #0000ff",y:"color: #ffff00",p:"color: #800080",c:"color: #00ffff",o:"color: #ffa500",w:"color: #808080"},n=t.match(/@[rgbpycow]/g)||[],r=n.map(c=>{const l=c.slice(1);return s[l]||"color: inherit"});let i=t;n.forEach(c=>{const l=new RegExp(`\\${c}([^\\s,]+)`,"g");i=i.replace(l,"%c$1")}),console.log(i,...r,...e)},Et=()=>{W=!0},Z=()=>{W=!1};Z();const j=[];let D=!1;const yt=t=>{D=t},z=new Map,O=new WeakMap,_=[],I=[];function v(t,e){const s=new Set;let n=(e==null?void 0:e.signalCompareFn)||(()=>!0);function r(){var c;const i=_[_.length-1];if(i&&!("fake"in i&&i.fake)){const l=O.get(i),u=l==null?void 0:l.parent;if(u){const h=O.get(u);h==null||h.cleanupFns.add(()=>{l==null||l.cleanupFns.forEach(p=>p()),l==null||l.cleanupFns.clear(),s.delete(i)})}"selfCleanup"in i||(i.selfCleanup=[]),i.selfCleanup.push(()=>{s.delete(i)}),s.add(i),D&&((c=z.get(i.effectId))==null||c.signals.push(r))}return t}return r.signalId=`${(e==null?void 0:e.name)||""}_${Math.random().toString(36).substring(2,15)}`,r.getSubscribers=()=>[...s],r.setCompareFn=function(i){return n=i,r},r.clearSubscribers=function(){s.clear()},r.peek=function(){return Object.freeze(t)},r.initValue=Object.freeze(t),r.forceSet=function(i){t=i,s.forEach(c=>{setTimeout(()=>{const l=c,u=O.get(l);u&&u.cleanupFns.size>0&&(u.cleanupFns.forEach(h=>h()),u.cleanupFns.clear()),I.push(l),l(),I.pop()})})},r.set=function(i,c=n){t!==i&&c(t,i)&&r.forceSet(i)},r.update=function(i){r.set(i(t))},r.pipe=(i,c)=>{const l=v(null);return b(()=>{const u=r();b(()=>{const h=i(u);h instanceof Promise?h.then(p=>l.set(p)):w(h)?b(()=>l.set(h())):l.set(h)},c)}),l},r}function b(t,e){var i;const s=`${(e==null?void 0:e.name)||""}_${Math.random().toString(36).substring(2,15)}`;m("current effect",`%c${s}%c`),t.effectId=s;const n=I[I.length-1];D&&z.set(s,{signals:[],parent:(n==null?void 0:n.effectId)||null}),O.has(t)||O.set(t,{cleanupFns:new Set});const r=O.get(t);n?r.parent=n:delete r.parent,I.push(t),_.push(t),t(),(i=j[j.length-1])==null||i.call(j,t),_.pop(),I.pop()}const w=t=>!!t&&["object","function"].includes(typeof t)&&"set"in t&&"update"in t&&"forceSet"in t;function St(t,...e){const s=v("");return b(()=>{const n=e.map(i=>w(i)?String(i()):String(i)),r=[t[0]];n.forEach((i,c)=>{r.push(i,t[c+1])}),s.set(r.join(""))}),s}function wt(t,e){const s=v(e??null),n=r=>s.set(r);return t instanceof Promise?t.then(n):typeof t=="function"&&b(()=>{const r=t();r instanceof Promise?r.then(n):w(r)?b(()=>n(r())):n(r)}),s}function vt(t,e){let s=t(),n=e();b(()=>{const r=t(),i=e();r!==i&&(r!==s?e.set(r):i!==n&&t.set(i)),s=r,n=i})}function gt(...t){let e=t.map(n=>n());const s=v(e);return t.forEach((n,r)=>{b(()=>{const i=()=>e.filter(c=>c!==void 0).length;i()===t.length&&(e=Array.from(e).fill(void 0)),e[r]=n(),i()===t.length&&s.set([...e])})}),s}const At=(...t)=>{const e=v([]);return b(()=>{e.set(t.map(s=>s()))}),e};class R extends HTMLElement{constructor(s=!1){super();d(this,"isSlotLazyLoading",!1);d(this,"slotTemplate");d(this,"slotContext");d(this,"rootStyle");d(this,"modelValue");d(this,"providers");d(this,"appendAllSlotContent");d(this,"allSlotContent",[]);d(this,"slotContent",{});d(this,"htmlSlotContent",{});d(this,"shadow");d(this,"injects",{});this.shadow=this.attachShadow({mode:s?"closed":"open"})}appendChild(s,n=!0){var r;if(this.isSlotLazyLoading&&n){if(s instanceof HTMLElement){const i=s.slot||"default";this.htmlSlotContent[i]||(this.htmlSlotContent[i]=[]),(r=this.htmlSlotContent[i])==null||r.push(s)}}else return super.appendChild(s)}appendSlotContent(){var s;(s=this.appendAllSlotContent)==null||s.call(this)}inject(s){return m("%cinject%c",s),this.injects[s]||(this.injects[s]=v(null)),this.injects[s]}checkInjects(){Object.entries(this.injects).forEach(([s,n])=>{m("%cinject%c",`%c${s}%c`,"from BaseElement (dispatch event)"),this.shadow.dispatchEvent(new CustomEvent(s,{detail:{context:s,callback:r=>b(()=>{n.set(r())})},bubbles:!0,composed:!0}))})}setReactiveValue(s){this.modelValue=s}}d(R,"observedAttributes",[]),d(R,"renderTagName",""),d(R,"styles");const Lt=t=>"render"in t&&"setReactiveValue"in t,Rt="handleSlotContext",Q="onConnected",Y=t=>typeof t=="string"?t:JSON.stringify(t),Tt=t=>{const e=document.createElement("span");return e.textContent=Y(t),e},K=(t,e)=>(t.appendChild(Tt(e)),t),jt=(t,e)=>(t.innerHTML="",K(t,e)),x=t=>{const e=document.createElement("span");return b(()=>{const s=t();e.textContent=Y(s)}),e};class tt{constructor(e){d(this,"wrapper");d(this,"hostElement");d(this,"append",(...e)=>(e.forEach(s=>{this.wrapper.appendChild(s.hostElement),Q in s.hostElement&&setTimeout(()=>{var n,r;(r=(n=s.hostElement).onConnected)==null||r.call(n,s,s.hostElement)})}),this));d(this,"set",(...e)=>{this.clear();const s=document.createDocumentFragment();return e.forEach(n=>{s.appendChild(n.hostElement)}),this.wrapper.appendChild(s),this});d(this,"removeChild",(...e)=>(e.forEach(s=>{Array.from(this.wrapper.childNodes.values()).some(n=>n===s.hostElement)&&this.wrapper.removeChild(s.hostElement)}),this));d(this,"addHtmlContent",e=>(K(this.wrapper,e),this));d(this,"setHtmlContent",e=>(jt(this.wrapper,e),this));d(this,"setAttribute",(e,s)=>{let n;if(typeof s=="boolean"&&!(this.wrapper instanceof R))if(s)n="";else{this.removeAttribute(e);const r=e.toLowerCase();return r in this.wrapper&&(this.wrapper[r]=null),this}else typeof s!="string"?n=JSON.stringify(s):n=s;if(this.wrapper.setAttribute($(e),n),!(this.wrapper instanceof R)){const r=e.toLowerCase();r in this.wrapper&&(this.wrapper[r]=s)}return this});d(this,"setCustomAttribute",(e,s)=>{let n;return typeof s!="string"?n=JSON.stringify(s):n=s,this.wrapper.setAttribute($(e),n),this});d(this,"setReactiveAttribute",(e,s)=>(b(()=>this.setAttribute(e,s())),this));d(this,"setReactiveCustomAttribute",(e,s)=>(b(()=>this.setCustomAttribute(e,s())),this));d(this,"removeAttribute",e=>(this.wrapper.removeAttribute($(e)),this));d(this,"addStyle",e=>(Object.entries(e).forEach(([s,n])=>{const r=s.startsWith("--");typeof n=="function"?this.addEffect(()=>{if(r){const i=String(n()||"");this.wrapper.style.setProperty(s,i)}else this.wrapper.style[s]=n()}):typeof n=="string"&&(r?this.wrapper.style.setProperty(s,n):this.wrapper.style[s]=n)}),this));d(this,"onConnected",e=>(Reflect.defineProperty(this.wrapper,Q,{get(){return e}}),this));d(this,"addClass",(...e)=>(e.forEach(s=>{typeof s=="string"?this.wrapper.classList.add(...s.split(" ").flatMap(n=>n.split(`
2
- `)).map(n=>n.trim()).filter(Boolean)):(()=>{let n=null;this.addEffect(()=>{const r=s();r.length>0&&(n?this.replaceClass(n,r):this.addClass(r),n=r)})})()}),this));d(this,"setClass",(...e)=>(this.wrapper.classList.remove(...this.wrapper.classList),this.wrapper.classList.add(...e),this));d(this,"addReactiveClass",e=>(Object.keys(e).forEach(s=>{b(()=>{e[s]()?this.addClass(s):this.removeClass(s)})}),this));d(this,"removeClass",(...e)=>(this.wrapper.classList.remove(...e),this));d(this,"replaceClass",(e,s)=>(this.wrapper.classList.replace(e,s),this));d(this,"addEffect",e=>(b(()=>e(this,this.hostElement)),this));d(this,"addReactiveContent",e=>(this.wrapper.appendChild(x(e)),this));d(this,"setReactiveContent",e=>(this.clear(),this.wrapper.appendChild(x(e)),this));d(this,"clear",()=>(this.wrapper.innerHTML="",this));this.wrapper=e,this.hostElement=e}addEventlistener(e,s,n=!1){return this.wrapper.addEventListener(e,r=>s(r,this,this.wrapper),n),this}}class Ot extends tt{constructor(){super(...arguments);d(this,"setReactiveValue",s=>(this.wrapper instanceof R&&this.wrapper.setReactiveValue(s),this));d(this,"setSlotTemplate",s=>{const n=this.wrapper.slotTemplate;return n&&Object.entries(s).forEach(([r,i])=>{n[r]=i}),this})}}const It=()=>()=>{},et=t=>new Ot(t),st=t=>new tt(t),nt=(t,...e)=>({classList:[...t.map(s=>s.trim()).filter(Boolean),...e]}),Mt=(t,...e)=>nt(t,...e),G=(t,e)=>{if(!e)return t;const s=Object.keys(e||{}).filter(n=>n.startsWith(".")||n.startsWith("@")||n.startsWith("$"));return s.filter(n=>n.startsWith(".")).forEach(n=>{e!=null&&e.attributes||(e.attributes={}),e.attributes[n.slice(1)]=e[n]}),s.filter(n=>n.startsWith("@")).forEach(n=>{e!=null&&e.listeners||(e.listeners={});const r=n.slice(1);e.listeners[r]=e[n]}),s.filter(n=>n.startsWith("$")).forEach(n=>{e!=null&&e.effects||(e.effects=[]),e.effects.push(e[n])}),at(t,e.classList),ct(t,e.style),ht(t,e.attributes),lt(t,e.reactiveClassList),it(t,e.customAttributes),rt(t,e.children),ot(t,e.effects),N(t,e.listeners),N(t,e.customListeners),t},N=(t,e)=>{e&&Object.entries(e).forEach(([s,n])=>{typeof n=="function"&&t.addEventlistener(s,n)})},ot=(t,e)=>e==null?void 0:e.forEach(s=>t.addEffect(s)),rt=(t,e)=>k(t,...e||[]),it=(t,e)=>{const s=e;s&&Object.keys(s).forEach(n=>{w(s[n])?t.setReactiveCustomAttribute(n,s[n]):typeof s[n]=="function"?t.addEffect(()=>{t.setCustomAttribute(n,s[n]())}):t.setCustomAttribute(n,s[n])})},at=(t,e)=>t.addClass(...e||[]),lt=(t,e)=>t.addReactiveClass(e||{}),ct=(t,e)=>t.addStyle(e||{}),ht=(t,e)=>{const s=e,n=(r,i)=>{i&&(w(i)?t.setReactiveAttribute(r,i):typeof i=="function"?t.addEffect(()=>{t.setAttribute(r,i())}):t.setAttribute(r,i))};s&&Object.keys(s).forEach(r=>{n(r,s[r])})},k=(t,...e)=>(e.forEach(s=>{typeof s=="string"?s.trim().length>0&&t.addHtmlContent(s):w(s)?t.addReactiveContent(s):t.append(s)}),t),M=(t,e)=>{const s=document.createElement(t),n=st(s);return G(n,e)},B=(t,e)=>{const[s,...n]=t.split(" ").map(i=>i.trim()),r=M(s,e);return n.length>0&&r.addClass(...n),(...i)=>k(r,...i.filter(Boolean).flat().flatMap(c=>typeof c=="function"&&!w(c)?g(()=>c(r)):c))},g=t=>M("div").addStyle({display:"contents"}).addEffect(e=>{const s=t(),n=[];Array.isArray(s)?n.push(...s):n.push(s),e.clear(),k(e,...n)}),$t=(t,e,s)=>{const n=M("div").addStyle({display:"contents"}),r=new Map,i=new Map;let c=[];const l=new Set;let u=t.peek();const h=p=>{l.delete(p),r.delete(p),i.delete(p)};return b(()=>{const p=t();c=p.map(e).map(f=>typeof f=="string"?f:f.toString());const S=Array.from(n.hostElement.children);m("containerChildren",S,c),S.forEach(f=>{const E=f.dataset.key;c.includes(E)||(m("remove element",E,f),f.remove(),h(E))}),c.forEach(f=>{var P,T;const E=p[c.indexOf(f)];r.has(f)?JSON.stringify(E)!==JSON.stringify(u[c.indexOf(f)])&&((P=n.hostElement.querySelector(`[data-key="${f}"]`))==null||P.remove(),(T=r.get(f))==null||T.set(Math.random().toString(36).substring(2,15)),i.set(f,()=>s(E,c.indexOf(f),p).setCustomAttribute("data-key",f))):(m("create new element",f,E),r.set(f,v(Math.random().toString(36).substring(2,15))),i.set(f,()=>s(E,c.indexOf(f),p).setCustomAttribute("data-key",f)))}),u=[...p.map(f=>({...f}))];const C=()=>{r.forEach((f,E)=>{m("key from setTimeout foreach currItemSignalMap",E),l.has(E)||(l.add(E),b(()=>{var bt;f();const P=c.indexOf(E),T=(bt=i.get(E))==null?void 0:bt();T&&(m("call effect from setTimeout",E,T.hostElement),P<=n.hostElement.children.length-1?n.hostElement.insertBefore(T.hostElement,n.hostElement.children[P]):n.hostElement.append(T.hostElement))}))})};Promise.resolve().then(()=>C())}),n},kt=t=>{let e=[M("div")],s=!1;return b(()=>{var i,c;const n=t();s=Array.isArray(n);const r=[];r.push(...[n].flat()),r.length===0&&r.push(M("div").addStyle({display:"none"}).setAttribute("id","empty_template"));try{m("newReactiveComponent.map",r.map(l=>{var u;return m("newReactiveComponent hostElement",l.hostElement),(u=l.hostElement)==null?void 0:u.id})),m("currComponent[0].hostElement?.id",(i=e[0].hostElement)==null?void 0:i.id,e),(c=e[0].hostElement)==null||c.replaceWith(...r.map(l=>l.hostElement)),e.slice(1).forEach(l=>{var u;return(u=l.hostElement)==null?void 0:u.remove()}),e=r}catch(l){console.error(l)}}),s?e:e[0]},Ht=t=>Rt in t,Pt=t=>{const e=B("div")().addStyle({display:"contents"}),s=n=>(e.hostElement.innerHTML=n,e);return typeof t=="string"?s(t):e.addEffect(()=>{s(t())}),e},V=(t,e,s)=>t?g(e):s?g(s):B("div")().setAttribute("id","empty_div_renderIf").addStyle({display:"none"}),dt=(t,e,s)=>g(()=>V(!!t(),e,s)),Ft=(t,e,s)=>typeof t=="boolean"?V(t,e,s):dt(t,e,s),U=(t,e)=>{const s=g(e);return typeof t=="boolean"?[s].flat().forEach(n=>n.hostElement.style.display=t?"block":"none"):b(()=>{const n=t()?"block":"none";[s].flat().forEach(r=>r.hostElement.style.display=n)}),s},Wt=(t,e,s)=>{const n=[U(t,e)].flat();return s&&n.push(...[U(()=>typeof t=="boolean"?!t:!t(),s)].flat()),g(()=>n)},ft=(t,e)=>{m("createCustomElement",t);const s=document.createElement(t),n=et(s);return G(n,e)},ut=(t,e)=>{const s=t.split(" ").slice(1).map(r=>r.trim()),n=ft(t.split(" ")[0],e);return Array.isArray(s)&&s.length>0&&n.addClass(...s),(...r)=>{L("@rcreateCustomEl content",t,r);const i=r.filter(Boolean).flat().flatMap(c=>typeof c=="function"&&!w(c)?g(()=>c(n)):c);return n.hostElement.allSlotContent=i,n.hostElement.slotContent=i.filter(A).reduce((c,l)=>{const u=l.hostElement.getAttribute("slot")||"default";return c[u]||(c[u]=[]),c[u].push(l),c},{}),n.hostElement.appendAllSlotContent=()=>k(n,...i),n}},pt=(t,e,s)=>ut(`${t.renderTagName}${e&&typeof e=="string"?" "+e:""}`,y(e)?e:e&&typeof e=="string"?s:void 0),_t=()=>{const t=()=>{};return t.oldValue=null,t},Bt=()=>({}),Jt=(t,e,s)=>{const n=e?Ct(e,s)(t):t;return(r,...i)=>{const c=[...i];return r&&!y(r)&&c.unshift(r),pt(n,y(r)?r:{})(...c)}},a={};["div","span","section","input","button","table","tr","td","th","ul","li","ol","form","label","select","option","textarea","img","a","p","h1","h2","h3","h4","h5","h6","br","hr","pre","code","nav","header","footer","main","aside","article","figure","figcaption","blockquote","cite","small","strong","em","b","i","u","s","sub","sup","mark","del","ins","details","summary","progress","meter","audio","video","canvas","slot"].forEach(t=>{a[t]=(e,...s)=>{let n=[...s];return e&&!y(e)&&(n=[e].concat(n)),B(t,y(e)?e:{})(...n)}});const mt=a.div,qt=a.span,Dt=a.section,zt=a.input,Gt=a.button,Nt=a.table,Vt=a.tr,Ut=a.td,Xt=a.th,Zt=a.ul,Qt=a.li,Yt=a.ol,Kt=a.form,xt=a.label,te=a.select,ee=a.option,se=a.textarea,ne=a.img,oe=a.a,re=a.p,ie=a.h1,ae=a.h2,le=a.h3,ce=a.h4,he=a.h5,de=a.h6,fe=a.br,ue=a.hr,pe=a.pre,me=a.code,Ce=a.nav,be=a.header,Ee=a.footer,ye=a.main,Se=a.aside,we=a.article,ve=a.figure,ge=a.figcaption,Ae=a.blockquote,Le=a.cite,Re=a.small,Te=a.strong,je=a.em,Oe=a.b,Ie=a.i,Me=a.u,$e=a.s,ke=a.sub,He=a.sup,Pe=a.mark,Fe=a.del,We=a.ins,_e=a.details,Be=a.summary,Je=a.progress,qe=a.meter,De=a.audio,ze=a.video,Ge=a.canvas,Ne=a.slot,Ve=t=>e=>t(e).addClass(...e.classList??[]).addReactiveClass(e.reactiveClassList??{}),J="eventProps",q="EVENT_CONFIG",H="observedAttributes",Ue=()=>(t,e)=>{Reflect.get(t,H)||Reflect.defineProperty(t,H,{value:[]}),Reflect.get(t,H).push($(e))},Xe=t=>(e,s)=>{Reflect.get(e,J)||Reflect.defineProperty(e,J,{value:[]}),Reflect.get(e,q)||Reflect.defineProperty(e,q,{value:{}}),Reflect.get(e,q)[s]={bubbles:(t==null?void 0:t.bubbles)??!1,composed:(t==null?void 0:t.composed)??!1},Reflect.get(e,J).push(s)},Ct=(t,e=!1)=>s=>{m(t,"start register static attr",s.prototype[H]);const n=[];if(s.styles){const i=s.styles,c=[];Array.isArray(i)?c.push(...i):c.push(i),c.forEach(l=>{const u=new CSSStyleSheet;u.replaceSync(l),n.push(u);const h=new CSSStyleSheet;h.replaceSync(l.slice(l.indexOf("@property"))),document.adoptedStyleSheets.push(h)})}class r extends s{constructor(...l){m("constructor",`%c${t}%c`);super(e,...l);d(this,"effectCleanupHandleEvent",l=>{this.effects.add(l)});d(this,"effects",new Set);L("@osheet",n),n.length>0&&this.shadow.adoptedStyleSheets.push(...n)}render(){m("rwc: render from new class");let l=mt();const u=()=>{m("wrapperEffectCallback"),l=s.prototype.render.call(this)};return u.fake=!0,b(u),l}attributeChangedCallback(l,u,h){m("%cAttribute has changed.%c",`%c${l}%c`,`oldValue: ${u}, newValue: ${h}`,`%c${t}%c`);try{h=JSON.parse(h)}catch{}const p=X(l);if(p in this&&w(this[p])){const S=this[p];h===null?(S.set(S.initValue),this.removeAttribute(l)):S.set(h)}F(this,s.prototype.attributeChangedCallback,l,u,h)}connectedCallback(){var u;m("rwc: connectedCallback"),m("connectedCallback",`%c${t}%c`,this),this.providers&&Object.keys(this.providers).length>0&&(m("WRAPPER for providers",t),Object.entries(this.providers).forEach(([h,p])=>{m("register provider",h,p()),this.addEventListener(h,S=>{var f;m("send provider",h,p());const C=S;((f=C.detail)==null?void 0:f.context)===h&&(C.stopPropagation(),C.detail.callback(p))})})),this.checkInjects(),(u=s.prototype[J])==null||u.forEach(h=>{this[h]=p=>{const S=s.prototype[q][h],{bubbles:C,composed:f}=S;w(p)?b(()=>{L("@oemit reactive value",p()),this.dispatchEvent(new CustomEvent(h,{detail:p(),bubbles:C,composed:f}))}):(L("@oemit value",p),this.dispatchEvent(new CustomEvent(h,{detail:p,bubbles:C,composed:f})))}}),m("start render",`%c${t}%c`,t);const l=()=>{m("rwc: insertRenderTemplate"),j.push(this.effectCleanupHandleEvent);const h=this.render();this.shadow.appendChild(h.hostElement),F(this,s.prototype.connectedCallback),this.appendSlotContent(),j.pop()};if(this.rootStyle&&!s.styles){const h=C=>C instanceof Promise||Array.isArray(C)&&C.every(f=>f instanceof Promise),p=this.rootStyle,S=C=>{const f=new CSSStyleSheet;f.replaceSync(C),this.shadow.adoptedStyleSheets.push(f);const E=new CSSStyleSheet;E.replaceSync(C.slice(C.indexOf("@property"))),document.adoptedStyleSheets.push(E)};if(h(p)){const C=[];Array.isArray(p)?C.push(...p):C.push(p),Promise.all(C).then(f=>f.forEach(E=>S(E.default))).then(()=>l())}else{const C=[];Array.isArray(p)?C.push(...p):C.push(p),C.forEach(f=>S(f)),l()}}else l();this.slotContext&&Object.keys(this.slotContext).length>0&&this.shadow.querySelectorAll("slot").forEach(h=>{m(this.slotContext,this.slotContext&&this.slotContext[h.name]),L("@bslot element",h,`name:${h.name};`,h.assignedElements()),h.assignedElements().forEach(p=>{const S=this.slotContext[h.name];this.slotContext&&w(S)&&(L("@oslot element",h,`name:${h.name};`,h.assignedElements()),b(()=>{p.dispatchEvent(new CustomEvent("handleSlotContext",{detail:S()}))}))})})}disconnectedCallback(){this.shadow.replaceChildren(),this.replaceChildren(),F(this,s.prototype.disconnectedCallback),this.effects.forEach(l=>{var u;(u=l.selfCleanup)==null||u.forEach(h=>h())}),this.effects.clear()}}return d(r,"observedAttributes",s.prototype[H]??[]),d(r,"renderTagName",t),r.toString=()=>t,customElements.get(t)?console.error(`название тега ${t} повторяется, компонент ${s.name} не зарегистрирован`):customElements.define(t,r),s.renderTagName=t,s};o.BaseElement=R,o.a=oe,o.addAttributeList=ht,o.addClassList=at,o.addCustomAttributes=it,o.addReactiveClassList=lt,o.addStyleList=ct,o.appendContentItem=k,o.article=we,o.aside=Se,o.audio=De,o.b=Oe,o.bindReactiveSignals=vt,o.blockquote=Ae,o.br=fe,o.button=Gt,o.camelToKebab=$,o.canvas=Ge,o.checkCall=F,o.cite=Le,o.classList=nt,o.cls=Mt,o.code=me,o.colorLog=L,o.combineLatest=At,o.component=Ct,o.createComponent=Ve,o.createCustom=pt,o.createCustomEl=ut,o.createCustomElement=ft,o.createEl=B,o.createElement=M,o.createSignal=wt,o.customElementHelpers=et,o.defineSlotTemplate=Bt,o.del=Fe,o.details=_e,o.disableLogs=Z,o.div=mt,o.effect=b,o.effectMap=z,o.elementHelpers=st,o.em=je,o.enableLogs=Et,o.event=Xe,o.eventEmitter=It,o.figcaption=ge,o.figure=ve,o.footer=Ee,o.forkJoin=gt,o.form=Kt,o.getList=$t,o.getSignalContent=g,o.h1=ie,o.h2=ae,o.h3=le,o.h4=ce,o.h5=he,o.h6=de,o.header=be,o.hr=ue,o.i=Ie,o.img=ne,o.initComponent=G,o.input=zt,o.ins=We,o.isBaseElement=Lt,o.isComponentConfig=A,o.isComponentInitConfig=y,o.isReactiveSignal=w,o.isSlotTemplate=Ht,o.kebabToCamel=X,o.label=xt,o.li=Qt,o.main=ye,o.mark=Pe,o.meter=qe,o.nav=Ce,o.newEventEmitter=_t,o.ol=Yt,o.option=ee,o.p=re,o.pre=pe,o.progress=Je,o.projectLog=m,o.property=Ue,o.renderIf=V,o.rs=St,o.rxRenderIf=dt,o.s=$e,o.section=Dt,o.select=te,o.setChildren=rt,o.setEffectDebugEnabled=yt,o.setEffects=ot,o.setListeners=N,o.show=Wt,o.showIf=U,o.signal=v,o.signalComponent=kt,o.slot=Ne,o.small=Re,o.span=qt,o.strong=Te,o.sub=ke,o.summary=Be,o.sup=He,o.table=Nt,o.td=Ut,o.textarea=se,o.th=Xt,o.tr=Vt,o.u=Me,o.ul=Zt,o.unsafeHtml=Pt,o.useCustomComponent=Jt,o.video=ze,o.when=Ft,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
1
+ (function(o,y){typeof exports=="object"&&typeof module<"u"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):(o=typeof globalThis<"u"?globalThis:o||self,y(o.ReactiveComponent={}))})(this,function(o){"use strict";var Ze=Object.defineProperty;var Qe=(o,y,A)=>y in o?Ze(o,y,{enumerable:!0,configurable:!0,writable:!0,value:A}):o[y]=A;var d=(o,y,A)=>Qe(o,typeof y!="symbol"?y+"":y,A);const y=t=>t&&typeof t=="object"&&("classList"in t||"attributes"in t||"customAttributes"in t||"reactiveClassList"in t||"listeners"in t||"customListeners"in t||"children"in t||"effects"in t||"style"in t||Object.keys(t).some(e=>e.startsWith(".")||e.startsWith("@")||e.startsWith("$")))&&!("hostElement"in t),A=t=>t&&typeof t=="object"&&"hostElement"in t&&"append"in t&&"set"in t&&"addStyle"in t&&"setAttribute"in t&&"addClass"in t&&"addEffect"in t&&"addReactiveContent"in t&&"setReactiveContent"in t&&"clear"in t,F=(t,e,...s)=>{e&&e.apply(t,s)};let W=!0;const m=(...t)=>{W&&console.debug(["[rwc]",...t].join(" | "),...Array.from(t.join("").matchAll(/%c/gm)).map((e,s)=>s%2===0?"color:red":"color:inherit"))},$=t=>t.replace(/([A-Z])/gm,e=>`-${e.toLowerCase()}`),X=t=>t.replace(/-(\w)/gm,(e,s)=>s.toUpperCase()),L=(t,...e)=>{if(!W)return;const s={r:"color: #ff0000",g:"color: #00ff00",b:"color: #0000ff",y:"color: #ffff00",p:"color: #800080",c:"color: #00ffff",o:"color: #ffa500",w:"color: #808080"},n=t.match(/@[rgbpycow]/g)||[],r=n.map(c=>{const l=c.slice(1);return s[l]||"color: inherit"});let i=t;n.forEach(c=>{const l=new RegExp(`\\${c}([^\\s,]+)`,"g");i=i.replace(l,"%c$1")}),console.log(i,...r,...e)},Et=()=>{W=!0},Z=()=>{W=!1};Z();const O=[];let D=!1;const yt=t=>{D=t},z=new Map,R=new WeakMap,_=[],I=[];function v(t,e){const s=new Set;let n=(e==null?void 0:e.signalCompareFn)||(()=>!0);function r(){var c;const i=_[_.length-1];if(i&&!("fake"in i&&i.fake)){const l=R.get(i),u=l==null?void 0:l.parent;if(u){const h=R.get(u);h==null||h.cleanupFns.add(()=>{l==null||l.cleanupFns.forEach(p=>p()),l==null||l.cleanupFns.clear(),s.delete(i)})}"selfCleanup"in i||(i.selfCleanup=[]),i.selfCleanup.push(()=>{s.delete(i)}),s.add(i),D&&((c=z.get(i.effectId))==null||c.signals.push(r))}return t}return r.signalId=`${(e==null?void 0:e.name)||""}_${Math.random().toString(36).substring(2,15)}`,r.getSubscribers=()=>[...s],r.setCompareFn=function(i){return n=i,r},r.clearSubscribers=function(){s.clear()},r.peek=function(){return Object.freeze(t)},r.initValue=Object.freeze(t),r.forceSet=function(i){t=i,s.forEach(c=>{Promise.resolve(c).then(l=>{const u=R.get(l);u&&u.cleanupFns.size>0&&(u.cleanupFns.forEach(h=>h()),u.cleanupFns.clear()),I.push(l),l(),I.pop()})})},r.set=function(i,c=n){t!==i&&c(t,i)&&r.forceSet(i)},r.update=function(i){r.set(i(t))},r.pipe=(i,c)=>{const l=v(null);return b(()=>{const u=r();b(()=>{const h=i(u);h instanceof Promise?h.then(p=>l.set(p)):w(h)?b(()=>l.set(h())):l.set(h)},c)}),l},r}function b(t,e){var i;const s=`${(e==null?void 0:e.name)||""}_${Math.random().toString(36).substring(2,15)}`;m("current effect",`%c${s}%c`),t.effectId=s;const n=I[I.length-1];D&&z.set(s,{signals:[],parent:(n==null?void 0:n.effectId)||null}),R.has(t)||R.set(t,{cleanupFns:new Set,children:new Set});const r=R.get(t);if(n){r.parent=n;const c=R.get(n);c==null||c.children.add(t)}else delete r.parent;I.push(t),_.push(t),t(),(i=O[O.length-1])==null||i.call(O,t),_.pop(),I.pop()}const w=t=>!!t&&["object","function"].includes(typeof t)&&"set"in t&&"update"in t&&"forceSet"in t;function St(t,...e){const s=v("");return b(()=>{const n=e.map(i=>w(i)?String(i()):String(i)),r=[t[0]];n.forEach((i,c)=>{r.push(i,t[c+1])}),s.set(r.join(""))}),s}function wt(t,e){const s=v(e??null),n=r=>s.set(r);return t instanceof Promise?t.then(n):typeof t=="function"&&b(()=>{const r=t();r instanceof Promise?r.then(n):w(r)?b(()=>n(r())):n(r)}),s}function vt(t,e){let s=t(),n=e();b(()=>{const r=t(),i=e();r!==i&&(r!==s?e.set(r):i!==n&&t.set(i)),s=r,n=i})}function gt(...t){let e=t.map(n=>n());const s=v(e);return t.forEach((n,r)=>{b(()=>{const i=()=>e.filter(c=>c!==void 0).length;i()===t.length&&(e=Array.from(e).fill(void 0)),e[r]=n(),i()===t.length&&s.set([...e])})}),s}const At=(...t)=>{const e=v([]);return b(()=>{e.set(t.map(s=>s()))}),e};class T extends HTMLElement{constructor(s=!1){super();d(this,"isSlotLazyLoading",!1);d(this,"slotTemplate");d(this,"slotContext");d(this,"rootStyle");d(this,"modelValue");d(this,"providers");d(this,"appendAllSlotContent");d(this,"allSlotContent",[]);d(this,"slotContent",{});d(this,"htmlSlotContent",{});d(this,"shadow");d(this,"injects",{});this.shadow=this.attachShadow({mode:s?"closed":"open"})}appendChild(s,n=!0){var r;if(this.isSlotLazyLoading&&n){if(s instanceof HTMLElement){const i=s.slot||"default";this.htmlSlotContent[i]||(this.htmlSlotContent[i]=[]),(r=this.htmlSlotContent[i])==null||r.push(s)}}else return super.appendChild(s)}appendSlotContent(){var s;(s=this.appendAllSlotContent)==null||s.call(this)}inject(s){return m("%cinject%c",s),this.injects[s]||(this.injects[s]=v(null)),this.injects[s]}checkInjects(){Object.entries(this.injects).forEach(([s,n])=>{m("%cinject%c",`%c${s}%c`,"from BaseElement (dispatch event)"),this.shadow.dispatchEvent(new CustomEvent(s,{detail:{context:s,callback:r=>b(()=>{n.set(r())})},bubbles:!0,composed:!0}))})}setReactiveValue(s){this.modelValue=s}}d(T,"observedAttributes",[]),d(T,"renderTagName",""),d(T,"styles");const Lt=t=>"render"in t&&"setReactiveValue"in t,Rt="handleSlotContext",Q="onConnected",Y=t=>typeof t=="string"?t:JSON.stringify(t),Tt=t=>{const e=document.createElement("span");return e.textContent=Y(t),e},K=(t,e)=>(t.appendChild(Tt(e)),t),jt=(t,e)=>(t.innerHTML="",K(t,e)),x=t=>{const e=document.createElement("span");return b(()=>{const s=t();e.textContent=Y(s)}),e};class tt{constructor(e){d(this,"wrapper");d(this,"hostElement");d(this,"append",(...e)=>(e.forEach(s=>{this.wrapper.appendChild(s.hostElement),Q in s.hostElement&&setTimeout(()=>{var n,r;(r=(n=s.hostElement).onConnected)==null||r.call(n,s,s.hostElement)})}),this));d(this,"set",(...e)=>{this.clear();const s=document.createDocumentFragment();return e.forEach(n=>{s.appendChild(n.hostElement)}),this.wrapper.appendChild(s),this});d(this,"removeChild",(...e)=>(e.forEach(s=>{Array.from(this.wrapper.childNodes.values()).some(n=>n===s.hostElement)&&this.wrapper.removeChild(s.hostElement)}),this));d(this,"addHtmlContent",e=>(K(this.wrapper,e),this));d(this,"setHtmlContent",e=>(jt(this.wrapper,e),this));d(this,"setAttribute",(e,s)=>{let n;if(typeof s=="boolean"&&!(this.wrapper instanceof T))if(s)n="";else{this.removeAttribute(e);const r=e.toLowerCase();return r in this.wrapper&&(this.wrapper[r]=null),this}else typeof s!="string"?n=JSON.stringify(s):n=s;if(this.wrapper.setAttribute($(e),n),!(this.wrapper instanceof T)){const r=e.toLowerCase();r in this.wrapper&&(this.wrapper[r]=s)}return this});d(this,"setCustomAttribute",(e,s)=>{let n;return typeof s!="string"?n=JSON.stringify(s):n=s,this.wrapper.setAttribute($(e),n),this});d(this,"setReactiveAttribute",(e,s)=>(b(()=>this.setAttribute(e,s())),this));d(this,"setReactiveCustomAttribute",(e,s)=>(b(()=>this.setCustomAttribute(e,s())),this));d(this,"removeAttribute",e=>(this.wrapper.removeAttribute($(e)),this));d(this,"addStyle",e=>(Object.entries(e).forEach(([s,n])=>{const r=s.startsWith("--");typeof n=="function"?this.addEffect(()=>{if(r){const i=String(n()||"");this.wrapper.style.setProperty(s,i)}else this.wrapper.style[s]=n()}):typeof n=="string"&&(r?this.wrapper.style.setProperty(s,n):this.wrapper.style[s]=n)}),this));d(this,"onConnected",e=>(Reflect.defineProperty(this.wrapper,Q,{get(){return e}}),this));d(this,"addClass",(...e)=>(e.forEach(s=>{typeof s=="string"?this.wrapper.classList.add(...s.split(" ").flatMap(n=>n.split(`
2
+ `)).map(n=>n.trim()).filter(Boolean)):(()=>{let n=null;this.addEffect(()=>{const r=s();r.length>0&&(n?this.replaceClass(n,r):this.addClass(r),n=r)})})()}),this));d(this,"setClass",(...e)=>(this.wrapper.classList.remove(...this.wrapper.classList),this.wrapper.classList.add(...e),this));d(this,"addReactiveClass",e=>(Object.keys(e).forEach(s=>{b(()=>{e[s]()?this.addClass(s):this.removeClass(s)})}),this));d(this,"removeClass",(...e)=>(this.wrapper.classList.remove(...e),this));d(this,"replaceClass",(e,s)=>(this.wrapper.classList.replace(e,s),this));d(this,"addEffect",e=>(b(()=>e(this,this.hostElement)),this));d(this,"addReactiveContent",e=>(this.wrapper.appendChild(x(e)),this));d(this,"setReactiveContent",e=>(this.clear(),this.wrapper.appendChild(x(e)),this));d(this,"clear",()=>(this.wrapper.innerHTML="",this));this.wrapper=e,this.hostElement=e}addEventlistener(e,s,n=!1){return this.wrapper.addEventListener(e,r=>s(r,this,this.wrapper),n),this}}class Ot extends tt{constructor(){super(...arguments);d(this,"setReactiveValue",s=>(this.wrapper instanceof T&&this.wrapper.setReactiveValue(s),this));d(this,"setSlotTemplate",s=>{const n=this.wrapper.slotTemplate;return n&&Object.entries(s).forEach(([r,i])=>{n[r]=i}),this})}}const It=()=>()=>{},et=t=>new Ot(t),st=t=>new tt(t),nt=(t,...e)=>({classList:[...t.map(s=>s.trim()).filter(Boolean),...e]}),Mt=(t,...e)=>nt(t,...e),G=(t,e)=>{if(!e)return t;const s=Object.keys(e||{}).filter(n=>n.startsWith(".")||n.startsWith("@")||n.startsWith("$"));return s.filter(n=>n.startsWith(".")).forEach(n=>{e!=null&&e.attributes||(e.attributes={}),e.attributes[n.slice(1)]=e[n]}),s.filter(n=>n.startsWith("@")).forEach(n=>{e!=null&&e.listeners||(e.listeners={});const r=n.slice(1);e.listeners[r]=e[n]}),s.filter(n=>n.startsWith("$")).forEach(n=>{e!=null&&e.effects||(e.effects=[]),e.effects.push(e[n])}),at(t,e.classList),ct(t,e.style),ht(t,e.attributes),lt(t,e.reactiveClassList),it(t,e.customAttributes),rt(t,e.children),ot(t,e.effects),N(t,e.listeners),N(t,e.customListeners),t},N=(t,e)=>{e&&Object.entries(e).forEach(([s,n])=>{typeof n=="function"&&t.addEventlistener(s,n)})},ot=(t,e)=>e==null?void 0:e.forEach(s=>t.addEffect(s)),rt=(t,e)=>k(t,...e||[]),it=(t,e)=>{const s=e;s&&Object.keys(s).forEach(n=>{w(s[n])?t.setReactiveCustomAttribute(n,s[n]):typeof s[n]=="function"?t.addEffect(()=>{t.setCustomAttribute(n,s[n]())}):t.setCustomAttribute(n,s[n])})},at=(t,e)=>t.addClass(...e||[]),lt=(t,e)=>t.addReactiveClass(e||{}),ct=(t,e)=>t.addStyle(e||{}),ht=(t,e)=>{const s=e,n=(r,i)=>{i&&(w(i)?t.setReactiveAttribute(r,i):typeof i=="function"?t.addEffect(()=>{t.setAttribute(r,i())}):t.setAttribute(r,i))};s&&Object.keys(s).forEach(r=>{n(r,s[r])})},k=(t,...e)=>(e.forEach(s=>{typeof s=="string"?s.trim().length>0&&t.addHtmlContent(s):w(s)?t.addReactiveContent(s):t.append(s)}),t),M=(t,e)=>{const s=document.createElement(t),n=st(s);return G(n,e)},B=(t,e)=>{const[s,...n]=t.split(" ").map(i=>i.trim()),r=M(s,e);return n.length>0&&r.addClass(...n),(...i)=>k(r,...i.filter(Boolean).flat().flatMap(c=>typeof c=="function"&&!w(c)?g(()=>c(r)):c))},g=t=>M("div").addStyle({display:"contents"}).addEffect(e=>{const s=t(),n=[];Array.isArray(s)?n.push(...s):n.push(s),e.clear(),k(e,...n)}),$t=(t,e,s)=>{const n=M("div").addStyle({display:"contents"}),r=new Map,i=new Map;let c=[];const l=new Set;let u=t.peek();const h=p=>{l.delete(p),r.delete(p),i.delete(p)};return b(()=>{const p=t();c=p.map(e).map(f=>typeof f=="string"?f:f.toString());const S=Array.from(n.hostElement.children);m("containerChildren",S,c),S.forEach(f=>{const E=f.dataset.key;c.includes(E)||(m("remove element",E,f),f.remove(),h(E))}),c.forEach(f=>{var P,j;const E=p[c.indexOf(f)];r.has(f)?JSON.stringify(E)!==JSON.stringify(u[c.indexOf(f)])&&((P=n.hostElement.querySelector(`[data-key="${f}"]`))==null||P.remove(),(j=r.get(f))==null||j.set(Math.random().toString(36).substring(2,15)),i.set(f,()=>s(E,c.indexOf(f),p).setCustomAttribute("data-key",f))):(m("create new element",f,E),r.set(f,v(Math.random().toString(36).substring(2,15))),i.set(f,()=>s(E,c.indexOf(f),p).setCustomAttribute("data-key",f)))}),u=[...p.map(f=>({...f}))];const C=()=>{r.forEach((f,E)=>{m("key from setTimeout foreach currItemSignalMap",E),l.has(E)||(l.add(E),b(()=>{var bt;f();const P=c.indexOf(E),j=(bt=i.get(E))==null?void 0:bt();j&&(m("call effect from setTimeout",E,j.hostElement),P<=n.hostElement.children.length-1?n.hostElement.insertBefore(j.hostElement,n.hostElement.children[P]):n.hostElement.append(j.hostElement))}))})};Promise.resolve().then(()=>C())}),n},kt=t=>{let e=[M("div")],s=!1;return b(()=>{var i,c;const n=t();s=Array.isArray(n);const r=[];r.push(...[n].flat()),r.length===0&&r.push(M("div").addStyle({display:"none"}).setAttribute("id","empty_template"));try{m("newReactiveComponent.map",r.map(l=>{var u;return m("newReactiveComponent hostElement",l.hostElement),(u=l.hostElement)==null?void 0:u.id})),m("currComponent[0].hostElement?.id",(i=e[0].hostElement)==null?void 0:i.id,e),(c=e[0].hostElement)==null||c.replaceWith(...r.map(l=>l.hostElement)),e.slice(1).forEach(l=>{var u;return(u=l.hostElement)==null?void 0:u.remove()}),e=r}catch(l){console.error(l)}}),s?e:e[0]},Ht=t=>Rt in t,Pt=t=>{const e=B("div")().addStyle({display:"contents"}),s=n=>(e.hostElement.innerHTML=n,e);return typeof t=="string"?s(t):e.addEffect(()=>{s(t())}),e},V=(t,e,s)=>t?g(e):s?g(s):B("div")().setAttribute("id","empty_div_renderIf").addStyle({display:"none"}),dt=(t,e,s)=>g(()=>V(!!t(),e,s)),Ft=(t,e,s)=>typeof t=="boolean"?V(t,e,s):dt(t,e,s),U=(t,e)=>{const s=g(e);return typeof t=="boolean"?[s].flat().forEach(n=>n.hostElement.style.display=t?"block":"none"):b(()=>{const n=t()?"block":"none";[s].flat().forEach(r=>r.hostElement.style.display=n)}),s},Wt=(t,e,s)=>{const n=[U(t,e)].flat();return s&&n.push(...[U(()=>typeof t=="boolean"?!t:!t(),s)].flat()),g(()=>n)},ft=(t,e)=>{m("createCustomElement",t);const s=document.createElement(t),n=et(s);return G(n,e)},ut=(t,e)=>{const s=t.split(" ").slice(1).map(r=>r.trim()),n=ft(t.split(" ")[0],e);return Array.isArray(s)&&s.length>0&&n.addClass(...s),(...r)=>{L("@rcreateCustomEl content",t,r);const i=r.filter(Boolean).flat().flatMap(c=>typeof c=="function"&&!w(c)?g(()=>c(n)):c);return n.hostElement.allSlotContent=i,n.hostElement.slotContent=i.filter(A).reduce((c,l)=>{const u=l.hostElement.getAttribute("slot")||"default";return c[u]||(c[u]=[]),c[u].push(l),c},{}),n.hostElement.appendAllSlotContent=()=>k(n,...i),n}},pt=(t,e,s)=>ut(`${t.renderTagName}${e&&typeof e=="string"?" "+e:""}`,y(e)?e:e&&typeof e=="string"?s:void 0),_t=()=>{const t=()=>{};return t.oldValue=null,t},Bt=()=>({}),Jt=(t,e,s)=>{const n=e?Ct(e,s)(t):t;return(r,...i)=>{const c=[...i];return r&&!y(r)&&c.unshift(r),pt(n,y(r)?r:{})(...c)}},a={};["div","span","section","input","button","table","tr","td","th","ul","li","ol","form","label","select","option","textarea","img","a","p","h1","h2","h3","h4","h5","h6","br","hr","pre","code","nav","header","footer","main","aside","article","figure","figcaption","blockquote","cite","small","strong","em","b","i","u","s","sub","sup","mark","del","ins","details","summary","progress","meter","audio","video","canvas","slot"].forEach(t=>{a[t]=(e,...s)=>{let n=[...s];return e&&!y(e)&&(n=[e].concat(n)),B(t,y(e)?e:{})(...n)}});const mt=a.div,qt=a.span,Dt=a.section,zt=a.input,Gt=a.button,Nt=a.table,Vt=a.tr,Ut=a.td,Xt=a.th,Zt=a.ul,Qt=a.li,Yt=a.ol,Kt=a.form,xt=a.label,te=a.select,ee=a.option,se=a.textarea,ne=a.img,oe=a.a,re=a.p,ie=a.h1,ae=a.h2,le=a.h3,ce=a.h4,he=a.h5,de=a.h6,fe=a.br,ue=a.hr,pe=a.pre,me=a.code,Ce=a.nav,be=a.header,Ee=a.footer,ye=a.main,Se=a.aside,we=a.article,ve=a.figure,ge=a.figcaption,Ae=a.blockquote,Le=a.cite,Re=a.small,Te=a.strong,je=a.em,Oe=a.b,Ie=a.i,Me=a.u,$e=a.s,ke=a.sub,He=a.sup,Pe=a.mark,Fe=a.del,We=a.ins,_e=a.details,Be=a.summary,Je=a.progress,qe=a.meter,De=a.audio,ze=a.video,Ge=a.canvas,Ne=a.slot,Ve=t=>e=>t(e).addClass(...e.classList??[]).addReactiveClass(e.reactiveClassList??{}),J="eventProps",q="EVENT_CONFIG",H="observedAttributes",Ue=()=>(t,e)=>{Reflect.get(t,H)||Reflect.defineProperty(t,H,{value:[]}),Reflect.get(t,H).push($(e))},Xe=t=>(e,s)=>{Reflect.get(e,J)||Reflect.defineProperty(e,J,{value:[]}),Reflect.get(e,q)||Reflect.defineProperty(e,q,{value:{}}),Reflect.get(e,q)[s]={bubbles:(t==null?void 0:t.bubbles)??!1,composed:(t==null?void 0:t.composed)??!1},Reflect.get(e,J).push(s)},Ct=(t,e=!1)=>s=>{m(t,"start register static attr",s.prototype[H]);const n=[];if(s.styles){const i=s.styles,c=[];Array.isArray(i)?c.push(...i):c.push(i),c.forEach(l=>{const u=new CSSStyleSheet;u.replaceSync(l),n.push(u);const h=new CSSStyleSheet;h.replaceSync(l.slice(l.indexOf("@property"))),document.adoptedStyleSheets.push(h)})}class r extends s{constructor(...l){m("constructor",`%c${t}%c`);super(e,...l);d(this,"effectCleanupHandleEvent",l=>{this.effects.add(l)});d(this,"effects",new Set);L("@osheet",n),n.length>0&&this.shadow.adoptedStyleSheets.push(...n)}render(){m("rwc: render from new class");let l=mt();const u=()=>{m("wrapperEffectCallback"),l=s.prototype.render.call(this)};return u.fake=!0,b(u),l}attributeChangedCallback(l,u,h){m("%cAttribute has changed.%c",`%c${l}%c`,`oldValue: ${u}, newValue: ${h}`,`%c${t}%c`);try{h=JSON.parse(h)}catch{}const p=X(l);if(p in this&&w(this[p])){const S=this[p];h===null?(S.set(S.initValue),this.removeAttribute(l)):S.set(h)}F(this,s.prototype.attributeChangedCallback,l,u,h)}connectedCallback(){var u;m("rwc: connectedCallback"),m("connectedCallback",`%c${t}%c`,this),this.providers&&Object.keys(this.providers).length>0&&(m("WRAPPER for providers",t),Object.entries(this.providers).forEach(([h,p])=>{m("register provider",h,p()),this.addEventListener(h,S=>{var f;m("send provider",h,p());const C=S;((f=C.detail)==null?void 0:f.context)===h&&(C.stopPropagation(),C.detail.callback(p))})})),this.checkInjects(),(u=s.prototype[J])==null||u.forEach(h=>{this[h]=p=>{const S=s.prototype[q][h],{bubbles:C,composed:f}=S;w(p)?b(()=>{L("@oemit reactive value",p()),this.dispatchEvent(new CustomEvent(h,{detail:p(),bubbles:C,composed:f}))}):(L("@oemit value",p),this.dispatchEvent(new CustomEvent(h,{detail:p,bubbles:C,composed:f})))}}),m("start render",`%c${t}%c`,t);const l=()=>{m("rwc: insertRenderTemplate"),O.push(this.effectCleanupHandleEvent);const h=this.render();this.shadow.appendChild(h.hostElement),F(this,s.prototype.connectedCallback),this.appendSlotContent(),O.pop()};if(this.rootStyle&&!s.styles){const h=C=>C instanceof Promise||Array.isArray(C)&&C.every(f=>f instanceof Promise),p=this.rootStyle,S=C=>{const f=new CSSStyleSheet;f.replaceSync(C),this.shadow.adoptedStyleSheets.push(f);const E=new CSSStyleSheet;E.replaceSync(C.slice(C.indexOf("@property"))),document.adoptedStyleSheets.push(E)};if(h(p)){const C=[];Array.isArray(p)?C.push(...p):C.push(p),Promise.all(C).then(f=>f.forEach(E=>S(E.default))).then(()=>l())}else{const C=[];Array.isArray(p)?C.push(...p):C.push(p),C.forEach(f=>S(f)),l()}}else l();this.slotContext&&Object.keys(this.slotContext).length>0&&this.shadow.querySelectorAll("slot").forEach(h=>{m(this.slotContext,this.slotContext&&this.slotContext[h.name]),L("@bslot element",h,`name:${h.name};`,h.assignedElements()),h.assignedElements().forEach(p=>{const S=this.slotContext[h.name];this.slotContext&&w(S)&&(L("@oslot element",h,`name:${h.name};`,h.assignedElements()),b(()=>{p.dispatchEvent(new CustomEvent("handleSlotContext",{detail:S()}))}))})})}disconnectedCallback(){this.shadow.replaceChildren(),this.replaceChildren(),F(this,s.prototype.disconnectedCallback),this.effects.forEach(l=>{var u;(u=l.selfCleanup)==null||u.forEach(h=>h())}),this.effects.clear()}}return d(r,"observedAttributes",s.prototype[H]??[]),d(r,"renderTagName",t),r.toString=()=>t,customElements.get(t)?console.error(`название тега ${t} повторяется, компонент ${s.name} не зарегистрирован`):customElements.define(t,r),s.renderTagName=t,s};o.BaseElement=T,o.a=oe,o.addAttributeList=ht,o.addClassList=at,o.addCustomAttributes=it,o.addReactiveClassList=lt,o.addStyleList=ct,o.appendContentItem=k,o.article=we,o.aside=Se,o.audio=De,o.b=Oe,o.bindReactiveSignals=vt,o.blockquote=Ae,o.br=fe,o.button=Gt,o.camelToKebab=$,o.canvas=Ge,o.checkCall=F,o.cite=Le,o.classList=nt,o.cls=Mt,o.code=me,o.colorLog=L,o.combineLatest=At,o.component=Ct,o.createComponent=Ve,o.createCustom=pt,o.createCustomEl=ut,o.createCustomElement=ft,o.createEl=B,o.createElement=M,o.createSignal=wt,o.customElementHelpers=et,o.defineSlotTemplate=Bt,o.del=Fe,o.details=_e,o.disableLogs=Z,o.div=mt,o.effect=b,o.effectMap=z,o.elementHelpers=st,o.em=je,o.enableLogs=Et,o.event=Xe,o.eventEmitter=It,o.figcaption=ge,o.figure=ve,o.footer=Ee,o.forkJoin=gt,o.form=Kt,o.getList=$t,o.getSignalContent=g,o.h1=ie,o.h2=ae,o.h3=le,o.h4=ce,o.h5=he,o.h6=de,o.header=be,o.hr=ue,o.i=Ie,o.img=ne,o.initComponent=G,o.input=zt,o.ins=We,o.isBaseElement=Lt,o.isComponentConfig=A,o.isComponentInitConfig=y,o.isReactiveSignal=w,o.isSlotTemplate=Ht,o.kebabToCamel=X,o.label=xt,o.li=Qt,o.main=ye,o.mark=Pe,o.meter=qe,o.nav=Ce,o.newEventEmitter=_t,o.ol=Yt,o.option=ee,o.p=re,o.pre=pe,o.progress=Je,o.projectLog=m,o.property=Ue,o.renderIf=V,o.rs=St,o.rxRenderIf=dt,o.s=$e,o.section=Dt,o.select=te,o.setChildren=rt,o.setEffectDebugEnabled=yt,o.setEffects=ot,o.setListeners=N,o.show=Wt,o.showIf=U,o.signal=v,o.signalComponent=kt,o.slot=Ne,o.small=Re,o.span=qt,o.strong=Te,o.sub=ke,o.summary=Be,o.sup=He,o.table=Nt,o.td=Ut,o.textarea=se,o.th=Xt,o.tr=Vt,o.u=Me,o.ul=Zt,o.unsafeHtml=Pt,o.useCustomComponent=Jt,o.video=ze,o.when=Ft,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
@@ -1,7 +1,7 @@
1
1
  var Y = Object.defineProperty;
2
2
  var K = (t, e, s) => e in t ? Y(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
3
  var h = (t, e, s) => K(t, typeof e != "symbol" ? e + "" : e, s);
4
- const x = (t) => t && typeof t == "object" && ("classList" in t || "attributes" in t || "customAttributes" in t || "reactiveClassList" in t || "listeners" in t || "customListeners" in t || "children" in t || "effects" in t || "style" in t || Object.keys(t).some(
4
+ const T = (t) => t && typeof t == "object" && ("classList" in t || "attributes" in t || "customAttributes" in t || "reactiveClassList" in t || "listeners" in t || "customListeners" in t || "children" in t || "effects" in t || "style" in t || Object.keys(t).some(
5
5
  (e) => e.startsWith(".") || e.startsWith("@") || e.startsWith("$")
6
6
  )) && !("hostElement" in t), tt = (t) => t && typeof t == "object" && "hostElement" in t && "append" in t && "set" in t && "addStyle" in t && "setAttribute" in t && "addClass" in t && "addEffect" in t && "addReactiveContent" in t && "setReactiveContent" in t && "clear" in t, W = (t, e, ...s) => {
7
7
  e && e.apply(t, s);
@@ -12,7 +12,7 @@ const u = (...t) => {
12
12
  ["[rwc]", ...t].join(" | "),
13
13
  ...Array.from(t.join("").matchAll(/%c/gm)).map((e, s) => s % 2 === 0 ? "color:red" : "color:inherit")
14
14
  );
15
- }, M = (t) => t.replace(/([A-Z])/gm, (e) => `-${e.toLowerCase()}`), et = (t) => t.replace(/-(\w)/gm, (e, s) => s.toUpperCase()), A = (t, ...e) => {
15
+ }, M = (t) => t.replace(/([A-Z])/gm, (e) => `-${e.toLowerCase()}`), et = (t) => t.replace(/-(\w)/gm, (e, s) => s.toUpperCase()), g = (t, ...e) => {
16
16
  if (!H) return;
17
17
  const s = {
18
18
  r: "color: #ff0000",
@@ -46,21 +46,21 @@ const u = (...t) => {
46
46
  H = !1;
47
47
  };
48
48
  st();
49
- const g = [];
49
+ const L = [];
50
50
  let _ = !1;
51
51
  const Rt = (t) => {
52
52
  _ = t;
53
- }, G = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new WeakMap(), P = [], L = [];
54
- function v(t, e) {
53
+ }, G = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new WeakMap(), k = [], R = [];
54
+ function A(t, e) {
55
55
  const s = /* @__PURE__ */ new Set();
56
56
  let n = (e == null ? void 0 : e.signalCompareFn) || (() => !0);
57
57
  function r() {
58
58
  var a;
59
- const o = P[P.length - 1];
59
+ const o = k[k.length - 1];
60
60
  if (o && !("fake" in o && o.fake)) {
61
- const l = R.get(o), d = l == null ? void 0 : l.parent;
61
+ const l = w.get(o), d = l == null ? void 0 : l.parent;
62
62
  if (d) {
63
- const c = R.get(d);
63
+ const c = w.get(d);
64
64
  c == null || c.cleanupFns.add(() => {
65
65
  l == null || l.cleanupFns.forEach((f) => f()), l == null || l.cleanupFns.clear(), s.delete(o);
66
66
  });
@@ -79,9 +79,9 @@ function v(t, e) {
79
79
  return Object.freeze(t);
80
80
  }, r.initValue = Object.freeze(t), r.forceSet = function(o) {
81
81
  t = o, s.forEach((a) => {
82
- setTimeout(() => {
83
- const l = a, d = R.get(l);
84
- d && d.cleanupFns.size > 0 && (d.cleanupFns.forEach((c) => c()), d.cleanupFns.clear()), L.push(l), l(), L.pop();
82
+ Promise.resolve(a).then((l) => {
83
+ const d = w.get(l);
84
+ d && d.cleanupFns.size > 0 && (d.cleanupFns.forEach((c) => c()), d.cleanupFns.clear()), R.push(l), l(), R.pop();
85
85
  });
86
86
  });
87
87
  }, r.set = function(o, a = n) {
@@ -89,7 +89,7 @@ function v(t, e) {
89
89
  }, r.update = function(o) {
90
90
  r.set(o(t));
91
91
  }, r.pipe = (o, a) => {
92
- const l = v(null);
92
+ const l = A(null);
93
93
  return C(() => {
94
94
  const d = r();
95
95
  C(() => {
@@ -103,17 +103,23 @@ function C(t, e) {
103
103
  var o;
104
104
  const s = `${(e == null ? void 0 : e.name) || ""}_${Math.random().toString(36).substring(2, 15)}`;
105
105
  u("current effect", `%c${s}%c`), t.effectId = s;
106
- const n = L[L.length - 1];
106
+ const n = R[R.length - 1];
107
107
  _ && G.set(s, {
108
108
  signals: [],
109
109
  parent: (n == null ? void 0 : n.effectId) || null
110
- }), R.has(t) || R.set(t, { cleanupFns: /* @__PURE__ */ new Set() });
111
- const r = R.get(t);
112
- n ? r.parent = n : delete r.parent, L.push(t), P.push(t), t(), (o = g[g.length - 1]) == null || o.call(g, t), P.pop(), L.pop();
110
+ }), w.has(t) || w.set(t, { cleanupFns: /* @__PURE__ */ new Set(), children: /* @__PURE__ */ new Set() });
111
+ const r = w.get(t);
112
+ if (n) {
113
+ r.parent = n;
114
+ const a = w.get(n);
115
+ a == null || a.children.add(t);
116
+ } else
117
+ delete r.parent;
118
+ R.push(t), k.push(t), t(), (o = L[L.length - 1]) == null || o.call(L, t), k.pop(), R.pop();
113
119
  }
114
120
  const y = (t) => !!t && ["object", "function"].includes(typeof t) && "set" in t && "update" in t && "forceSet" in t;
115
121
  function Ot(t, ...e) {
116
- const s = v("");
122
+ const s = A("");
117
123
  return C(() => {
118
124
  const n = e.map(
119
125
  (o) => y(o) ? String(o()) : String(o)
@@ -124,22 +130,22 @@ function Ot(t, ...e) {
124
130
  }), s;
125
131
  }
126
132
  function jt(t, e) {
127
- const s = v(e ?? null), n = (r) => s.set(r);
133
+ const s = A(e ?? null), n = (r) => s.set(r);
128
134
  return t instanceof Promise ? t.then(n) : typeof t == "function" && C(() => {
129
135
  const r = t();
130
136
  r instanceof Promise ? r.then(n) : y(r) ? C(() => n(r())) : n(r);
131
137
  }), s;
132
138
  }
133
- function Tt(t, e) {
139
+ function xt(t, e) {
134
140
  let s = t(), n = e();
135
141
  C(() => {
136
142
  const r = t(), o = e();
137
143
  r !== o && (r !== s ? e.set(r) : o !== n && t.set(o)), s = r, n = o;
138
144
  });
139
145
  }
140
- function xt(...t) {
146
+ function Tt(...t) {
141
147
  let e = t.map((n) => n());
142
- const s = v(e);
148
+ const s = A(e);
143
149
  return t.forEach((n, r) => {
144
150
  C(() => {
145
151
  const o = () => e.filter((a) => a !== void 0).length;
@@ -148,7 +154,7 @@ function xt(...t) {
148
154
  }), s;
149
155
  }
150
156
  const $t = (...t) => {
151
- const e = v([]);
157
+ const e = A([]);
152
158
  return C(() => {
153
159
  e.set(t.map((s) => s()));
154
160
  }), e;
@@ -185,7 +191,7 @@ class O extends HTMLElement {
185
191
  (s = this.appendAllSlotContent) == null || s.call(this);
186
192
  }
187
193
  inject(s) {
188
- return u("%cinject%c", s), this.injects[s] || (this.injects[s] = v(null)), this.injects[s];
194
+ return u("%cinject%c", s), this.injects[s] || (this.injects[s] = A(null)), this.injects[s];
189
195
  }
190
196
  checkInjects() {
191
197
  Object.entries(this.injects).forEach(([s, n]) => {
@@ -334,7 +340,7 @@ class it extends X {
334
340
  const It = () => () => {
335
341
  }, lt = (t) => new it(t), at = (t) => new X(t), ct = (t, ...e) => ({
336
342
  classList: [...t.map((s) => s.trim()).filter(Boolean), ...e]
337
- }), kt = (t, ...e) => ct(t, ...e), Z = (t, e) => {
343
+ }), Pt = (t, ...e) => ct(t, ...e), Z = (t, e) => {
338
344
  if (!e) return t;
339
345
  const s = Object.keys(e || {}).filter(
340
346
  (n) => n.startsWith(".") || n.startsWith("@") || n.startsWith("$")
@@ -378,13 +384,13 @@ const It = () => () => {
378
384
  return n.length > 0 && r.addClass(...n), (...o) => F(
379
385
  r,
380
386
  ...o.filter(Boolean).flat().flatMap(
381
- (a) => typeof a == "function" && !y(a) ? w(() => a(r)) : a
387
+ (a) => typeof a == "function" && !y(a) ? v(() => a(r)) : a
382
388
  )
383
389
  );
384
- }, w = (t) => $("div").addStyle({ display: "contents" }).addEffect((e) => {
390
+ }, v = (t) => $("div").addStyle({ display: "contents" }).addEffect((e) => {
385
391
  const s = t(), n = [];
386
392
  Array.isArray(s) ? n.push(...s) : n.push(s), e.clear(), F(e, ...n);
387
- }), Pt = (t, e, s) => {
393
+ }), kt = (t, e, s) => {
388
394
  const n = $("div").addStyle({ display: "contents" }), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
389
395
  let a = [];
390
396
  const l = /* @__PURE__ */ new Set();
@@ -410,7 +416,7 @@ const It = () => () => {
410
416
  )
411
417
  )) : (u("create new element", p, b), r.set(
412
418
  p,
413
- v(Math.random().toString(36).substring(2, 15))
419
+ A(Math.random().toString(36).substring(2, 15))
414
420
  ), o.set(
415
421
  p,
416
422
  () => s(b, a.indexOf(p), f).setCustomAttribute(
@@ -467,8 +473,8 @@ const It = () => () => {
467
473
  return typeof t == "string" ? s(t) : e.addEffect(() => {
468
474
  s(t());
469
475
  }), e;
470
- }, Q = (t, e, s) => t ? w(e) : s ? w(s) : B("div")().setAttribute("id", "empty_div_renderIf").addStyle({ display: "none" }), bt = (t, e, s) => w(() => Q(!!t(), e, s)), _t = (t, e, s) => typeof t == "boolean" ? Q(t, e, s) : bt(t, e, s), N = (t, e) => {
471
- const s = w(e);
476
+ }, Q = (t, e, s) => t ? v(e) : s ? v(s) : B("div")().setAttribute("id", "empty_div_renderIf").addStyle({ display: "none" }), bt = (t, e, s) => v(() => Q(!!t(), e, s)), _t = (t, e, s) => typeof t == "boolean" ? Q(t, e, s) : bt(t, e, s), N = (t, e) => {
477
+ const s = v(e);
472
478
  return typeof t == "boolean" ? [s].flat().forEach((n) => n.hostElement.style.display = t ? "block" : "none") : C(() => {
473
479
  const n = t() ? "block" : "none";
474
480
  [s].flat().forEach((r) => r.hostElement.style.display = n);
@@ -480,7 +486,7 @@ const It = () => () => {
480
486
  () => typeof t == "boolean" ? !t : !t(),
481
487
  s
482
488
  )].flat()
483
- ), w(() => n);
489
+ ), v(() => n);
484
490
  }, Et = (t, e) => {
485
491
  u("createCustomElement", t);
486
492
  const s = document.createElement(t), n = lt(s);
@@ -488,9 +494,9 @@ const It = () => () => {
488
494
  }, yt = (t, e) => {
489
495
  const s = t.split(" ").slice(1).map((r) => r.trim()), n = Et(t.split(" ")[0], e);
490
496
  return Array.isArray(s) && s.length > 0 && n.addClass(...s), (...r) => {
491
- A("@rcreateCustomEl content", t, r);
497
+ g("@rcreateCustomEl content", t, r);
492
498
  const o = r.filter(Boolean).flat().flatMap(
493
- (a) => typeof a == "function" && !y(a) ? w(() => a(n)) : a
499
+ (a) => typeof a == "function" && !y(a) ? v(() => a(n)) : a
494
500
  );
495
501
  return n.hostElement.allSlotContent = o, n.hostElement.slotContent = o.filter(tt).reduce(
496
502
  (a, l) => {
@@ -502,7 +508,7 @@ const It = () => () => {
502
508
  };
503
509
  }, St = (t, e, s) => yt(
504
510
  `${t.renderTagName}${e && typeof e == "string" ? " " + e : ""}`,
505
- x(e) ? e : e && typeof e == "string" ? s : void 0
511
+ T(e) ? e : e && typeof e == "string" ? s : void 0
506
512
  ), Jt = () => {
507
513
  const t = () => {
508
514
  };
@@ -511,7 +517,7 @@ const It = () => () => {
511
517
  const n = e ? At(e, s)(t) : t;
512
518
  return (r, ...o) => {
513
519
  const a = [...o];
514
- return r && !x(r) && a.unshift(r), St(n, x(r) ? r : {})(...a);
520
+ return r && !T(r) && a.unshift(r), St(n, T(r) ? r : {})(...a);
515
521
  };
516
522
  }, i = {}, wt = [
517
523
  "div",
@@ -578,21 +584,21 @@ const It = () => () => {
578
584
  wt.forEach((t) => {
579
585
  i[t] = (e, ...s) => {
580
586
  let n = [...s];
581
- return e && !x(e) && (n = [e].concat(n)), B(t, x(e) ? e : {})(...n);
587
+ return e && !T(e) && (n = [e].concat(n)), B(t, T(e) ? e : {})(...n);
582
588
  };
583
589
  });
584
- const vt = i.div, Dt = i.span, Nt = i.section, Gt = i.input, Vt = i.button, Ut = i.table, Xt = i.tr, Zt = i.td, Qt = i.th, Yt = i.ul, Kt = i.li, te = i.ol, ee = i.form, se = i.label, ne = i.select, re = i.option, oe = i.textarea, ie = i.img, le = i.a, ae = i.p, ce = i.h1, he = i.h2, pe = i.h3, de = i.h4, fe = i.h5, ue = i.h6, me = i.br, Ce = i.hr, be = i.pre, Ee = i.code, ye = i.nav, Se = i.header, we = i.footer, ve = i.main, Ae = i.aside, ge = i.article, Le = i.figure, Re = i.figcaption, Oe = i.blockquote, je = i.cite, Te = i.small, xe = i.strong, $e = i.em, Me = i.b, Ie = i.i, ke = i.u, Pe = i.s, He = i.sub, Fe = i.sup, We = i.mark, _e = i.del, Be = i.ins, Je = i.details, qe = i.summary, ze = i.progress, De = i.meter, Ne = i.audio, Ge = i.video, Ve = i.canvas, Ue = i.slot, Xe = (t) => (e) => t(e).addClass(...e.classList ?? []).addReactiveClass(e.reactiveClassList ?? {}), I = "eventProps", k = "EVENT_CONFIG", T = "observedAttributes", Ze = () => (t, e) => {
585
- Reflect.get(t, T) || Reflect.defineProperty(t, T, {
590
+ const vt = i.div, Dt = i.span, Nt = i.section, Gt = i.input, Vt = i.button, Ut = i.table, Xt = i.tr, Zt = i.td, Qt = i.th, Yt = i.ul, Kt = i.li, te = i.ol, ee = i.form, se = i.label, ne = i.select, re = i.option, oe = i.textarea, ie = i.img, le = i.a, ae = i.p, ce = i.h1, he = i.h2, pe = i.h3, de = i.h4, fe = i.h5, ue = i.h6, me = i.br, Ce = i.hr, be = i.pre, Ee = i.code, ye = i.nav, Se = i.header, we = i.footer, ve = i.main, Ae = i.aside, ge = i.article, Le = i.figure, Re = i.figcaption, Oe = i.blockquote, je = i.cite, xe = i.small, Te = i.strong, $e = i.em, Me = i.b, Ie = i.i, Pe = i.u, ke = i.s, He = i.sub, Fe = i.sup, We = i.mark, _e = i.del, Be = i.ins, Je = i.details, qe = i.summary, ze = i.progress, De = i.meter, Ne = i.audio, Ge = i.video, Ve = i.canvas, Ue = i.slot, Xe = (t) => (e) => t(e).addClass(...e.classList ?? []).addReactiveClass(e.reactiveClassList ?? {}), I = "eventProps", P = "EVENT_CONFIG", x = "observedAttributes", Ze = () => (t, e) => {
591
+ Reflect.get(t, x) || Reflect.defineProperty(t, x, {
586
592
  value: []
587
- }), Reflect.get(t, T).push(
593
+ }), Reflect.get(t, x).push(
588
594
  M(e)
589
595
  );
590
596
  }, Qe = (t) => (e, s) => {
591
597
  Reflect.get(e, I) || Reflect.defineProperty(e, I, {
592
598
  value: []
593
- }), Reflect.get(e, k) || Reflect.defineProperty(e, k, {
599
+ }), Reflect.get(e, P) || Reflect.defineProperty(e, P, {
594
600
  value: {}
595
- }), Reflect.get(e, k)[s] = {
601
+ }), Reflect.get(e, P)[s] = {
596
602
  bubbles: (t == null ? void 0 : t.bubbles) ?? !1,
597
603
  composed: (t == null ? void 0 : t.composed) ?? !1
598
604
  }, Reflect.get(e, I).push(s);
@@ -600,7 +606,7 @@ const vt = i.div, Dt = i.span, Nt = i.section, Gt = i.input, Vt = i.button, Ut =
600
606
  u(
601
607
  t,
602
608
  "start register static attr",
603
- s.prototype[T]
609
+ s.prototype[x]
604
610
  );
605
611
  const n = [];
606
612
  if (s.styles) {
@@ -620,7 +626,7 @@ const vt = i.div, Dt = i.span, Nt = i.section, Gt = i.input, Vt = i.button, Ut =
620
626
  this.effects.add(l);
621
627
  });
622
628
  h(this, "effects", /* @__PURE__ */ new Set());
623
- A("@osheet", n), n.length > 0 && this.shadow.adoptedStyleSheets.push(...n);
629
+ g("@osheet", n), n.length > 0 && this.shadow.adoptedStyleSheets.push(...n);
624
630
  }
625
631
  render() {
626
632
  u("rwc: render from new class");
@@ -668,16 +674,16 @@ const vt = i.div, Dt = i.span, Nt = i.section, Gt = i.input, Vt = i.button, Ut =
668
674
  )), this.checkInjects(), (d = s.prototype[I]) == null || d.forEach(
669
675
  (c) => {
670
676
  this[c] = (f) => {
671
- const E = s.prototype[k][c], { bubbles: m, composed: p } = E;
677
+ const E = s.prototype[P][c], { bubbles: m, composed: p } = E;
672
678
  y(f) ? C(() => {
673
- A("@oemit reactive value", f()), this.dispatchEvent(
679
+ g("@oemit reactive value", f()), this.dispatchEvent(
674
680
  new CustomEvent(c, {
675
681
  detail: f(),
676
682
  bubbles: m,
677
683
  composed: p
678
684
  })
679
685
  );
680
- }) : (A("@oemit value", f), this.dispatchEvent(
686
+ }) : (g("@oemit value", f), this.dispatchEvent(
681
687
  new CustomEvent(c, {
682
688
  detail: f,
683
689
  bubbles: m,
@@ -688,9 +694,9 @@ const vt = i.div, Dt = i.span, Nt = i.section, Gt = i.input, Vt = i.button, Ut =
688
694
  }
689
695
  ), u("start render", `%c${t}%c`, t);
690
696
  const l = () => {
691
- u("rwc: insertRenderTemplate"), g.push(this.effectCleanupHandleEvent);
697
+ u("rwc: insertRenderTemplate"), L.push(this.effectCleanupHandleEvent);
692
698
  const c = this.render();
693
- this.shadow.appendChild(c.hostElement), W(this, s.prototype.connectedCallback), this.appendSlotContent(), g.pop();
699
+ this.shadow.appendChild(c.hostElement), W(this, s.prototype.connectedCallback), this.appendSlotContent(), L.pop();
694
700
  };
695
701
  if (this.rootStyle && !s.styles) {
696
702
  const c = (m) => m instanceof Promise || Array.isArray(m) && m.every((p) => p instanceof Promise), f = this.rootStyle, E = (m) => {
@@ -712,14 +718,14 @@ const vt = i.div, Dt = i.span, Nt = i.section, Gt = i.input, Vt = i.button, Ut =
712
718
  u(
713
719
  this.slotContext,
714
720
  this.slotContext && this.slotContext[c.name]
715
- ), A(
721
+ ), g(
716
722
  "@bslot element",
717
723
  c,
718
724
  `name:${c.name};`,
719
725
  c.assignedElements()
720
726
  ), c.assignedElements().forEach((f) => {
721
727
  const E = this.slotContext[c.name];
722
- this.slotContext && y(E) && (A(
728
+ this.slotContext && y(E) && (g(
723
729
  "@oslot element",
724
730
  c,
725
731
  `name:${c.name};`,
@@ -741,7 +747,7 @@ const vt = i.div, Dt = i.span, Nt = i.section, Gt = i.input, Vt = i.button, Ut =
741
747
  }), this.effects.clear();
742
748
  }
743
749
  }
744
- return h(r, "observedAttributes", s.prototype[T] ?? []), h(r, "renderTagName", t), r.toString = () => t, customElements.get(t) ? console.error(
750
+ return h(r, "observedAttributes", s.prototype[x] ?? []), h(r, "renderTagName", t), r.toString = () => t, customElements.get(t) ? console.error(
745
751
  `название тега ${t} повторяется, компонент ${s.name} не зарегистрирован`
746
752
  ) : customElements.define(t, r), s.renderTagName = t, s;
747
753
  };
@@ -758,7 +764,7 @@ export {
758
764
  Ae as aside,
759
765
  Ne as audio,
760
766
  Me as b,
761
- Tt as bindReactiveSignals,
767
+ xt as bindReactiveSignals,
762
768
  Oe as blockquote,
763
769
  me as br,
764
770
  Vt as button,
@@ -767,9 +773,9 @@ export {
767
773
  W as checkCall,
768
774
  je as cite,
769
775
  ct as classList,
770
- kt as cls,
776
+ Pt as cls,
771
777
  Ee as code,
772
- A as colorLog,
778
+ g as colorLog,
773
779
  $t as combineLatest,
774
780
  At as component,
775
781
  Xe as createComponent,
@@ -795,10 +801,10 @@ export {
795
801
  Re as figcaption,
796
802
  Le as figure,
797
803
  we as footer,
798
- xt as forkJoin,
804
+ Tt as forkJoin,
799
805
  ee as form,
800
- Pt as getList,
801
- w as getSignalContent,
806
+ kt as getList,
807
+ v as getSignalContent,
802
808
  ce as h1,
803
809
  he as h2,
804
810
  pe as h3,
@@ -814,7 +820,7 @@ export {
814
820
  Be as ins,
815
821
  Mt as isBaseElement,
816
822
  tt as isComponentConfig,
817
- x as isComponentInitConfig,
823
+ T as isComponentInitConfig,
818
824
  y as isReactiveSignal,
819
825
  Ft as isSlotTemplate,
820
826
  et as kebabToCamel,
@@ -835,7 +841,7 @@ export {
835
841
  Q as renderIf,
836
842
  Ot as rs,
837
843
  bt as rxRenderIf,
838
- Pe as s,
844
+ ke as s,
839
845
  Nt as section,
840
846
  ne as select,
841
847
  pt as setChildren,
@@ -844,12 +850,12 @@ export {
844
850
  D as setListeners,
845
851
  Bt as show,
846
852
  N as showIf,
847
- v as signal,
853
+ A as signal,
848
854
  Ht as signalComponent,
849
855
  Ue as slot,
850
- Te as small,
856
+ xe as small,
851
857
  Dt as span,
852
- xe as strong,
858
+ Te as strong,
853
859
  He as sub,
854
860
  qe as summary,
855
861
  Fe as sup,
@@ -858,7 +864,7 @@ export {
858
864
  oe as textarea,
859
865
  Qt as th,
860
866
  Xt as tr,
861
- ke as u,
867
+ Pe as u,
862
868
  Yt as ul,
863
869
  Wt as unsafeHtml,
864
870
  zt as useCustomComponent,