@owox/web 0.31.0-next-20260805164607 → 0.31.0

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.
@@ -1,4 +1,4 @@
1
- import{x as Se}from"./erd-card-BrXYWEzQ.js";import{J as Ut,V as et}from"./index-DfxbkXTR.js";function ot(t,e=""){return(t||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||e}function yt(t,e){const r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e,n.click(),setTimeout(()=>{URL.revokeObjectURL(r)},1e3)}function $e(t){const e=ot(t??"","data-marts-model"),r=new Date().toISOString().slice(0,10);return`${e}-${r}`}function Ce(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const r=document.implementation.createHTMLDocument(),n=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(i),e&&(n.href=e),i.href=t,i.href}const Ee=(()=>{let t=0;const e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${e()}${t}`)})();function q(t){const e=[];for(let r=0,n=t.length;r<n;r++)e.push(t[r]);return e}let Y=null;function Yt(t={}){return Y||(t.includeStyleProperties?(Y=t.includeStyleProperties,Y):(Y=q(window.getComputedStyle(document.documentElement)),Y))}function st(t,e){const n=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function xe(t){const e=st(t,"border-left-width"),r=st(t,"border-right-width");return t.clientWidth+e+r}function ke(t){const e=st(t,"border-top-width"),r=st(t,"border-bottom-width");return t.clientHeight+e+r}function Nt(t,e={}){const r=e.width||xe(t),n=e.height||ke(t);return{width:r,height:n}}function be(){let t,e;try{e=process}catch{}const r=e&&e.env?e.env.devicePixelRatio:null;return r&&(t=parseInt(r,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}const L=16384;function Re(t){(t.width>L||t.height>L)&&(t.width>L&&t.height>L?t.width>t.height?(t.height*=L/t.width,t.width=L):(t.width*=L/t.height,t.height=L):t.width>L?(t.height*=L/t.width,t.width=L):(t.width*=L/t.height,t.height=L))}function ct(t){return new Promise((e,r)=>{const n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>e(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=t})}async function Te(t){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function Fe(t,e,r){const n="http://www.w3.org/2000/svg",i=document.createElementNS(n,"svg"),a=document.createElementNS(n,"foreignObject");return i.setAttribute("width",`${e}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${e} ${r}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(t),Te(i)}const F=(t,e)=>{if(t instanceof e)return!0;const r=Object.getPrototypeOf(t);return r===null?!1:r.constructor.name===e.name||F(r,e)};function Pe(t){const e=t.getPropertyValue("content");return`${t.cssText} content: '${e.replace(/'|"/g,"")}';`}function Ie(t,e){return Yt(e).map(r=>{const n=t.getPropertyValue(r),i=t.getPropertyPriority(r);return`${r}: ${n}${i?" !important":""};`}).join(" ")}function Me(t,e,r,n){const i=`.${t}:${e}`,a=r.cssText?Pe(r):Ie(r,n);return document.createTextNode(`${i}{${a}}`)}function Bt(t,e,r,n){const i=window.getComputedStyle(t,r),a=i.getPropertyValue("content");if(a===""||a==="none")return;const o=Ee();try{e.className=`${e.className} ${o}`}catch{return}const s=document.createElement("style");s.appendChild(Me(o,r,i,n)),e.appendChild(s)}function Le(t,e,r){Bt(t,e,":before",r),Bt(t,e,":after",r)}const _t="application/font-woff",Ht="image/jpeg",Ae={woff:_t,woff2:_t,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ht,jpeg:Ht,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Oe(t){const e=/\.([^./]*?)$/g.exec(t);return e?e[1]:""}function Tt(t){const e=Oe(t).toLowerCase();return Ae[e]||""}function De(t){return t.split(/,/)[1]}function St(t){return t.search(/^(data:)/)!==-1}function Ue(t,e){return`data:${e};base64,${t}`}async function te(t,e,r){const n=await fetch(t,e);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);const i=await n.blob();return new Promise((a,o)=>{const s=new FileReader;s.onerror=o,s.onloadend=()=>{try{a(r({res:n,result:s.result}))}catch(c){o(c)}},s.readAsDataURL(i)})}const dt={};function Be(t,e,r){let n=t.replace(/\?.*/,"");return r&&(n=t),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),e?`[${e}]${n}`:n}async function Ft(t,e,r){const n=Be(t,e,r.includeQueryParams);if(dt[n]!=null)return dt[n];r.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let i;try{const a=await te(t,r.fetchRequestInit,({res:o,result:s})=>(e||(e=o.headers.get("Content-Type")||""),De(s)));i=Ue(a,e)}catch(a){i=r.imagePlaceholder||"";let o=`Failed to fetch resource: ${t}`;a&&(o=typeof a=="string"?a:a.message),o&&console.warn(o)}return dt[n]=i,i}async function _e(t){const e=t.toDataURL();return e==="data:,"?t.cloneNode(!1):ct(e)}async function He(t,e){if(t.currentSrc){const a=document.createElement("canvas"),o=a.getContext("2d");a.width=t.clientWidth,a.height=t.clientHeight,o==null||o.drawImage(t,0,0,a.width,a.height);const s=a.toDataURL();return ct(s)}const r=t.poster,n=Tt(r),i=await Ft(r,n,e);return ct(i)}async function je(t,e){var r;try{if(!((r=t==null?void 0:t.contentDocument)===null||r===void 0)&&r.body)return await ft(t.contentDocument.body,e,!0)}catch{}return t.cloneNode(!1)}async function Ve(t,e){return F(t,HTMLCanvasElement)?_e(t):F(t,HTMLVideoElement)?He(t,e):F(t,HTMLIFrameElement)?je(t,e):t.cloneNode(ee(t))}const We=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT",ee=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SVG";async function ze(t,e,r){var n,i;if(ee(e))return e;let a=[];return We(t)&&t.assignedNodes?a=q(t.assignedNodes()):F(t,HTMLIFrameElement)&&(!((n=t.contentDocument)===null||n===void 0)&&n.body)?a=q(t.contentDocument.body.childNodes):a=q(((i=t.shadowRoot)!==null&&i!==void 0?i:t).childNodes),a.length===0||F(t,HTMLVideoElement)||await a.reduce((o,s)=>o.then(()=>ft(s,r)).then(c=>{c&&e.appendChild(c)}),Promise.resolve()),e}function Ge(t,e,r){const n=e.style;if(!n)return;const i=window.getComputedStyle(t);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):Yt(r).forEach(a=>{let o=i.getPropertyValue(a);a==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),F(t,HTMLIFrameElement)&&a==="display"&&o==="inline"&&(o="block"),a==="d"&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(a,o,i.getPropertyPriority(a))})}function qe(t,e){F(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),F(t,HTMLInputElement)&&e.setAttribute("value",t.value)}function Xe(t,e){if(F(t,HTMLSelectElement)){const n=Array.from(e.children).find(i=>t.value===i.getAttribute("value"));n&&n.setAttribute("selected","")}}function Ke(t,e,r){return F(e,Element)&&(Ge(t,e,r),Le(t,e,r),qe(t,e),Xe(t,e)),e}async function Je(t,e){const r=t.querySelectorAll?t.querySelectorAll("use"):[];if(r.length===0)return t;const n={};for(let a=0;a<r.length;a++){const s=r[a].getAttribute("xlink:href");if(s){const c=t.querySelector(s),u=document.querySelector(s);!c&&u&&!n[s]&&(n[s]=await ft(u,e,!0))}}const i=Object.values(n);if(i.length){const a="http://www.w3.org/1999/xhtml",o=document.createElementNS(a,"svg");o.setAttribute("xmlns",a),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const s=document.createElementNS(a,"defs");o.appendChild(s);for(let c=0;c<i.length;c++)s.appendChild(i[c]);t.appendChild(o)}return t}async function ft(t,e,r){return!r&&e.filter&&!e.filter(t)?null:Promise.resolve(t).then(n=>Ve(n,e)).then(n=>ze(t,n,e)).then(n=>Ke(t,n,e)).then(n=>Je(n,e))}const re=/url\((['"]?)([^'"]+?)\1\)/g,Qe=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Ze=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Ye(t){const e=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function Ne(t){const e=[];return t.replace(re,(r,n,i)=>(e.push(i),r)),e.filter(r=>!St(r))}async function tr(t,e,r,n,i){try{const a=r?Ce(e,r):e,o=Tt(e);let s;return i||(s=await Ft(a,o,n)),t.replace(Ye(e),`$1${s}$3`)}catch{}return t}function er(t,{preferredFontFormat:e}){return e?t.replace(Ze,r=>{for(;;){const[n,,i]=Qe.exec(r)||[];if(!i)return"";if(i===e)return`src: ${n};`}}):t}function ne(t){return t.search(re)!==-1}async function ae(t,e,r){if(!ne(t))return t;const n=er(t,r);return Ne(n).reduce((a,o)=>a.then(s=>tr(s,o,e,r)),Promise.resolve(n))}async function N(t,e,r){var n;const i=(n=e.style)===null||n===void 0?void 0:n.getPropertyValue(t);if(i){const a=await ae(i,null,r);return e.style.setProperty(t,a,e.style.getPropertyPriority(t)),!0}return!1}async function rr(t,e){await N("background",t,e)||await N("background-image",t,e),await N("mask",t,e)||await N("-webkit-mask",t,e)||await N("mask-image",t,e)||await N("-webkit-mask-image",t,e)}async function nr(t,e){const r=F(t,HTMLImageElement);if(!(r&&!St(t.src))&&!(F(t,SVGImageElement)&&!St(t.href.baseVal)))return;const n=r?t.src:t.href.baseVal,i=await Ft(n,Tt(n),e);await new Promise((a,o)=>{t.onload=a,t.onerror=e.onImageErrorHandler?(...c)=>{try{a(e.onImageErrorHandler(...c))}catch(u){o(u)}}:o;const s=t;s.decode&&(s.decode=a),s.loading==="lazy"&&(s.loading="eager"),r?(t.srcset="",t.src=i):t.href.baseVal=i})}async function ar(t,e){const n=q(t.childNodes).map(i=>ie(i,e));await Promise.all(n).then(()=>t)}async function ie(t,e){F(t,Element)&&(await rr(t,e),await nr(t,e),await ar(t,e))}function ir(t,e){const{style:r}=t;e.backgroundColor&&(r.backgroundColor=e.backgroundColor),e.width&&(r.width=`${e.width}px`),e.height&&(r.height=`${e.height}px`);const n=e.style;return n!=null&&Object.keys(n).forEach(i=>{r[i]=n[i]}),t}const jt={};async function Vt(t){let e=jt[t];if(e!=null)return e;const n=await(await fetch(t)).text();return e={url:t,cssText:n},jt[t]=e,e}async function Wt(t,e){let r=t.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,a=(r.match(/url\([^)]+\)/g)||[]).map(async o=>{let s=o.replace(n,"$1");return s.startsWith("https://")||(s=new URL(s,t.url).href),te(s,e.fetchRequestInit,({result:c})=>(r=r.replace(o,`url(${c})`),[o,c]))});return Promise.all(a).then(()=>r)}function zt(t){if(t==null)return[];const e=[],r=/(\/\*[\s\S]*?\*\/)/gi;let n=t.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=i.exec(n);if(c===null)break;e.push(c[0])}n=n.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(o,"gi");for(;;){let c=a.exec(n);if(c===null){if(c=s.exec(n),c===null)break;a.lastIndex=s.lastIndex}else s.lastIndex=a.lastIndex;e.push(c[0])}return e}async function or(t,e){const r=[],n=[];return t.forEach(i=>{if("cssRules"in i)try{q(i.cssRules||[]).forEach((a,o)=>{if(a.type===CSSRule.IMPORT_RULE){let s=o+1;const c=a.href,u=Vt(c).then(l=>Wt(l,e)).then(l=>zt(l).forEach(f=>{try{i.insertRule(f,f.startsWith("@import")?s+=1:i.cssRules.length)}catch(m){console.error("Error inserting rule from remote css",{rule:f,error:m})}})).catch(l=>{console.error("Error loading remote css",l.toString())});n.push(u)}})}catch(a){const o=t.find(s=>s.href==null)||document.styleSheets[0];i.href!=null&&n.push(Vt(i.href).then(s=>Wt(s,e)).then(s=>zt(s).forEach(c=>{o.insertRule(c,o.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",a)}}),Promise.all(n).then(()=>(t.forEach(i=>{if("cssRules"in i)try{q(i.cssRules||[]).forEach(a=>{r.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),r))}function sr(t){return t.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>ne(e.style.getPropertyValue("src")))}async function cr(t,e){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=q(t.ownerDocument.styleSheets),n=await or(r,e);return sr(n)}function oe(t){return t.trim().replace(/["']/g,"")}function lr(t){const e=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(a=>{e.add(oe(a))}),Array.from(n.children).forEach(a=>{a instanceof HTMLElement&&r(a)})}return r(t),e}async function ur(t,e){const r=await cr(t,e),n=lr(t);return(await Promise.all(r.filter(a=>n.has(oe(a.style.fontFamily))).map(a=>{const o=a.parentStyleSheet?a.parentStyleSheet.href:null;return ae(a.cssText,o,e)}))).join(`
1
+ import{x as Se}from"./erd-card-CzRH59fS.js";import{J as Ut,V as et}from"./index-CAz55S73.js";function ot(t,e=""){return(t||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||e}function yt(t,e){const r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download=e,n.click(),setTimeout(()=>{URL.revokeObjectURL(r)},1e3)}function $e(t){const e=ot(t??"","data-marts-model"),r=new Date().toISOString().slice(0,10);return`${e}-${r}`}function Ce(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const r=document.implementation.createHTMLDocument(),n=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(n),r.body.appendChild(i),e&&(n.href=e),i.href=t,i.href}const Ee=(()=>{let t=0;const e=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${e()}${t}`)})();function q(t){const e=[];for(let r=0,n=t.length;r<n;r++)e.push(t[r]);return e}let Y=null;function Yt(t={}){return Y||(t.includeStyleProperties?(Y=t.includeStyleProperties,Y):(Y=q(window.getComputedStyle(document.documentElement)),Y))}function st(t,e){const n=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function xe(t){const e=st(t,"border-left-width"),r=st(t,"border-right-width");return t.clientWidth+e+r}function ke(t){const e=st(t,"border-top-width"),r=st(t,"border-bottom-width");return t.clientHeight+e+r}function Nt(t,e={}){const r=e.width||xe(t),n=e.height||ke(t);return{width:r,height:n}}function be(){let t,e;try{e=process}catch{}const r=e&&e.env?e.env.devicePixelRatio:null;return r&&(t=parseInt(r,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}const L=16384;function Re(t){(t.width>L||t.height>L)&&(t.width>L&&t.height>L?t.width>t.height?(t.height*=L/t.width,t.width=L):(t.width*=L/t.height,t.height=L):t.width>L?(t.height*=L/t.width,t.width=L):(t.width*=L/t.height,t.height=L))}function ct(t){return new Promise((e,r)=>{const n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>e(n))})},n.onerror=r,n.crossOrigin="anonymous",n.decoding="async",n.src=t})}async function Te(t){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(e=>`data:image/svg+xml;charset=utf-8,${e}`)}async function Fe(t,e,r){const n="http://www.w3.org/2000/svg",i=document.createElementNS(n,"svg"),a=document.createElementNS(n,"foreignObject");return i.setAttribute("width",`${e}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${e} ${r}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(t),Te(i)}const F=(t,e)=>{if(t instanceof e)return!0;const r=Object.getPrototypeOf(t);return r===null?!1:r.constructor.name===e.name||F(r,e)};function Pe(t){const e=t.getPropertyValue("content");return`${t.cssText} content: '${e.replace(/'|"/g,"")}';`}function Ie(t,e){return Yt(e).map(r=>{const n=t.getPropertyValue(r),i=t.getPropertyPriority(r);return`${r}: ${n}${i?" !important":""};`}).join(" ")}function Me(t,e,r,n){const i=`.${t}:${e}`,a=r.cssText?Pe(r):Ie(r,n);return document.createTextNode(`${i}{${a}}`)}function Bt(t,e,r,n){const i=window.getComputedStyle(t,r),a=i.getPropertyValue("content");if(a===""||a==="none")return;const o=Ee();try{e.className=`${e.className} ${o}`}catch{return}const s=document.createElement("style");s.appendChild(Me(o,r,i,n)),e.appendChild(s)}function Le(t,e,r){Bt(t,e,":before",r),Bt(t,e,":after",r)}const _t="application/font-woff",Ht="image/jpeg",Ae={woff:_t,woff2:_t,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ht,jpeg:Ht,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Oe(t){const e=/\.([^./]*?)$/g.exec(t);return e?e[1]:""}function Tt(t){const e=Oe(t).toLowerCase();return Ae[e]||""}function De(t){return t.split(/,/)[1]}function St(t){return t.search(/^(data:)/)!==-1}function Ue(t,e){return`data:${e};base64,${t}`}async function te(t,e,r){const n=await fetch(t,e);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);const i=await n.blob();return new Promise((a,o)=>{const s=new FileReader;s.onerror=o,s.onloadend=()=>{try{a(r({res:n,result:s.result}))}catch(c){o(c)}},s.readAsDataURL(i)})}const dt={};function Be(t,e,r){let n=t.replace(/\?.*/,"");return r&&(n=t),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),e?`[${e}]${n}`:n}async function Ft(t,e,r){const n=Be(t,e,r.includeQueryParams);if(dt[n]!=null)return dt[n];r.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let i;try{const a=await te(t,r.fetchRequestInit,({res:o,result:s})=>(e||(e=o.headers.get("Content-Type")||""),De(s)));i=Ue(a,e)}catch(a){i=r.imagePlaceholder||"";let o=`Failed to fetch resource: ${t}`;a&&(o=typeof a=="string"?a:a.message),o&&console.warn(o)}return dt[n]=i,i}async function _e(t){const e=t.toDataURL();return e==="data:,"?t.cloneNode(!1):ct(e)}async function He(t,e){if(t.currentSrc){const a=document.createElement("canvas"),o=a.getContext("2d");a.width=t.clientWidth,a.height=t.clientHeight,o==null||o.drawImage(t,0,0,a.width,a.height);const s=a.toDataURL();return ct(s)}const r=t.poster,n=Tt(r),i=await Ft(r,n,e);return ct(i)}async function je(t,e){var r;try{if(!((r=t==null?void 0:t.contentDocument)===null||r===void 0)&&r.body)return await ft(t.contentDocument.body,e,!0)}catch{}return t.cloneNode(!1)}async function Ve(t,e){return F(t,HTMLCanvasElement)?_e(t):F(t,HTMLVideoElement)?He(t,e):F(t,HTMLIFrameElement)?je(t,e):t.cloneNode(ee(t))}const We=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT",ee=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SVG";async function ze(t,e,r){var n,i;if(ee(e))return e;let a=[];return We(t)&&t.assignedNodes?a=q(t.assignedNodes()):F(t,HTMLIFrameElement)&&(!((n=t.contentDocument)===null||n===void 0)&&n.body)?a=q(t.contentDocument.body.childNodes):a=q(((i=t.shadowRoot)!==null&&i!==void 0?i:t).childNodes),a.length===0||F(t,HTMLVideoElement)||await a.reduce((o,s)=>o.then(()=>ft(s,r)).then(c=>{c&&e.appendChild(c)}),Promise.resolve()),e}function Ge(t,e,r){const n=e.style;if(!n)return;const i=window.getComputedStyle(t);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):Yt(r).forEach(a=>{let o=i.getPropertyValue(a);a==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),F(t,HTMLIFrameElement)&&a==="display"&&o==="inline"&&(o="block"),a==="d"&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(a,o,i.getPropertyPriority(a))})}function qe(t,e){F(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),F(t,HTMLInputElement)&&e.setAttribute("value",t.value)}function Xe(t,e){if(F(t,HTMLSelectElement)){const n=Array.from(e.children).find(i=>t.value===i.getAttribute("value"));n&&n.setAttribute("selected","")}}function Ke(t,e,r){return F(e,Element)&&(Ge(t,e,r),Le(t,e,r),qe(t,e),Xe(t,e)),e}async function Je(t,e){const r=t.querySelectorAll?t.querySelectorAll("use"):[];if(r.length===0)return t;const n={};for(let a=0;a<r.length;a++){const s=r[a].getAttribute("xlink:href");if(s){const c=t.querySelector(s),u=document.querySelector(s);!c&&u&&!n[s]&&(n[s]=await ft(u,e,!0))}}const i=Object.values(n);if(i.length){const a="http://www.w3.org/1999/xhtml",o=document.createElementNS(a,"svg");o.setAttribute("xmlns",a),o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.overflow="hidden",o.style.display="none";const s=document.createElementNS(a,"defs");o.appendChild(s);for(let c=0;c<i.length;c++)s.appendChild(i[c]);t.appendChild(o)}return t}async function ft(t,e,r){return!r&&e.filter&&!e.filter(t)?null:Promise.resolve(t).then(n=>Ve(n,e)).then(n=>ze(t,n,e)).then(n=>Ke(t,n,e)).then(n=>Je(n,e))}const re=/url\((['"]?)([^'"]+?)\1\)/g,Qe=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Ze=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Ye(t){const e=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")}function Ne(t){const e=[];return t.replace(re,(r,n,i)=>(e.push(i),r)),e.filter(r=>!St(r))}async function tr(t,e,r,n,i){try{const a=r?Ce(e,r):e,o=Tt(e);let s;return i||(s=await Ft(a,o,n)),t.replace(Ye(e),`$1${s}$3`)}catch{}return t}function er(t,{preferredFontFormat:e}){return e?t.replace(Ze,r=>{for(;;){const[n,,i]=Qe.exec(r)||[];if(!i)return"";if(i===e)return`src: ${n};`}}):t}function ne(t){return t.search(re)!==-1}async function ae(t,e,r){if(!ne(t))return t;const n=er(t,r);return Ne(n).reduce((a,o)=>a.then(s=>tr(s,o,e,r)),Promise.resolve(n))}async function N(t,e,r){var n;const i=(n=e.style)===null||n===void 0?void 0:n.getPropertyValue(t);if(i){const a=await ae(i,null,r);return e.style.setProperty(t,a,e.style.getPropertyPriority(t)),!0}return!1}async function rr(t,e){await N("background",t,e)||await N("background-image",t,e),await N("mask",t,e)||await N("-webkit-mask",t,e)||await N("mask-image",t,e)||await N("-webkit-mask-image",t,e)}async function nr(t,e){const r=F(t,HTMLImageElement);if(!(r&&!St(t.src))&&!(F(t,SVGImageElement)&&!St(t.href.baseVal)))return;const n=r?t.src:t.href.baseVal,i=await Ft(n,Tt(n),e);await new Promise((a,o)=>{t.onload=a,t.onerror=e.onImageErrorHandler?(...c)=>{try{a(e.onImageErrorHandler(...c))}catch(u){o(u)}}:o;const s=t;s.decode&&(s.decode=a),s.loading==="lazy"&&(s.loading="eager"),r?(t.srcset="",t.src=i):t.href.baseVal=i})}async function ar(t,e){const n=q(t.childNodes).map(i=>ie(i,e));await Promise.all(n).then(()=>t)}async function ie(t,e){F(t,Element)&&(await rr(t,e),await nr(t,e),await ar(t,e))}function ir(t,e){const{style:r}=t;e.backgroundColor&&(r.backgroundColor=e.backgroundColor),e.width&&(r.width=`${e.width}px`),e.height&&(r.height=`${e.height}px`);const n=e.style;return n!=null&&Object.keys(n).forEach(i=>{r[i]=n[i]}),t}const jt={};async function Vt(t){let e=jt[t];if(e!=null)return e;const n=await(await fetch(t)).text();return e={url:t,cssText:n},jt[t]=e,e}async function Wt(t,e){let r=t.cssText;const n=/url\(["']?([^"')]+)["']?\)/g,a=(r.match(/url\([^)]+\)/g)||[]).map(async o=>{let s=o.replace(n,"$1");return s.startsWith("https://")||(s=new URL(s,t.url).href),te(s,e.fetchRequestInit,({result:c})=>(r=r.replace(o,`url(${c})`),[o,c]))});return Promise.all(a).then(()=>r)}function zt(t){if(t==null)return[];const e=[],r=/(\/\*[\s\S]*?\*\/)/gi;let n=t.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=i.exec(n);if(c===null)break;e.push(c[0])}n=n.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(o,"gi");for(;;){let c=a.exec(n);if(c===null){if(c=s.exec(n),c===null)break;a.lastIndex=s.lastIndex}else s.lastIndex=a.lastIndex;e.push(c[0])}return e}async function or(t,e){const r=[],n=[];return t.forEach(i=>{if("cssRules"in i)try{q(i.cssRules||[]).forEach((a,o)=>{if(a.type===CSSRule.IMPORT_RULE){let s=o+1;const c=a.href,u=Vt(c).then(l=>Wt(l,e)).then(l=>zt(l).forEach(f=>{try{i.insertRule(f,f.startsWith("@import")?s+=1:i.cssRules.length)}catch(m){console.error("Error inserting rule from remote css",{rule:f,error:m})}})).catch(l=>{console.error("Error loading remote css",l.toString())});n.push(u)}})}catch(a){const o=t.find(s=>s.href==null)||document.styleSheets[0];i.href!=null&&n.push(Vt(i.href).then(s=>Wt(s,e)).then(s=>zt(s).forEach(c=>{o.insertRule(c,o.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",a)}}),Promise.all(n).then(()=>(t.forEach(i=>{if("cssRules"in i)try{q(i.cssRules||[]).forEach(a=>{r.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),r))}function sr(t){return t.filter(e=>e.type===CSSRule.FONT_FACE_RULE).filter(e=>ne(e.style.getPropertyValue("src")))}async function cr(t,e){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=q(t.ownerDocument.styleSheets),n=await or(r,e);return sr(n)}function oe(t){return t.trim().replace(/["']/g,"")}function lr(t){const e=new Set;function r(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(a=>{e.add(oe(a))}),Array.from(n.children).forEach(a=>{a instanceof HTMLElement&&r(a)})}return r(t),e}async function ur(t,e){const r=await cr(t,e),n=lr(t);return(await Promise.all(r.filter(a=>n.has(oe(a.style.fontFamily))).map(a=>{const o=a.parentStyleSheet?a.parentStyleSheet.href:null;return ae(a.cssText,o,e)}))).join(`
2
2
  `)}async function fr(t,e){const r=e.fontEmbedCSS!=null?e.fontEmbedCSS:e.skipFonts?null:await ur(t,e);if(r){const n=document.createElement("style"),i=document.createTextNode(r);n.appendChild(i),t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}}async function se(t,e={}){const{width:r,height:n}=Nt(t,e),i=await ft(t,e,!0);return await fr(i,e),await ie(i,e),ir(i,e),await Fe(i,r,n)}async function hr(t,e={}){const{width:r,height:n}=Nt(t,e),i=await se(t,e),a=await ct(i),o=document.createElement("canvas"),s=o.getContext("2d"),c=e.pixelRatio||be(),u=e.canvasWidth||r,l=e.canvasHeight||n;return o.width=u*c,o.height=l*c,e.skipAutoScale||Re(o),o.style.width=`${u}`,o.style.height=`${l}`,e.backgroundColor&&(s.fillStyle=e.backgroundColor,s.fillRect(0,0,o.width,o.height)),s.drawImage(a,0,0,o.width,o.height),o}const it=60,gr=2,mr=67108864,G=24,lt=14;function wr(t,e){const r=Math.sqrt(mr/(t*e));return Math.max(1,Math.min(gr,r))}const vr="M421.311 119.85C435.258 133.807 440.996 157.327 440.996 157.327C440.996 157.327 449.53 204.69 449.53 268.995C449.53 177.972 418.65 162.348 311.314 162.348H212.327C157.38 162.348 161.097 217.57 157.38 243.85L152.865 283.556C150.697 325.33 157.951 351.215 200.811 351.215C111.444 351.215 61.806 365.847 61.8062 239.866C61.8061 182.846 70.4043 157.327 70.4043 157.327C70.4043 157.327 76.1419 133.807 90.1183 119.85C104.095 105.877 124.809 104.475 124.809 104.475C124.809 104.475 167.579 98.0374 252.066 98.0374C336.554 98.0374 384.285 104.475 384.285 104.475C384.285 104.475 407.321 105.877 421.311 119.85Z",yr="M449.515 271.888C449.52 273.026 449.523 274.174 449.523 275.333C449.523 329.946 441.393 351.201 441.393 351.201C441.393 351.201 435.03 376.952 424.167 388.075C406.929 405.725 388.495 406.71 388.495 406.71C388.495 406.71 348.836 413.061 263.502 413.061C181.632 413.061 127.111 406.749 127.111 406.749C127.111 406.749 104.091 405.337 90.1144 391.377C76.1379 377.394 70.4004 351.201 70.4004 351.201C70.4004 351.201 61.8062 297.401 61.8062 238.506C61.806 352.055 102.131 351.374 175.525 350.133C183.56 349.998 191.992 349.855 200.811 349.855H299.787C343.122 349.855 352.906 318.315 354.792 282.196L359.32 227.093C360.526 204.443 357.608 188.362 350.507 178.012C342.765 166.722 329.575 160.987 311.314 160.987C424.974 160.987 448.73 176.216 449.515 271.888Z";function ce(){const t=G/512;return`<defs><linearGradient id="wmg0" x1="0" y1="0" x2="1" y2="1"><stop stop-color="#05D2FF"/><stop offset=".4" stop-color="#1E88E5"/><stop offset="1" stop-color="#182FFF"/></linearGradient><linearGradient id="wmg1" x1="0" y1="1" x2="1" y2="0"><stop stop-color="#24D8FF"/><stop offset=".4" stop-color="#1E88E5"/><stop offset="1" stop-color="#0046F9"/></linearGradient></defs><g transform="scale(${String(t)})"><path d="${vr}" fill="url(#wmg0)"/><path d="${yr}" fill="url(#wmg1)"/></g>`}function dr(t,e){return`<g transform="translate(${String(t)},${String(e)})" opacity="0.92">${ce()}</g>`}function le(t){const e=Se(t),r=Math.ceil(e.width)+it*2,n=Math.ceil(e.height)+it*2,i=`translate(${String(it-e.x)}px, ${String(it-e.y)}px) scale(1)`;return{width:r,height:n,style:{width:`${String(r)}px`,height:`${String(n)}px`,transform:i}}}function pr(t){let e=t;for(;e;){const r=getComputedStyle(e).backgroundColor;if(r&&r!=="transparent"&&!/^rgba\(.*,\s*0\)$/.test(r))return r;e=e.parentElement}return"#ffffff"}async function Sr(t,e,r){const{width:n,height:i,style:a}=le(e),o=await se(t,{width:n,height:i,style:a,skipFonts:!0}),c=decodeURIComponent(o.replace(/^data:image\/svg\+xml;charset=utf-8,/,"")).replace(/(<svg[^>]*>)/,`$1<rect width="100%" height="100%" fill="${r}"/>`),u=dr(n-G-lt,i-G-lt),l=c.replace(/<\/svg>\s*$/,`${u}</svg>`);return new Blob([l],{type:"image/svg+xml"})}function $r(t){return new Promise((e,r)=>{const n=new Image;n.onload=()=>{e(n)},n.onerror=()=>{r(new Error("Failed to load watermark image"))},n.src=t})}async function Cr(t,e,r){const{width:n,height:i,style:a}=le(e),o=wr(n,i),s=await hr(t,{width:n,height:i,style:a,skipFonts:!0,pixelRatio:o}),c=document.createElement("canvas");c.width=Math.round(n*o),c.height=Math.round(i*o);const u=c.getContext("2d");if(!u)throw new Error("Canvas 2D context is unavailable");u.fillStyle=r,u.fillRect(0,0,c.width,c.height),u.drawImage(s,0,0,c.width,c.height);const l=`<svg xmlns="http://www.w3.org/2000/svg" width="${String(G)}" height="${String(G)}" viewBox="0 0 ${String(G)} ${String(G)}" opacity="0.92">${ce()}</svg>`,f=await $r(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(l)}`),m=G*o;u.drawImage(f,c.width-m-lt*o,c.height-m-lt*o,m,m);const y=await new Promise(h=>{c.toBlob(h,"image/png")});if(!y)throw new Error("PNG rasterization produced no data");return y}const Er={[et.SQL]:"SQL",[et.TABLE]:"TABLE",[et.VIEW]:"VIEW",[et.TABLE_PATTERN]:"TABLE",[et.CONNECTOR]:"CONNECTOR"};function xr(t){const e=new Map,r=new Set;for(const a of t.nodes){const o=ot(a.title,a.id);let s=o,c=2;for(;r.has(s);)s=`${o}-${String(c++)}`;r.add(s),e.set(a.id,s)}const n=t.nodes.map(a=>({key:e.get(a.id)??a.id,title:a.title,inputSource:a.definitionType?Er[a.definitionType]:"TABLE",description:a.description??void 0,definition:a.status===Ut.PUBLISHED?a.definition??null:null,schema:(a.fields??[]).map(o=>({name:o.name,type:o.type,pk:o.isPrimaryKey,...o.alias&&o.alias!==o.name?{alias:o.alias}:{}})),position:t.positions.get(a.id)??{x:0,y:0},status:a.status===Ut.PUBLISHED?"created":"pending"})),i=t.edges.flatMap(a=>{const o=e.get(a.sourceId),s=e.get(a.targetId);return!o||!s?[]:[{id:a.id,from:o,to:s,keys:a.joinConditions.map(c=>({left:c.sourceFieldName,right:c.targetFieldName})),bidirectional:a.bidirectional}]});return{storageId:t.storageLabel??null,nodes:n,edges:i}}function kr(t){return{nodes:t.nodes.map(e=>({key:e.key,title:e.title,inputSource:e.inputSource,description:e.description,schema:e.schema,position:e.position,status:"pending"})),edges:t.edges.map(e=>({id:e.id,from:e.from,to:e.to,keys:e.keys,bidirectional:e.bidirectional}))}}function ue(t){const e=[];for(const[r,n]of Object.entries(t))n!=null&&(Array.isArray(n)?e.push(`${r}: [${n.map(Gt).join(", ")}]`):e.push(`${r}: ${Gt(n)}`));return e.join(`
3
3
  `)}function Gt(t){return typeof t=="number"||typeof t=="boolean"?String(t):`"${String(t).replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g," ")}"`}function $t(t){return t.replace(/\|/g,"\\|")}function Ct(t){return t.replace(/([[\]])/g,"\\$1")}const br=`
4
4
 
package/dist/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <link rel="icon" type="image/png" href="/favicon.png" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
8
  <title>OWOX</title>
9
- <script type="module" crossorigin src="/assets/index-DfxbkXTR.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-CAz55S73.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-D13201SI.css">
11
11
  </head>
12
12
  <body translate="no" class="notranslate">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owox/web",
3
- "version": "0.31.0-next-20260805164607",
3
+ "version": "0.31.0",
4
4
  "description": "Web interface for OWOX Data Marts - an open-source solution for Data Analysts",
5
5
  "author": "OWOX",
6
6
  "license": "ELv2",
@@ -11,14 +11,7 @@
11
11
  "engines": {
12
12
  "node": ">=22.22.0"
13
13
  },
14
- "keywords": [
15
- "owox",
16
- "data-marts",
17
- "web-app",
18
- "react",
19
- "typescript",
20
- "tailwind"
21
- ],
14
+ "keywords": ["owox", "data-marts", "web-app", "react", "typescript", "tailwind"],
22
15
  "homepage": "https://github.com/OWOX/owox-data-marts",
23
16
  "repository": {
24
17
  "type": "git",
@@ -29,9 +22,7 @@
29
22
  "url": "https://github.com/OWOX/owox-data-marts/issues"
30
23
  },
31
24
  "main": "./dist/index.html",
32
- "files": [
33
- "dist"
34
- ],
25
+ "files": ["dist"],
35
26
  "scripts": {
36
27
  "build": "tsc -b && vite build",
37
28
  "dev": "vite --config vite.config.ts",