From c50898f4ec4afb117ad23791cfcc0e1532890f89 Mon Sep 17 00:00:00 2001 From: Jelmer Veen Date: Mon, 8 Jul 2024 14:09:57 +0200 Subject: [PATCH] feat: added placeholder for sorting icon, so it does not change width when sorting --- dist/flightkit-v0.0.8/flightkit.min.js | 1 - .../flightkit.js | 10 ++++++++-- dist/flightkit-v0.0.9/flightkit.min.js | 1 + docs/cdn/ibiss-v0.0.9/avian.min.css | 1 + docs/cdn/ibiss-v0.0.9/flightkit.min.js | 1 + docs/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js | 1 + docs/cdn/ibiss-v0.0.9/rocket.min.js | 1 + docs/js/flightkit.min.js | 2 +- documentation/public/cdn/ibiss-v0.0.9/avian.min.css | 1 + documentation/public/cdn/ibiss-v0.0.9/flightkit.min.js | 1 + .../public/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js | 1 + documentation/public/cdn/ibiss-v0.0.9/rocket.min.js | 1 + documentation/public/js/flightkit.min.js | 2 +- flightkit/components/table.js | 10 ++++++++-- package.json | 4 ++-- 15 files changed, 29 insertions(+), 9 deletions(-) delete mode 100644 dist/flightkit-v0.0.8/flightkit.min.js rename dist/{flightkit-v0.0.8 => flightkit-v0.0.9}/flightkit.js (99%) create mode 100644 dist/flightkit-v0.0.9/flightkit.min.js create mode 100644 docs/cdn/ibiss-v0.0.9/avian.min.css create mode 100644 docs/cdn/ibiss-v0.0.9/flightkit.min.js create mode 100644 docs/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js create mode 100644 docs/cdn/ibiss-v0.0.9/rocket.min.js create mode 100644 documentation/public/cdn/ibiss-v0.0.9/avian.min.css create mode 100644 documentation/public/cdn/ibiss-v0.0.9/flightkit.min.js create mode 100644 documentation/public/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js create mode 100644 documentation/public/cdn/ibiss-v0.0.9/rocket.min.js diff --git a/dist/flightkit-v0.0.8/flightkit.min.js b/dist/flightkit-v0.0.8/flightkit.min.js deleted file mode 100644 index af4f23f..0000000 --- a/dist/flightkit-v0.0.8/flightkit.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";function i(e,t){if(!t||0===t.length)return e;const s=Object.assign([],e);if(Array.isArray(s[0])){e=s;var n=t;const r=[];for(const i of e)r.push(i.sort(E(n)));r}else s.sort(E(t));return s}function y(e){let t=e.toString();e=t.match(/^\d+|\d+$/);return e?parseInt(e[0]):null}function b(e){return"boolean"==typeof e||"string"==typeof e&&("true"===(e=e.toLocaleLowerCase())||"false"===e)}function w(e){return"boolean"==typeof e?e:"true"===e.toLocaleLowerCase()}function E(f,v=0){return function(e,t){var{propertyName:s,direction:d}=f[v];let n=null===e[s]||void 0===e[s]?"":e[s],r=null===t[s]||void 0===t[s]?"":t[s];const h=/^(\d{1,4}-\d{1,4}-\d{1,4}(T)?)/gim;var s=n instanceof Date&&r instanceof Date||h.test(n)&&h.test(r),p=(s&&(n=n instanceof Date?n.valueOf():new Date(Date.parse(n)),r=r instanceof Date?r.valueOf():new Date(Date.parse(r))),b(n)&&b(r)),u=!p&&!isNaN(n)&&!isNaN(r),i=y(n),o=y(r);u?(n=parseFloat(n).toPrecision(12),r=parseFloat(r).toPrecision(12)):null!==i&&null!==o&&(n=parseFloat(i).toPrecision(12),r=parseFloat(o).toPrecision(12)),p&&(n=w(n),r=w(r));let a,l;switch(d){case"descending":case"desc":a=r,l=n;break;default:a=n,l=r}let c=0;if(p||s||u)c=a-l;else{a=a.toString().trim().toLowerCase(),l=l.toString().trim().toLowerCase();const m=/\d/gim;i=m.test(n)&&m.test(r);c=i?a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"}):a.localeCompare(l)}o=v+1;if(0===c&&o(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),s=t.split("-")[0];return window.$flightkitUUIDStore||(window.$flightkitUUIDStore=[]),window.$flightkitUUIDStore.some(e=>e===s)?e():(window.$flightkitUUIDStore.push(s),s)}()}render(t){if(!t.component)throw new Error("Component is not assigned! Can't render");t.id=t.id||this.generateId();var e=this._getAllEventAttributes(t);if(e){var s="#"+t.id;for(const i of e){var n="e-"+i;this.addEvent(s,i,t.getAttribute(n))}}var r=Object.keys(t.classList).length;if(r){for(let e=0;e{this._assignToDom(t,t.component),clearTimeout(this._renderTimer)},10)}addEvent(e,t,s){this._events.push({selector:e,eventType:t,callback:s})}_getExternalCallback(e){let t=void 0;for(const s of e.split("."))t=(t||window)[s];return t}_getAllEventAttributes(e){e=e.attributes;const t=Array.from(e).filter(e=>e.name.startsWith("e-"));return t.map(e=>e.name.slice(2))}_isFlightkitElement(e){return e.toUpperCase().includes("FLK-")}_outerEventHandler(e){const t=h(e),s=(t.contents=e.detail,t.target.getAttribute("e-"+t.type));let n=void 0;for(const r of s.split("."))n=(n||window)[r];return e.preventDefault(),e.stopPropagation(),n(t)}_addEvents(e){if(e.isConnected)for(const s of this._events)if(s.selector.startsWith("."))for(const n of document.querySelectorAll(s.selector))this._addEventToElement(s,n);else{var t=document.querySelector(s.selector);this._addEventToElement(s,t)}}_addEventToElement(e,t){t&&("function"==typeof e.callback?(t.removeEventListener(e.eventType,e.callback),t.addEventListener(e.eventType,e.callback)):(t.removeEventListener(e.eventType,this._outerEventHandler),t.addEventListener(e.eventType,this._outerEventHandler)))}removeEvents(){for(const t of this._events)if(t.selector.startsWith("."))for(const s of document.querySelectorAll(t.selector))this._addEventToElement(t,s);else{var e=document.querySelector(t.selector);this._addEventToElement(t,e)}this._events=[]}_removeEventToElement(e,t){t&&("function"==typeof e.callback?t.removeEventListener(e.eventType,e.callback):t.removeEventListener(e.eventType,this._outerEventHandler))}_assignToDom(e,t){e.innerHTML="";for(const n of Array.isArray(t)?t:[t])e.append(n);const s=setTimeout(()=>{this._addEvents(e),clearTimeout(s)},10)}}const u='',m='';function l(e){const t=new DOMParser;return t.parseFromString(e,"image/svg+xml").documentElement}class e extends HTMLElement{base;component=null;_contents=[];_orderBy=[];properties=new Set;_columnOrder=[];_filter="";_selectionProperty="";_selectedIds=new Set;uniqueEntriesByProperties={};propertyLabelDictionary={};_templates={};_templateClasses={};static get observedAttributes(){return["contents","columns","order","filter","selection-property","templates"]}get columnOrder(){return this._columnOrder.length?this._columnOrder:this.properties}set columnOrder(e){let t;"string"==typeof e&&(t=e.split(",")),t=e,this._columnOrder=t}get contents(){return this._contents}set contents(e){this.analyzeData(e),this._contents=e}get orderBy(){return this._orderBy}set orderBy(e){if(Array.isArray(e))this._orderBy=e;else{const n=[];for(const r of e.split(",")){var t=r.split("|"),s=t[0],t=1e[s._selectionProperty])):new Set;e=t?s.contents.execute():[];s._emit("select",s,{selection:e}),s._updateCheckboxes(s)}emitSelect(e){var t=e.target.checked,s=e.target.dataset.objectId;const n=h(e).target,r=(t?n._selectedIds.add(s):n._selectedIds.delete(s),n._selectionProperty);e=n.contents.execute().filter(e=>n._selectedIds.has(e[r]));n._emit("select",n,{selection:e}),n._updateCheckboxes(n)}sortData(e){const t=h(e).target,s=p(e,"column");s&&(-1<(e=t._orderBy.findIndex(e=>e.propertyName===s))?"asc"===t._orderBy[e].direction?t._orderBy[e].direction="desc":t._orderBy.splice(e,1):t._orderBy.push({propertyName:s,direction:"asc"}),t.createHtml(),t.base.render(t))}setColumnOrder(e){this._columnOrder=e?Array.isArray(e)?e:e.split(","):[]}analyzeData(t){this.properties=new Set;var s=t.length;for(let e=0;e"_"===e?" ":" "+e.toLowerCase()).trim();var s=t.charAt(0).toUpperCase()+t.slice(1);return this.propertyLabelDictionary[e]=s}parseTemplate(e,n){return e.replace(/\{\{([\s\S]+?)\}\}/gim,(e,t)=>{let s="";t=t.trim();t=n[t];return t&&(s=t),Array.isArray(s)?s.join(", "):s.toString().trim()})}createSelectionCheckbox(e){const t=document.createElement("input");return t.setAttribute("type","checkbox"),t.classList.add("flk-selection-checkbox"),e&&(t.dataset.selected=e[this._selectionProperty]),t}createRow(e){const t=document.createElement("tr");if(this._selectionProperty.length){const r=document.createElement("td");var s=this.base.generateId();const i=this.createSelectionCheckbox(e);i.id=s,i.dataset.objectId=e[this._selectionProperty];var n=e[this._selectionProperty];this._selectedIds.has(n)?i.checked=!0:i.checked=!1,this.base.addEvent("#"+s,"change",this.emitSelect),r.append(i),t.append(r)}for(const o of this.columnOrder){const a=document.createElement("td");this._templates[o]?(a.innerHTML=this.parseTemplate(this._templates[o],e),this._templateClasses[o]&&a.classList.add(...this._templateClasses[o])):a.innerText=e[o],t.append(a)}return t}createBody(e){const t=document.createElement("tbody");for(const n of e){var s=this.createRow(n,null);t.append(s)}return t}createHead(){const e=document.createElement("thead"),t=document.createElement("tr");if(t.classList.add("cursor-pointer"),this._selectionProperty.length){const r=document.createElement("th");var s=this.base.generateId();const i=this.createSelectionCheckbox();i.id=s;var d=this.contents.execute().length;0e.propertyName===o);if(n){const c=document.createElement("span");c.innerHTML="asc"===n.direction?'':'',a.append(c)}t.append(a)}return e.append(t),e}addEvent(e,t,s){this.base.addEvent(e,t,s)}init(){this.createHtml(),this.base.render(this)}}class t extends HTMLElement{base;componentId;constructor(){super(),this.base=new r}connectedCallback(){var e=this.getAttribute("top"),t=this.getAttribute("left"),s=this.getAttribute("center"),n=this.getAttribute("zIndex");this.id||(this.id=this.base.generateId()),this.style.display="block",this.style.position="fixed","string"==typeof s?(this.style.top=e||"50%",this.style.left="50%",this.style.transform="translate(-50%, -50%)"):(this.style.top=e||this.clientTop+"px",this.style.left=t||this.clientLeft+"px"),n&&(this.style.zIndex=n),this.componentId=this.getAttribute("handle");const r=document.createElement("div");r.innerHTML=this.innerHTML,this.component=r;s="#"+(this.componentId||this.id);this.base.addEvent(s,"mousedown",this._dragElement),this.base.addEvent(s,"mouseup",this._reset),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this)}_dragElement(e){const s=h(e,"flk-draggable").target;let n,r;function t(e){n=e.clientX-s.offsetLeft,r=e.clientY-s.offsetTop}function i(e){var t=e.clientX-n,e=e.clientY-r;s.style.left=t+"px",s.style.top=e+"px"}function o(e){e.preventDefault()}function a(){s.removeAttribute("draggable"),s.removeEventListener("dragstart",t),s.removeEventListener("dragend",a),document.removeEventListener("dragover",o),document.removeEventListener("drop",i)}s.setAttribute("draggable",!0),s.addEventListener("dragstart",t),s.addEventListener("dragend",a),document.addEventListener("dragover",o),document.addEventListener("drop",i)}}class s extends HTMLElement{_id;base;_draggableId;constructor(){super(),this.base=new r}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}_closeModal(e){e.stopPropagation();const t=h(e,"flk-modal").target;t.classList.add("hidden")}closeModal(e){this.classList.add("hidden")}openModal(e=!0){const t=document.getElementById(this._draggableId);e&&(t.style.top="40%",t.style.left="50%"),this.classList.remove("hidden")}connectedCallback(){this.id||(this.id=this.base.generateId());const e=document.createElement("div");var t=this.base.generateId();const s=document.createElement("flk-draggable"),n=(this._draggableId=this.base.generateId(),s.id=this._draggableId,s.setAttribute("center",""),s.setAttribute("top","40%"),s.setAttribute("handle",t),s.setAttribute("zIndex","1080"),s.classList.add("border","shadow-lg","bg-white"),s.style.width="max-content",document.createElement("div"));var r=this.getAttribute("modal-title");if(r){const c=document.createElement("span");c.innerText=r,c.classList.add("ml-1","mr-auto"),n.append(c)}n.id=t;const i=this.getAttribute("header-class");let o=[];i?o=o.concat(i.split(" ")):o.push("bg-gray-light"),n.classList.add(...o,"border-bottom","row","justify-end","cursor-no-select");r=this.base.generateId();const a=document.createElement("button"),l=(a.classList.add("py-0","px-1","outline-hover","no-border","cursor-default",...o),a.innerText="X",a.id=r,n.append(a),s.append(n),document.createElement("div"));l.innerHTML=this.innerHTML,s.append(l),e.append(s),this.component=e,this.base.addEvent("#"+r,"click",this._closeModal),this.base.render(this),this.classList.add("hidden")}disconnectedCallback(){this.base.removeEvents(this)}}class n extends HTMLElement{base;_buttonId;_drawerId;_iconId;constructor(){super(),this.base=new r}connectedCallback(){this.style.position="relative",this.style.display="flex",this.style.width="fit-content",this._buttonId=this.base.generateId();const e=document.createElement("button"),t=(e.setAttribute("type","button"),e.classList.add("row"),e.id=this._buttonId,document.createElement("span")),s=(t.classList.add("self-align-center"),t.innerText=this.getAttribute("text"),this._iconId=this.base.generateId(),document.createElement("span"));s.classList.add("self-align-center");var n=l('');const r=l(''),i=(r.classList.add("hidden"),s.append(n,r),s.id=this._iconId,e.append(t,s),this._drawerId=this.base.generateId(),document.createElement("div"));i.id=this._drawerId,i.classList.add("shadow","inline-block","bg-white"),i.style.position="absolute",i.style.zIndex="1040";n=this.querySelector("template");n.innerHTML.length?i.innerHTML=n.innerHTML:i.append(n.firstChild),i.style.display="none",this.component=[e,i],this.base.addEvent("#"+this._buttonId,"click",this.toggleMenu);const o=document.querySelector("body");""!==o.getAttribute("flk-close-dropdown")&&(o.setAttribute("flk-close-dropdown",""),o.addEventListener("click",this.closeAllDropdownButtons)),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this);var e=document.querySelectorAll("flk-dropdown");if(!e||!e.length){const t=document.querySelector("body");t.removeAttribute("flk-close-dropdown"),t.removeEventListener("click",this.closeAllDropdownButtons)}}toggleMenu(e){const t=h(e).target;e=t._drawerId;const s=document.getElementById(e);var e="none"!==s.style.display,n=(s.style.display=e?"none":"block",t.getAttribute("drawer-width")),n=("string"==typeof t.getAttribute("right")&&(s.style.right="0px"),s.style.top=t.offsetHeight+"px",s.style.width=n||t.offsetWidth+"px",t._iconId);const r=document.getElementById(n);e?(r.childNodes[0].classList.remove("hidden"),r.childNodes[1].classList.add("hidden")):(r.childNodes[0].classList.add("hidden"),r.childNodes[1].classList.remove("hidden"))}_closeDropdown(){var e=this._drawerId;const t=document.getElementById(e);if("none"!==t.style.display){e=this._iconId;const s=document.getElementById(e);t.style.display="none",s.childNodes[0].classList.remove("hidden"),s.childNodes[1].classList.add("hidden")}}closeAllDropdownButtons(e){var t,s=h(e,"flk-dropdown").target,e=document.querySelectorAll("flk-dropdown");if(s)for(const n of e)s._buttonId!==n._buttonId&&(t=n._drawerId,"none"!==document.getElementById(t).style.display&&n._closeDropdown());else for(const r of e)r._closeDropdown()}}class o extends HTMLElement{base;contents;component;listType="ul";iconSet;filter={value:"",caseSensitive:!1};selectedElements=[];static get observedAttributes(){return["contents","icon-set","max-depth","filter"]}_jsonToValueArray(e){let t=JSON.stringify(e);t=t.replace(/[\[\]{}\"]/g,"");let s=[];for(const n of t.split(","))s=s.concat(n.split(":"));return[...new Set(s)]}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}constructor(){super(),this.base=new r,this.setContents(this.getAttribute("contents")),this.iconSet=this.getAttribute("icon-set")?this.getAttribute("icon-type"):"file",this.maxDepth=this.getAttribute("max-depth")?parseInt(this.getAttribute("max-depth")):-1,this.setFilter(this.getAttribute("filter")),this.style.display="block",this.style.maxWidth="fit-content",this.style.margin="0 1rem 0 0",this.base.addEvent(".flk-branch","click",this.emitNodeToggle)}deselectTree(){if(this.selectedElements.length)for(const e of this.selectedElements)e.classList.remove("font-weight-bold"),delete e.dataset.selected}emitNodeToggle(e){if(e.stopPropagation(),["LI","UL"].includes(e.target.tagName))return!1;const t=h(e,"flk-tree-nav").target,s=p(e,"branchKey");let n=t.contents;const r=s.split(".");for(const a of r)if(n[a])n=n[a];else if(null===n[a])n=null;else{let e=[];for(const l of n)l[a]&&e.push(l[a]);n=e}let i,o=e.target;for(;o.dataset&&o.dataset.leafKey?i=o.dataset.leafKey:o=o.parentNode||o.parentElement,!i;);t.selectedElements.length&&t.deselectTree(),t.selectedElements=[],"DETAILS"===o.tagName?(t.selectedElements.push(o.childNodes[0]),o.childNodes.length&&o.childNodes[0].childNodes.length&&"DIV"===o.childNodes[0].childNodes[0].tagName&&(console.log(o.childNodes[0].childNodes),t.selectedElements=o.childNodes[0].childNodes[0].childNodes)):t.selectedElements.push(o);for(const c of t.selectedElements)c.dataset.selected||(c.classList.add("font-weight-bold"),c.dataset.selected=!0);var e=s.substring(s.indexOf(".")+1),d=t.createLeafText(r.reverse()[0]);t._emit("tree-click",t,{path:e,data:n,key:i,label:(d.titleText+" "+d.commentText).trim(),branch:"object"==typeof n})}convertJsonKeyToTitle(e){if(!e)return"";const t=(e="string"!=typeof e?e.toString():e).replace(/([A-Z_])/g,e=>"_"===e?" ":" "+e).trim();return t.charAt(0).toUpperCase()+t.slice(1)}setContents(e){var t=e||this.contents||[];try{switch(typeof t){case"string":this.contents=JSON.parse(t);break;case"object":Array.isArray(t)?this.contents=t:this.contents=[t]}}catch(e){console.log(e)}}applyFilter(e){let t;var s="details"===e.tagName.toLowerCase();t=this.filter.caseSensitive?e.dataset.branchValues.includes(this.filter.value):e.dataset.branchValues.toLowerCase().includes(this.filter.value.toLowerCase()),t?e.parentElement.classList.remove("hidden"):e.parentElement.classList.add("hidden"),s&&t?e.setAttribute("open",""):e.removeAttribute("open")}resetTree(e){e.parentElement.classList.remove("hidden"),e.removeAttribute("open")}filterTree(){let t=setTimeout(()=>{for(const e of this.querySelectorAll("[data-branch-values]"))void 0===this.filter.value||0===this.filter.value.length?this.resetTree(e):this.applyFilter(e);clearTimeout(t)},10)}setFilter(e){const t=e||{};try{switch(typeof t){case"string":t.includes("{")?(this.filter=JSON.parse(t),!1===this.filter.caseSensitive&&(this.filter.value=this.filter.value.toLowerCase())):this.filter.value=e.toLowerCase();break;case"object":this.filter=t}}catch(e){console.log(e)}this.filterTree()}createLeafText(e){var t,s;let n="",r="";return"string"==typeof e&&(e.includes("(")||e.includes("["))?(s=e.indexOf("("),s=-1===(t=e.indexOf("["))?s:t,n=this.convertJsonKeyToTitle(e.substring(0,s)),r=e.substring(s)):n=this.convertJsonKeyToTitle(e),{titleText:n,commentText:r}}createTextTag(n,r){n=this.createLeafText(n);if(n.commentText){let e=document.createElement("div"),t=document.createElement("span"),s=(t.innerText=n.titleText,document.createElement("small"));s.innerText=n.commentText,s.style.marginLeft="1rem",e.append(t,s),e.style.display="inline-flex",e.style.alignItems="center",r.append(e)}else r.innerText=n.titleText}createLeaf(e,t,s,n=[]){let r=document.createElement("li");r.classList.add("cursor-no-select"),r.style.marginTop="0.4rem",r.dataset.branchKey=s;const i="file"===this.iconSet?'':'';r.style.listStyleImage=`url('data:image/svg+xml,${i}')`,r.style.position="relative",r.style.left="2px";let o=document.createElement("span");s=[e].concat(n);if(o.dataset.branchValues=[...new Set(s)].join(),o.dataset.leafKey=s[0],this.createTextTag(e,o),o.style.position="relative",o.style.top="-3px",r.append(o),t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);const i="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${i}')`,e.append(r),t.append(e)}else t.append(r)}createBranch(s,t,n,r){if(r===this.maxDepth&&"object"==typeof s)for(const o of Array.isArray(s)?s:Object.keys(s)){let e;s[o]&&(e=this._jsonToValueArray(s[o])),this.createLeaf(o,t,n+"."+o,e)}else if(Array.isArray(s))for(var e in s){var d=document.createElement(this.listType);t.append(this.createBranch(s[e],d,n+"."+e,r+1))}else if(null!==s&&"object"==typeof s){const a=[];for(const l of Object.keys(s)){let e=document.createElement("li"),t=(e.classList.add("cursor-no-select"),e.style.position="relative",e.style.left="2px",e.dataset.branchKey=n+"."+l,document.createElement("details"));t.classList.add("flk-branch"),t.dataset.branchValues=[l].concat(this._jsonToValueArray(s[l])),t.style.position="relative",t.style.top="-3px",t.classList.add("cursor-default");var i=document.createElement("summary");this.createTextTag(l,i),t.dataset.leafKey=l,t.append(i),e.append(this.createBranch(s[l],t,n+"."+l,r+1)),a.push(e)}if(t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);var h="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${h}')`;for(const c of a)e.append(c);t.append(e)}else for(const p of a)t.append(p)}else this.createLeaf(s,t,n);return t}createHtml(){let e=document.createElement(this.listType);var t="file"===this.iconSet?u:'';if(e.style.listStyleImage=`url('data:image/svg+xml,${t}')`,e.style.marginLeft="3rem",this.contents.length){for(const s in this.contents)e=this.createBranch(this.contents[s],e,s,0);this.component=e}else this.component=e}attributeChangedCallback(e,t,s){switch(e){case"contents":this.setContents(s);break;case"icon-set":this.iconSet=s;break;case"max-depth":this.maxDepth="string"==typeof s?parseInt(s):s;break;case"filter":this.setFilter(s)}this.init()}connectedCallback(){this.init()}disconnectedCallback(){this.base.removeEvents(this)}init(){this.createHtml(),this.base.render(this)}}customElements.define("flk-table",e),customElements.define("flk-draggable",t),customElements.define("flk-modal",s),customElements.define("flk-dropdown",n),customElements.define("flk-tree-nav",o)}(); \ No newline at end of file diff --git a/dist/flightkit-v0.0.8/flightkit.js b/dist/flightkit-v0.0.9/flightkit.js similarity index 99% rename from dist/flightkit-v0.0.8/flightkit.js rename to dist/flightkit-v0.0.9/flightkit.js index 271acc4..7bc3091 100644 --- a/dist/flightkit-v0.0.8/flightkit.js +++ b/dist/flightkit-v0.0.9/flightkit.js @@ -954,11 +954,17 @@ this.base.addEvent(`#${thId}`, 'click', this.sortData); const orderProperties = this.orderBy.find(obp => obp.propertyName === header); + const iconElement = document.createElement('span'); if (orderProperties) { - const iconElement = document.createElement('span'); iconElement.innerHTML = orderProperties.direction === 'asc' ? sortAscendingIcon : sortDescendingIcon; - thCell.append(iconElement); } + else { + iconElement.style.display = 'inline-block'; + iconElement.style.width = "24px"; + } + + thCell.append(iconElement); + headerRow.append(thCell); } tableHead.append(headerRow); diff --git a/dist/flightkit-v0.0.9/flightkit.min.js b/dist/flightkit-v0.0.9/flightkit.min.js new file mode 100644 index 0000000..19d801c --- /dev/null +++ b/dist/flightkit-v0.0.9/flightkit.min.js @@ -0,0 +1 @@ +!function(){"use strict";function i(e,t){if(!t||0===t.length)return e;const s=Object.assign([],e);if(Array.isArray(s[0])){e=s;var n=t;const r=[];for(const i of e)r.push(i.sort(E(n)));r}else s.sort(E(t));return s}function v(e){let t=e.toString();e=t.match(/^\d+|\d+$/);return e?parseInt(e[0]):null}function b(e){return"boolean"==typeof e||"string"==typeof e&&("true"===(e=e.toLocaleLowerCase())||"false"===e)}function w(e){return"boolean"==typeof e?e:"true"===e.toLocaleLowerCase()}function E(f,y=0){return function(e,t){var{propertyName:s,direction:d}=f[y];let n=null===e[s]||void 0===e[s]?"":e[s],r=null===t[s]||void 0===t[s]?"":t[s];const h=/^(\d{1,4}-\d{1,4}-\d{1,4}(T)?)/gim;var s=n instanceof Date&&r instanceof Date||h.test(n)&&h.test(r),p=(s&&(n=n instanceof Date?n.valueOf():new Date(Date.parse(n)),r=r instanceof Date?r.valueOf():new Date(Date.parse(r))),b(n)&&b(r)),u=!p&&!isNaN(n)&&!isNaN(r),i=v(n),o=v(r);u?(n=parseFloat(n).toPrecision(12),r=parseFloat(r).toPrecision(12)):null!==i&&null!==o&&(n=parseFloat(i).toPrecision(12),r=parseFloat(o).toPrecision(12)),p&&(n=w(n),r=w(r));let a,l;switch(d){case"descending":case"desc":a=r,l=n;break;default:a=n,l=r}let c=0;if(p||s||u)c=a-l;else{a=a.toString().trim().toLowerCase(),l=l.toString().trim().toLowerCase();const m=/\d/gim;i=m.test(n)&&m.test(r);c=i?a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"}):a.localeCompare(l)}o=y+1;if(0===c&&o(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),s=t.split("-")[0];return window.$flightkitUUIDStore||(window.$flightkitUUIDStore=[]),window.$flightkitUUIDStore.some(e=>e===s)?e():(window.$flightkitUUIDStore.push(s),s)}()}render(t){if(!t.component)throw new Error("Component is not assigned! Can't render");t.id=t.id||this.generateId();var e=this._getAllEventAttributes(t);if(e){var s="#"+t.id;for(const i of e){var n="e-"+i;this.addEvent(s,i,t.getAttribute(n))}}var r=Object.keys(t.classList).length;if(r){for(let e=0;e{this._assignToDom(t,t.component),clearTimeout(this._renderTimer)},10)}addEvent(e,t,s){this._events.push({selector:e,eventType:t,callback:s})}_getExternalCallback(e){let t=void 0;for(const s of e.split("."))t=(t||window)[s];return t}_getAllEventAttributes(e){e=e.attributes;const t=Array.from(e).filter(e=>e.name.startsWith("e-"));return t.map(e=>e.name.slice(2))}_isFlightkitElement(e){return e.toUpperCase().includes("FLK-")}_outerEventHandler(e){const t=h(e),s=(t.contents=e.detail,t.target.getAttribute("e-"+t.type));let n=void 0;for(const r of s.split("."))n=(n||window)[r];return e.preventDefault(),e.stopPropagation(),n(t)}_addEvents(e){if(e.isConnected)for(const s of this._events)if(s.selector.startsWith("."))for(const n of document.querySelectorAll(s.selector))this._addEventToElement(s,n);else{var t=document.querySelector(s.selector);this._addEventToElement(s,t)}}_addEventToElement(e,t){t&&("function"==typeof e.callback?(t.removeEventListener(e.eventType,e.callback),t.addEventListener(e.eventType,e.callback)):(t.removeEventListener(e.eventType,this._outerEventHandler),t.addEventListener(e.eventType,this._outerEventHandler)))}removeEvents(){for(const t of this._events)if(t.selector.startsWith("."))for(const s of document.querySelectorAll(t.selector))this._addEventToElement(t,s);else{var e=document.querySelector(t.selector);this._addEventToElement(t,e)}this._events=[]}_removeEventToElement(e,t){t&&("function"==typeof e.callback?t.removeEventListener(e.eventType,e.callback):t.removeEventListener(e.eventType,this._outerEventHandler))}_assignToDom(e,t){e.innerHTML="";for(const n of Array.isArray(t)?t:[t])e.append(n);const s=setTimeout(()=>{this._addEvents(e),clearTimeout(s)},10)}}const u='',m='';function l(e){const t=new DOMParser;return t.parseFromString(e,"image/svg+xml").documentElement}class e extends HTMLElement{base;component=null;_contents=[];_orderBy=[];properties=new Set;_columnOrder=[];_filter="";_selectionProperty="";_selectedIds=new Set;uniqueEntriesByProperties={};propertyLabelDictionary={};_templates={};_templateClasses={};static get observedAttributes(){return["contents","columns","order","filter","selection-property","templates"]}get columnOrder(){return this._columnOrder.length?this._columnOrder:this.properties}set columnOrder(e){let t;"string"==typeof e&&(t=e.split(",")),t=e,this._columnOrder=t}get contents(){return this._contents}set contents(e){this.analyzeData(e),this._contents=e}get orderBy(){return this._orderBy}set orderBy(e){if(Array.isArray(e))this._orderBy=e;else{const n=[];for(const r of e.split(",")){var t=r.split("|"),s=t[0],t=1e[s._selectionProperty])):new Set;e=t?s.contents.execute():[];s._emit("select",s,{selection:e}),s._updateCheckboxes(s)}emitSelect(e){var t=e.target.checked,s=e.target.dataset.objectId;const n=h(e).target,r=(t?n._selectedIds.add(s):n._selectedIds.delete(s),n._selectionProperty);e=n.contents.execute().filter(e=>n._selectedIds.has(e[r]));n._emit("select",n,{selection:e}),n._updateCheckboxes(n)}sortData(e){const t=h(e).target,s=p(e,"column");s&&(-1<(e=t._orderBy.findIndex(e=>e.propertyName===s))?"asc"===t._orderBy[e].direction?t._orderBy[e].direction="desc":t._orderBy.splice(e,1):t._orderBy.push({propertyName:s,direction:"asc"}),t.createHtml(),t.base.render(t))}setColumnOrder(e){this._columnOrder=e?Array.isArray(e)?e:e.split(","):[]}analyzeData(t){this.properties=new Set;var s=t.length;for(let e=0;e"_"===e?" ":" "+e.toLowerCase()).trim();var s=t.charAt(0).toUpperCase()+t.slice(1);return this.propertyLabelDictionary[e]=s}parseTemplate(e,n){return e.replace(/\{\{([\s\S]+?)\}\}/gim,(e,t)=>{let s="";t=t.trim();t=n[t];return t&&(s=t),Array.isArray(s)?s.join(", "):s.toString().trim()})}createSelectionCheckbox(e){const t=document.createElement("input");return t.setAttribute("type","checkbox"),t.classList.add("flk-selection-checkbox"),e&&(t.dataset.selected=e[this._selectionProperty]),t}createRow(e){const t=document.createElement("tr");if(this._selectionProperty.length){const r=document.createElement("td");var s=this.base.generateId();const i=this.createSelectionCheckbox(e);i.id=s,i.dataset.objectId=e[this._selectionProperty];var n=e[this._selectionProperty];this._selectedIds.has(n)?i.checked=!0:i.checked=!1,this.base.addEvent("#"+s,"change",this.emitSelect),r.append(i),t.append(r)}for(const o of this.columnOrder){const a=document.createElement("td");this._templates[o]?(a.innerHTML=this.parseTemplate(this._templates[o],e),this._templateClasses[o]&&a.classList.add(...this._templateClasses[o])):a.innerText=e[o],t.append(a)}return t}createBody(e){const t=document.createElement("tbody");for(const n of e){var s=this.createRow(n,null);t.append(s)}return t}createHead(){const e=document.createElement("thead"),t=document.createElement("tr");if(t.classList.add("cursor-pointer"),this._selectionProperty.length){const r=document.createElement("th");var s=this.base.generateId();const i=this.createSelectionCheckbox();i.id=s;var d=this.contents.execute().length;0e.propertyName===o);const c=document.createElement("span");n?c.innerHTML="asc"===n.direction?'':'':(c.style.display="inline-block",c.style.width="24px"),a.append(c),t.append(a)}return e.append(t),e}addEvent(e,t,s){this.base.addEvent(e,t,s)}init(){this.createHtml(),this.base.render(this)}}class t extends HTMLElement{base;componentId;constructor(){super(),this.base=new r}connectedCallback(){var e=this.getAttribute("top"),t=this.getAttribute("left"),s=this.getAttribute("center"),n=this.getAttribute("zIndex");this.id||(this.id=this.base.generateId()),this.style.display="block",this.style.position="fixed","string"==typeof s?(this.style.top=e||"50%",this.style.left="50%",this.style.transform="translate(-50%, -50%)"):(this.style.top=e||this.clientTop+"px",this.style.left=t||this.clientLeft+"px"),n&&(this.style.zIndex=n),this.componentId=this.getAttribute("handle");const r=document.createElement("div");r.innerHTML=this.innerHTML,this.component=r;s="#"+(this.componentId||this.id);this.base.addEvent(s,"mousedown",this._dragElement),this.base.addEvent(s,"mouseup",this._reset),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this)}_dragElement(e){const s=h(e,"flk-draggable").target;let n,r;function t(e){n=e.clientX-s.offsetLeft,r=e.clientY-s.offsetTop}function i(e){var t=e.clientX-n,e=e.clientY-r;s.style.left=t+"px",s.style.top=e+"px"}function o(e){e.preventDefault()}function a(){s.removeAttribute("draggable"),s.removeEventListener("dragstart",t),s.removeEventListener("dragend",a),document.removeEventListener("dragover",o),document.removeEventListener("drop",i)}s.setAttribute("draggable",!0),s.addEventListener("dragstart",t),s.addEventListener("dragend",a),document.addEventListener("dragover",o),document.addEventListener("drop",i)}}class s extends HTMLElement{_id;base;_draggableId;constructor(){super(),this.base=new r}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}_closeModal(e){e.stopPropagation();const t=h(e,"flk-modal").target;t.classList.add("hidden")}closeModal(e){this.classList.add("hidden")}openModal(e=!0){const t=document.getElementById(this._draggableId);e&&(t.style.top="40%",t.style.left="50%"),this.classList.remove("hidden")}connectedCallback(){this.id||(this.id=this.base.generateId());const e=document.createElement("div");var t=this.base.generateId();const s=document.createElement("flk-draggable"),n=(this._draggableId=this.base.generateId(),s.id=this._draggableId,s.setAttribute("center",""),s.setAttribute("top","40%"),s.setAttribute("handle",t),s.setAttribute("zIndex","1080"),s.classList.add("border","shadow-lg","bg-white"),s.style.width="max-content",document.createElement("div"));var r=this.getAttribute("modal-title");if(r){const c=document.createElement("span");c.innerText=r,c.classList.add("ml-1","mr-auto"),n.append(c)}n.id=t;const i=this.getAttribute("header-class");let o=[];i?o=o.concat(i.split(" ")):o.push("bg-gray-light"),n.classList.add(...o,"border-bottom","row","justify-end","cursor-no-select");r=this.base.generateId();const a=document.createElement("button"),l=(a.classList.add("py-0","px-1","outline-hover","no-border","cursor-default",...o),a.innerText="X",a.id=r,n.append(a),s.append(n),document.createElement("div"));l.innerHTML=this.innerHTML,s.append(l),e.append(s),this.component=e,this.base.addEvent("#"+r,"click",this._closeModal),this.base.render(this),this.classList.add("hidden")}disconnectedCallback(){this.base.removeEvents(this)}}class n extends HTMLElement{base;_buttonId;_drawerId;_iconId;constructor(){super(),this.base=new r}connectedCallback(){this.style.position="relative",this.style.display="flex",this.style.width="fit-content",this._buttonId=this.base.generateId();const e=document.createElement("button"),t=(e.setAttribute("type","button"),e.classList.add("row"),e.id=this._buttonId,document.createElement("span")),s=(t.classList.add("self-align-center"),t.innerText=this.getAttribute("text"),this._iconId=this.base.generateId(),document.createElement("span"));s.classList.add("self-align-center");var n=l('');const r=l(''),i=(r.classList.add("hidden"),s.append(n,r),s.id=this._iconId,e.append(t,s),this._drawerId=this.base.generateId(),document.createElement("div"));i.id=this._drawerId,i.classList.add("shadow","inline-block","bg-white"),i.style.position="absolute",i.style.zIndex="1040";n=this.querySelector("template");n.innerHTML.length?i.innerHTML=n.innerHTML:i.append(n.firstChild),i.style.display="none",this.component=[e,i],this.base.addEvent("#"+this._buttonId,"click",this.toggleMenu);const o=document.querySelector("body");""!==o.getAttribute("flk-close-dropdown")&&(o.setAttribute("flk-close-dropdown",""),o.addEventListener("click",this.closeAllDropdownButtons)),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this);var e=document.querySelectorAll("flk-dropdown");if(!e||!e.length){const t=document.querySelector("body");t.removeAttribute("flk-close-dropdown"),t.removeEventListener("click",this.closeAllDropdownButtons)}}toggleMenu(e){const t=h(e).target;e=t._drawerId;const s=document.getElementById(e);var e="none"!==s.style.display,n=(s.style.display=e?"none":"block",t.getAttribute("drawer-width")),n=("string"==typeof t.getAttribute("right")&&(s.style.right="0px"),s.style.top=t.offsetHeight+"px",s.style.width=n||t.offsetWidth+"px",t._iconId);const r=document.getElementById(n);e?(r.childNodes[0].classList.remove("hidden"),r.childNodes[1].classList.add("hidden")):(r.childNodes[0].classList.add("hidden"),r.childNodes[1].classList.remove("hidden"))}_closeDropdown(){var e=this._drawerId;const t=document.getElementById(e);if("none"!==t.style.display){e=this._iconId;const s=document.getElementById(e);t.style.display="none",s.childNodes[0].classList.remove("hidden"),s.childNodes[1].classList.add("hidden")}}closeAllDropdownButtons(e){var t,s=h(e,"flk-dropdown").target,e=document.querySelectorAll("flk-dropdown");if(s)for(const n of e)s._buttonId!==n._buttonId&&(t=n._drawerId,"none"!==document.getElementById(t).style.display&&n._closeDropdown());else for(const r of e)r._closeDropdown()}}class o extends HTMLElement{base;contents;component;listType="ul";iconSet;filter={value:"",caseSensitive:!1};selectedElements=[];static get observedAttributes(){return["contents","icon-set","max-depth","filter"]}_jsonToValueArray(e){let t=JSON.stringify(e);t=t.replace(/[\[\]{}\"]/g,"");let s=[];for(const n of t.split(","))s=s.concat(n.split(":"));return[...new Set(s)]}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}constructor(){super(),this.base=new r,this.setContents(this.getAttribute("contents")),this.iconSet=this.getAttribute("icon-set")?this.getAttribute("icon-type"):"file",this.maxDepth=this.getAttribute("max-depth")?parseInt(this.getAttribute("max-depth")):-1,this.setFilter(this.getAttribute("filter")),this.style.display="block",this.style.maxWidth="fit-content",this.style.margin="0 1rem 0 0",this.base.addEvent(".flk-branch","click",this.emitNodeToggle)}deselectTree(){if(this.selectedElements.length)for(const e of this.selectedElements)e.classList.remove("font-weight-bold"),delete e.dataset.selected}emitNodeToggle(e){if(e.stopPropagation(),["LI","UL"].includes(e.target.tagName))return!1;const t=h(e,"flk-tree-nav").target,s=p(e,"branchKey");let n=t.contents;const r=s.split(".");for(const a of r)if(n[a])n=n[a];else if(null===n[a])n=null;else{let e=[];for(const l of n)l[a]&&e.push(l[a]);n=e}let i,o=e.target;for(;o.dataset&&o.dataset.leafKey?i=o.dataset.leafKey:o=o.parentNode||o.parentElement,!i;);t.selectedElements.length&&t.deselectTree(),t.selectedElements=[],"DETAILS"===o.tagName?(t.selectedElements.push(o.childNodes[0]),o.childNodes.length&&o.childNodes[0].childNodes.length&&"DIV"===o.childNodes[0].childNodes[0].tagName&&(console.log(o.childNodes[0].childNodes),t.selectedElements=o.childNodes[0].childNodes[0].childNodes)):t.selectedElements.push(o);for(const c of t.selectedElements)c.dataset.selected||(c.classList.add("font-weight-bold"),c.dataset.selected=!0);var e=s.substring(s.indexOf(".")+1),d=t.createLeafText(r.reverse()[0]);t._emit("tree-click",t,{path:e,data:n,key:i,label:(d.titleText+" "+d.commentText).trim(),branch:"object"==typeof n})}convertJsonKeyToTitle(e){if(!e)return"";const t=(e="string"!=typeof e?e.toString():e).replace(/([A-Z_])/g,e=>"_"===e?" ":" "+e).trim();return t.charAt(0).toUpperCase()+t.slice(1)}setContents(e){var t=e||this.contents||[];try{switch(typeof t){case"string":this.contents=JSON.parse(t);break;case"object":Array.isArray(t)?this.contents=t:this.contents=[t]}}catch(e){console.log(e)}}applyFilter(e){let t;var s="details"===e.tagName.toLowerCase();t=this.filter.caseSensitive?e.dataset.branchValues.includes(this.filter.value):e.dataset.branchValues.toLowerCase().includes(this.filter.value.toLowerCase()),t?e.parentElement.classList.remove("hidden"):e.parentElement.classList.add("hidden"),s&&t?e.setAttribute("open",""):e.removeAttribute("open")}resetTree(e){e.parentElement.classList.remove("hidden"),e.removeAttribute("open")}filterTree(){let t=setTimeout(()=>{for(const e of this.querySelectorAll("[data-branch-values]"))void 0===this.filter.value||0===this.filter.value.length?this.resetTree(e):this.applyFilter(e);clearTimeout(t)},10)}setFilter(e){const t=e||{};try{switch(typeof t){case"string":t.includes("{")?(this.filter=JSON.parse(t),!1===this.filter.caseSensitive&&(this.filter.value=this.filter.value.toLowerCase())):this.filter.value=e.toLowerCase();break;case"object":this.filter=t}}catch(e){console.log(e)}this.filterTree()}createLeafText(e){var t,s;let n="",r="";return"string"==typeof e&&(e.includes("(")||e.includes("["))?(s=e.indexOf("("),s=-1===(t=e.indexOf("["))?s:t,n=this.convertJsonKeyToTitle(e.substring(0,s)),r=e.substring(s)):n=this.convertJsonKeyToTitle(e),{titleText:n,commentText:r}}createTextTag(n,r){n=this.createLeafText(n);if(n.commentText){let e=document.createElement("div"),t=document.createElement("span"),s=(t.innerText=n.titleText,document.createElement("small"));s.innerText=n.commentText,s.style.marginLeft="1rem",e.append(t,s),e.style.display="inline-flex",e.style.alignItems="center",r.append(e)}else r.innerText=n.titleText}createLeaf(e,t,s,n=[]){let r=document.createElement("li");r.classList.add("cursor-no-select"),r.style.marginTop="0.4rem",r.dataset.branchKey=s;const i="file"===this.iconSet?'':'';r.style.listStyleImage=`url('data:image/svg+xml,${i}')`,r.style.position="relative",r.style.left="2px";let o=document.createElement("span");s=[e].concat(n);if(o.dataset.branchValues=[...new Set(s)].join(),o.dataset.leafKey=s[0],this.createTextTag(e,o),o.style.position="relative",o.style.top="-3px",r.append(o),t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);const i="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${i}')`,e.append(r),t.append(e)}else t.append(r)}createBranch(s,t,n,r){if(r===this.maxDepth&&"object"==typeof s)for(const o of Array.isArray(s)?s:Object.keys(s)){let e;s[o]&&(e=this._jsonToValueArray(s[o])),this.createLeaf(o,t,n+"."+o,e)}else if(Array.isArray(s))for(var e in s){var d=document.createElement(this.listType);t.append(this.createBranch(s[e],d,n+"."+e,r+1))}else if(null!==s&&"object"==typeof s){const a=[];for(const l of Object.keys(s)){let e=document.createElement("li"),t=(e.classList.add("cursor-no-select"),e.style.position="relative",e.style.left="2px",e.dataset.branchKey=n+"."+l,document.createElement("details"));t.classList.add("flk-branch"),t.dataset.branchValues=[l].concat(this._jsonToValueArray(s[l])),t.style.position="relative",t.style.top="-3px",t.classList.add("cursor-default");var i=document.createElement("summary");this.createTextTag(l,i),t.dataset.leafKey=l,t.append(i),e.append(this.createBranch(s[l],t,n+"."+l,r+1)),a.push(e)}if(t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);var h="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${h}')`;for(const c of a)e.append(c);t.append(e)}else for(const p of a)t.append(p)}else this.createLeaf(s,t,n);return t}createHtml(){let e=document.createElement(this.listType);var t="file"===this.iconSet?u:'';if(e.style.listStyleImage=`url('data:image/svg+xml,${t}')`,e.style.marginLeft="3rem",this.contents.length){for(const s in this.contents)e=this.createBranch(this.contents[s],e,s,0);this.component=e}else this.component=e}attributeChangedCallback(e,t,s){switch(e){case"contents":this.setContents(s);break;case"icon-set":this.iconSet=s;break;case"max-depth":this.maxDepth="string"==typeof s?parseInt(s):s;break;case"filter":this.setFilter(s)}this.init()}connectedCallback(){this.init()}disconnectedCallback(){this.base.removeEvents(this)}init(){this.createHtml(),this.base.render(this)}}customElements.define("flk-table",e),customElements.define("flk-draggable",t),customElements.define("flk-modal",s),customElements.define("flk-dropdown",n),customElements.define("flk-tree-nav",o)}(); \ No newline at end of file diff --git a/docs/cdn/ibiss-v0.0.9/avian.min.css b/docs/cdn/ibiss-v0.0.9/avian.min.css new file mode 100644 index 0000000..53c6f0a --- /dev/null +++ b/docs/cdn/ibiss-v0.0.9/avian.min.css @@ -0,0 +1 @@ +:root{--html-background:#faf9f8;--background:#fff;--code-background:#f3f2f1;--overlay-background:0,0,0;--color-on-black:#c8c6c4;--font-color:#323130;--shadow-color:0,0,0;--hr-color:#d2d0ce;--border-color:#8a8886;--gray-light:#edebe9;--color-on-gray-light:#000;--gray:#a19f9d;--color-on-gray:#000;--gray-dark:#605e5c;--color-on-gray-dark:#faf9f8;--gray-darker:#8a8886;--light:#d2d0ce;--black:#000;--white:#fff;--icon:#605e5c;--icon-disabled:#a19f9d;--icon-error:#a80000;--icon-success:#107c10;--icon-warning:#797673;--primary:#0078d4;--primary-hover:#0068b8;--color-on-primary:#fff;--accent:#fce100;--accent-hover:#e6cf00;--color-on-accent:#000;--danger:#d13438;--danger-hover:#bb2a2f;--color-on-danger:#fff;--warning:#fff4ce;--color-on-warning:#323130;--error:#fde7e9;--color-on-error:#323130;--success:#dff6dd;--color-on-success:#323130;--contrast:#ccc;--contrast-hover:#b2b2b2;--color-on-contrast:#000;--disabled:#d2d0ce;--color-on-disabled:#a19f9d;--button-background:#fff;--button-hover:#e1dfdd;--button-outline-color:#000;--button-color:#000;--disabled-button-background:#f3f2f1;--disabled-button-color:#a19f9d;--colored-disabled-button-color:#d2d0ce;--input-border-color:#605e5c;--input-hover:#c8c6c4;--range-track-color:#c8c6c4;--range-filled-track-color:#605e5c;--range-track-hover-color:#e0f2ff;--switch-border-color:#000;--switch-toggle-off-color:#000;--switch-toggle-on-color:#fff;--table-hover:#e1dfdd;--table-striped-hover:#d2d0ce;--table-stripe:#edebe9;--default-distance:1.5rem;--distance-0:0;--distance-1:0.5rem;--distance-2:1rem;--distance-3:1.5rem;--distance-4:2rem;--distance-5:2.5rem;--h1-font-size:3.2rem;--h2-font-size:3rem;--h3-font-size:2.8rem;--h4-font-size:2.6rem;--h5-font-size:2.4rem;--h6-font-size:2.2rem;--th-font-size:2.2rem;--paragraph-font-size:1.6rem;--label-font-size:1.6rem;--small-font-size:1.2rem;--font-weight-normal:400;--font-weight-semibold:600;--font-weight-bold:700}*,:after,:before{box-sizing:border-box;font:inherit;font-weight:var(--font-weight-normal);margin:0;padding:0}html{font-size:62.5%;hanging-punctuation:first last}body{font-family:Segoe UI,"Segoe UI Web (West European)",-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif;font-size:1.6rem;height:100svh;line-height:1.5;text-rendering:optimizeSpeed}h1,h2,h3,h4,h5,h6{text-wrap:balance}p{text-wrap:pretty;max-width:75ch}ol,ul{margin-left:2rem}img,picture{display:block;max-width:100%}.lucide{left:2px;position:relative;top:3px}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms;animation-iteration-count:1;scroll-behavior:auto;transition-duration:.01ms}}@media (prefers-reduced-motion:no-preference){:has(:target),html{scroll-behavior:smooth;scroll-padding-top:3rem}}h1{font-size:var(--h1-font-size)}h1,h2{font-weight:var(--font-weight-bold)}h2{font-size:var(--h2-font-size)}h3{font-size:var(--h3-font-size);font-weight:var(--font-weight-bold)}h4{font-size:var(--h4-font-size)}h4,h5{font-weight:var(--font-weight-semibold)}h5{font-size:var(--h5-font-size)}h6{font-size:var(--h6-font-size);font-weight:var(--font-weight-semibold)}p{font-size:var(--paragraph-font-size)}label{font-size:var(--label-font-size)}small{font-size:var(--small-font-size)}b,strong{font-weight:var(--font-weight-bold)}cite,em,i{font-style:italic}code:not([class*=language]),kbd{background-color:var(--code-background);border:.5px solid var(--border-color);border-radius:.2rem;bottom:.1rem;margin:0 .2rem;padding:.2rem .4rem;position:relative}mark{background-color:var(--accent)}th{font-size:var(--th-font-size);font-weight:var(--font-weight-semibold)}.font-size-68{font-size:6.8rem!important}.font-size-42{font-size:4.2rem!important}.font-size-32{font-size:3.2rem!important}.font-size-28{font-size:2.8rem!important}.font-size-24{font-size:2.4rem!important}.font-size-20{font-size:2rem!important}.font-size-18{font-size:1.8rem!important}.font-size-16{font-size:1.6rem!important}.font-size-14{font-size:1.4rem!important}.font-size-12{font-size:1.2rem!important}.font-size-10{font-size:1rem!important}.font-weight-normal{font-weight:400!important}.font-weight-semibold{font-weight:600!important}.font-weight-bold{font-weight:700!important}.align-center{align-items:center}.align-end{align-items:flex-end}.align-start{align-items:flex-start}.align-stretch{align-items:stretch}.align-between{align-content:space-between}.align-around{align-content:space-around}.align-evenly{align-content:space-evenly}.self-align-stretch{align-self:stretch}.self-align-center{align-self:center}.self-align-start{align-self:flex-start}.self-align-end{align-self:flex-end}.row{display:flex;flex-wrap:wrap}.column{display:flex;flex-direction:column}.no-wrap{flex-wrap:nowrap}.wrap-reverse{flex-wrap:wrap-reverse}.row-reverse{flex-direction:row-reverse}.column-reverse{flex-direction:column-reverse}@media (min-width:993px){.drow-reverse{flex-direction:row-reverse}.dcolumn-reverse{flex-direction:column-reverse}}@media (min-width:768px) and (max-width:992px){.trow-reverse{flex-direction:row-reverse}.tcolumn-reverse{flex-direction:column-reverse}}@media (max-width:767px){.mrow-reverse{flex-direction:row-reverse}.mcolumn-reverse{flex-direction:column-reverse}}.gap-0{gap:var(--distance-0)}.gap-1{gap:var(--distance-1)}.gap-2{gap:var(--distance-2)}.gap-3{gap:var(--distance-3)}.gap-4{gap:var(--distance-4)}.gap-5{gap:var(--distance-5)}.justify-center{justify-content:center}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.justify-start{justify-content:flex-start}.f-100{flex:1 1 100%}.f-90{flex:0 0 90%}.f-80{flex:0 0 80%}.f-75{flex:0 0 75%}.f-70{flex:0 0 70%}.f-60{flex:0 0 60%}.f-50{flex:0 0 50%}.f-33{flex:0 0 33.33%}.f-30{flex:0 0 30%}.f-25{flex:0 0 25%}.f-20{flex:0 0 20%}.f-16{flex:0 0 16.67%}.f-10{flex:0 0 10%}.f-8{flex:0 0 8.33%}.f-auto{flex:1 1 auto;max-width:fitcontent;min-width:auto;width:auto}.f-fill{flex:1;max-width:none;min-width:auto;width:100%}@media (min-width:768px) and (max-width:992px){.tf-100{flex:1 1 100%}.tf-90{flex:0 0 90%}.tf-80{flex:0 0 80%}.tf-75{flex:0 0 75%}.tf-70{flex:0 0 70%}.tf-60{flex:0 0 60%}.tf-50{flex:0 0 50%}.tf-33{flex:0 0 33.33%}.tf-30{flex:0 0 30%}.tf-25{flex:0 0 25%}.tf-20{flex:0 0 20%}.tf-16{flex:0 0 16.67%}.tf-10{flex:0 0 10%}.tf-8{flex:0 0 8.33%}.tf-auto{flex:1 1 auto;max-width:fitcontent;min-width:auto;width:auto}.tf-fill{flex:1;max-width:none;min-width:auto;width:100%}}@media (max-width:767px){.mf-100{flex:1 1 100%}.mf-90{flex:0 0 90%}.mf-80{flex:0 0 80%}.mf-75{flex:0 0 75%}.mf-70{flex:0 0 70%}.mf-60{flex:0 0 60%}.mf-50{flex:0 0 50%}.mf-33{flex:0 0 33.33%}.mf-30{flex:0 0 30%}.mf-25{flex:0 0 25%}.mf-20{flex:0 0 20%}.mf-16{flex:0 0 16.67%}.mf-10{flex:0 0 10%}.mf-8{flex:0 0 8.33%}.mf-auto{flex:1 1 auto;max-width:fitcontent;min-width:auto;width:auto}.mf-fill{flex:1;max-width:none;min-width:auto;width:100%}}.no-scroll{overflow:hidden}.text-no-wrap{white-space:nowrap}.text-normal{font-weight:400}.sticky{height:auto;position:sticky;position:-webkit-sticky;top:0;z-index:1000}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.block{display:block}.hidden{display:none}@media (min-width:768px){.mobile{display:none!important}}.tablet{display:none}@media (min-width:768px) and (max-width:992px){.tablet{display:inherit!important}}@media (max-width:992px){.desktop{display:none!important}}@media (min-width:769px){.small-screen{display:none!important}}@media (max-width:768px){.large-screen{display:none!important}}.fit-content{max-width:fit-content!important;max-width:-moz-fit-content!important}.list-style-none{list-style:none!important}.m-0{margin:var(--distance-0)!important}.ml-0{margin-left:var(--distance-0)!important}.mr-0{margin-right:var(--distance-0)!important}.mt-0{margin-top:var(--distance-0)!important}.mb-0{margin-bottom:var(--distance-0)!important}.mx-0{margin-left:var(--distance-0)!important;margin-right:var(--distance-0)!important}.m-1{margin:var(--distance-1)!important}.m-2{margin:var(--distance-2)!important}.m-3{margin:var(--distance-3)!important}.m-4{margin:var(--distance-4)!important}.m-5{margin:var(--distance-5)!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.mx-1{margin-left:var(--distance-1)!important;margin-right:var(--distance-1)!important}.mx-2{margin-left:var(--distance-2)!important;margin-right:var(--distance-2)!important}.mx-3{margin-left:var(--distance-3)!important;margin-right:var(--distance-3)!important}.mx-4{margin-left:var(--distance-4)!important;margin-right:var(--distance-4)!important}.mx-5{margin-left:var(--distance-5)!important;margin-right:var(--distance-5)!important}.my-auto{margin-bottom:auto!important;margin-top:auto!important}.my-0{margin-bottom:var(--distance-0)!important;margin-top:var(--distance-0)!important}.my-1{margin-bottom:var(--distance-1)!important;margin-top:var(--distance-1)!important}.my-2{margin-bottom:var(--distance-2)!important;margin-top:var(--distance-2)!important}.my-3{margin-bottom:var(--distance-3)!important;margin-top:var(--distance-3)!important}.my-4{margin-bottom:var(--distance-4)!important;margin-top:var(--distance-4)!important}.my-5{margin-bottom:var(--distance-5)!important;margin-top:var(--distance-5)!important}.mt-auto{margin-top:auto!important}.mt-1{margin-top:var(--distance-1)!important}.mt-2{margin-top:var(--distance-2)!important}.mt-3{margin-top:var(--distance-3)!important}.mt-4{margin-top:var(--distance-4)!important}.mt-5{margin-top:var(--distance-5)!important}.ml-auto{margin-left:auto!important}.ml-1{margin-left:var(--distance-1)!important}.ml-2{margin-left:var(--distance-2)!important}.ml-3{margin-left:var(--distance-3)!important}.ml-4{margin-left:var(--distance-4)!important}.ml-5{margin-left:var(--distance-5)!important}.mr-auto{margin-right:auto!important}.mr-1{margin-right:var(--distance-1)!important}.mr-2{margin-right:var(--distance-2)!important}.mr-3{margin-right:var(--distance-3)!important}.mr-4{margin-right:var(--distance-4)!important}.mr-5{margin-right:var(--distance-5)!important}.mb-auto{margin-bottom:auto!important}.mb-1{margin-bottom:var(--distance-1)!important}.mb-2{margin-bottom:var(--distance-2)!important}.mb-3{margin-bottom:var(--distance-3)!important}.mb-4{margin-bottom:var(--distance-4)!important}.mb-5{margin-bottom:var(--distance-5)!important}@media (min-width:768px) and (max-width:992px){.tm-0{margin:var(--distance-0)!important}.tml-0{margin-left:var(--distance-0)!important}.tmr-0{margin-right:var(--distance-0)!important}.tmt-0{margin-top:var(--distance-0)!important}.tmb-0{margin-bottom:var(--distance-0)!important}.tmx-0{margin-left:var(--distance-0)!important;margin-right:var(--distance-0)!important}.tm-1{margin:var(--distance-1)!important}.tm-2{margin:var(--distance-2)!important}.tm-3{margin:var(--distance-3)!important}.tm-4{margin:var(--distance-4)!important}.tm-5{margin:var(--distance-5)!important}.tmx-auto{margin-left:auto!important;margin-right:auto!important}.tmx-1{margin-left:var(--distance-1)!important;margin-right:var(--distance-1)!important}.tmx-2{margin-left:var(--distance-2)!important;margin-right:var(--distance-2)!important}.tmx-3{margin-left:var(--distance-3)!important;margin-right:var(--distance-3)!important}.tmx-4{margin-left:var(--distance-4)!important;margin-right:var(--distance-4)!important}.tmx-5{margin-left:var(--distance-5)!important;margin-right:var(--distance-5)!important}.tmy-auto{margin-bottom:auto!important;margin-top:auto!important}.tmy-0{margin-bottom:var(--distance-0)!important;margin-top:var(--distance-0)!important}.tmy-1{margin-bottom:var(--distance-1)!important;margin-top:var(--distance-1)!important}.tmy-2{margin-bottom:var(--distance-2)!important;margin-top:var(--distance-2)!important}.tmy-3{margin-bottom:var(--distance-3)!important;margin-top:var(--distance-3)!important}.tmy-4{margin-bottom:var(--distance-4)!important;margin-top:var(--distance-4)!important}.tmy-5{margin-bottom:var(--distance-5)!important;margin-top:var(--distance-5)!important}.tmt-auto{margin-top:auto!important}.tmt-1{margin-top:var(--distance-1)!important}.tmt-2{margin-top:var(--distance-2)!important}.tmt-3{margin-top:var(--distance-3)!important}.tmt-4{margin-top:var(--distance-4)!important}.tmt-5{margin-top:var(--distance-5)!important}.tml-auto{margin-left:auto!important}.tml-1{margin-left:var(--distance-1)!important}.tml-2{margin-left:var(--distance-2)!important}.tml-3{margin-left:var(--distance-3)!important}.tml-4{margin-left:var(--distance-4)!important}.tml-5{margin-left:var(--distance-5)!important}.tmr-auto{margin-right:auto!important}.tmr-1{margin-right:var(--distance-1)!important}.tmr-2{margin-right:var(--distance-2)!important}.tmr-3{margin-right:var(--distance-3)!important}.tmr-4{margin-right:var(--distance-4)!important}.tmr-5{margin-right:var(--distance-5)!important}.tmb-auto{margin-bottom:auto!important}.tmb-1{margin-bottom:var(--distance-1)!important}.tmb-2{margin-bottom:var(--distance-2)!important}.tmb-3{margin-bottom:var(--distance-3)!important}.tmb-4{margin-bottom:var(--distance-4)!important}.tmb-5{margin-bottom:var(--distance-5)!important}}@media (max-width:767px){.mm-0{margin:var(--distance-0)!important}.mml-0{margin-left:var(--distance-0)!important}.mmr-0{margin-right:var(--distance-0)!important}.mmt-0{margin-top:var(--distance-0)!important}.mmb-0{margin-bottom:var(--distance-0)!important}.mmx-0{margin-left:var(--distance-0)!important;margin-right:var(--distance-0)!important}.mm-1{margin:var(--distance-1)!important}.mm-2{margin:var(--distance-2)!important}.mm-3{margin:var(--distance-3)!important}.mm-4{margin:var(--distance-4)!important}.mm-5{margin:var(--distance-5)!important}.mmx-auto{margin-left:auto!important;margin-right:auto!important}.mmx-1{margin-left:var(--distance-1)!important;margin-right:var(--distance-1)!important}.mmx-2{margin-left:var(--distance-2)!important;margin-right:var(--distance-2)!important}.mmx-3{margin-left:var(--distance-3)!important;margin-right:var(--distance-3)!important}.mmx-4{margin-left:var(--distance-4)!important;margin-right:var(--distance-4)!important}.mmx-5{margin-left:var(--distance-5)!important;margin-right:var(--distance-5)!important}.mmy-auto{margin-bottom:auto!important;margin-top:auto!important}.mmy-0{margin-bottom:var(--distance-0)!important;margin-top:var(--distance-0)!important}.mmy-1{margin-bottom:var(--distance-1)!important;margin-top:var(--distance-1)!important}.mmy-2{margin-bottom:var(--distance-2)!important;margin-top:var(--distance-2)!important}.mmy-3{margin-bottom:var(--distance-3)!important;margin-top:var(--distance-3)!important}.mmy-4{margin-bottom:var(--distance-4)!important;margin-top:var(--distance-4)!important}.mmy-5{margin-bottom:var(--distance-5)!important;margin-top:var(--distance-5)!important}.mmt-auto{margin-top:auto!important}.mmt-1{margin-top:var(--distance-1)!important}.mmt-2{margin-top:var(--distance-2)!important}.mmt-3{margin-top:var(--distance-3)!important}.mmt-4{margin-top:var(--distance-4)!important}.mmt-5{margin-top:var(--distance-5)!important}.mml-auto{margin-left:auto!important}.mml-1{margin-left:var(--distance-1)!important}.mml-2{margin-left:var(--distance-2)!important}.mml-3{margin-left:var(--distance-3)!important}.mml-4{margin-left:var(--distance-4)!important}.mml-5{margin-left:var(--distance-5)!important}.mmr-auto{margin-right:auto!important}.mmr-1{margin-right:var(--distance-1)!important}.mmr-2{margin-right:var(--distance-2)!important}.mmr-3{margin-right:var(--distance-3)!important}.mmr-4{margin-right:var(--distance-4)!important}.mmr-5{margin-right:var(--distance-5)!important}.mmb-auto{margin-bottom:auto!important}.mmb-1{margin-bottom:var(--distance-1)!important}.mmb-2{margin-bottom:var(--distance-2)!important}.mmb-3{margin-bottom:var(--distance-3)!important}.mmb-4{margin-bottom:var(--distance-4)!important}.mmb-5{margin-bottom:var(--distance-5)!important}}.p-0{padding:var(--distance-0)}.pl-0{padding-left:var(--distance-0)}.pr-0{padding-right:var(--distance-0)}.pt-0{padding-top:var(--distance-0)}.pb-0{padding-bottom:var(--distance-0)}.p-1{padding:var(--distance-1)}.p-2{padding:var(--distance-2)}.p-3{padding:var(--distance-3)}.p-4{padding:var(--distance-4)}.p-5{padding:var(--distance-5)}.px-0{padding-left:var(--distance-0);padding-right:var(--distance-0)}.px-auto{padding-left:auto;padding-right:auto}.px-1{padding-left:var(--distance-1);padding-right:var(--distance-1)}.px-2{padding-left:var(--distance-2);padding-right:var(--distance-2)}.px-3{padding-left:var(--distance-3);padding-right:var(--distance-3)}.px-4{padding-left:var(--distance-4);padding-right:var(--distance-4)}.px-5{padding-left:var(--distance-5);padding-right:var(--distance-5)}.py-auto{padding-bottom:auto;padding-top:auto}.py-0{padding-bottom:var(--distance-0);padding-top:var(--distance-0)}.py-1{padding-bottom:var(--distance-1);padding-top:var(--distance-1)}.py-2{padding-bottom:var(--distance-2);padding-top:var(--distance-2)}.py-3{padding-bottom:var(--distance-3);padding-top:var(--distance-3)}.py-4{padding-bottom:var(--distance-4);padding-top:var(--distance-4)}.py-5{padding-bottom:var(--distance-5);padding-top:var(--distance-5)}.pt-auto{padding-top:auto}.pt-1{padding-top:var(--distance-1)}.pt-2{padding-top:var(--distance-2)}.pt-3{padding-top:var(--distance-3)}.pt-4{padding-top:var(--distance-4)}.pt-5{padding-top:var(--distance-5)}.pl-auto{padding-left:auto}.pl-1{padding-left:var(--distance-1)}.pl-2{padding-left:var(--distance-2)}.pl-3{padding-left:var(--distance-3)}.pl-4{padding-left:var(--distance-4)}.pl-5{padding-left:var(--distance-5)}.pr-auto{padding-right:auto}.pr-1{padding-right:var(--distance-1)}.pr-2{padding-right:var(--distance-2)}.pr-3{padding-right:var(--distance-3)}.pr-4{padding-right:var(--distance-4)}.pr-5{padding-right:var(--distance-5)}.pb-auto{padding-bottom:auto}.pb-1{padding-bottom:var(--distance-1)}.pb-2{padding-bottom:var(--distance-2)}.pb-3{padding-bottom:var(--distance-3)}.pb-4{padding-bottom:var(--distance-4)}.pb-5{padding-bottom:var(--distance-5)}@media (min-width:768px) and (max-width:992px){.tp-0{padding:var(--distance-0)}.tpl-0{padding-left:var(--distance-0)}.tpr-0{padding-right:var(--distance-0)}.tpt-0{padding-top:var(--distance-0)}.tpb-0{padding-bottom:var(--distance-0)}.tpx-0{padding-left:var(--distance-0);padding-right:var(--distance-0)}.tp-1{padding:var(--distance-1)}.tp-2{padding:var(--distance-2)}.tp-3{padding:var(--distance-3)}.tp-4{padding:var(--distance-4)}.tp-5{padding:var(--distance-5)}.tpx-auto{padding-left:auto;padding-right:auto}.tpx-1{padding-left:var(--distance-1);padding-right:var(--distance-1)}.tpx-2{padding-left:var(--distance-2);padding-right:var(--distance-2)}.tpx-3{padding-left:var(--distance-3);padding-right:var(--distance-3)}.tpx-4{padding-left:var(--distance-4);padding-right:var(--distance-4)}.tpx-5{padding-left:var(--distance-5);padding-right:var(--distance-5)}.tpy-auto{padding-bottom:auto;padding-top:auto}.tpy-0{padding-bottom:var(--distance-0);padding-top:var(--distance-0)}.tpy-1{padding-bottom:var(--distance-1);padding-top:var(--distance-1)}.tpy-2{padding-bottom:var(--distance-2);padding-top:var(--distance-2)}.tpy-3{padding-bottom:var(--distance-3);padding-top:var(--distance-3)}.tpy-4{padding-bottom:var(--distance-4);padding-top:var(--distance-4)}.tpy-5{padding-bottom:var(--distance-5);padding-top:var(--distance-5)}.tpt-auto{padding-top:auto}.tpt-1{padding-top:var(--distance-1)}.tpt-2{padding-top:var(--distance-2)}.tpt-3{padding-top:var(--distance-3)}.tpt-4{padding-top:var(--distance-4)}.tpt-5{padding-top:var(--distance-5)}.tpl-auto{padding-left:auto}.tpl-1{padding-left:var(--distance-1)}.tpl-2{padding-left:var(--distance-2)}.tpl-3{padding-left:var(--distance-3)}.tpl-4{padding-left:var(--distance-4)}.tpl-5{padding-left:var(--distance-5)}.tpr-auto{padding-right:auto}.tpr-1{padding-right:var(--distance-1)}.tpr-2{padding-right:var(--distance-2)}.tpr-3{padding-right:var(--distance-3)}.tpr-4{padding-right:var(--distance-4)}.tpr-5{padding-right:var(--distance-5)}.tpb-auto{padding-bottom:auto}.tpb-1{padding-bottom:var(--distance-1)}.tpb-2{padding-bottom:var(--distance-2)}.tpb-3{padding-bottom:var(--distance-3)}.tpb-4{padding-bottom:var(--distance-4)}.tpb-5{padding-bottom:var(--distance-5)}}@media (max-width:767px){.mp-0{padding:var(--distance-0)}.mpl-0{padding-left:var(--distance-0)}.mpr-0{padding-right:var(--distance-0)}.mpt-0{padding-top:var(--distance-0)}.mpb-0{padding-bottom:var(--distance-0)}.mpx-0{padding-left:var(--distance-0);padding-right:var(--distance-0)}.mp-1{padding:var(--distance-1)}.mp-2{padding:var(--distance-2)}.mp-3{padding:var(--distance-3)}.mp-4{padding:var(--distance-4)}.mp-5{padding:var(--distance-5)}.mpx-auto{padding-left:auto;padding-right:auto}.mpx-1{padding-left:var(--distance-1);padding-right:var(--distance-1)}.mpx-2{padding-left:var(--distance-2);padding-right:var(--distance-2)}.mpx-3{padding-left:var(--distance-3);padding-right:var(--distance-3)}.mpx-4{padding-left:var(--distance-4);padding-right:var(--distance-4)}.mpx-5{padding-left:var(--distance-5);padding-right:var(--distance-5)}.mpy-auto{padding-bottom:auto;padding-top:auto}.mpy-0{padding-bottom:var(--distance-0);padding-top:var(--distance-0)}.mpy-1{padding-bottom:var(--distance-1);padding-top:var(--distance-1)}.mpy-2{padding-bottom:var(--distance-2);padding-top:var(--distance-2)}.mpy-3{padding-bottom:var(--distance-3);padding-top:var(--distance-3)}.mpy-4{padding-bottom:var(--distance-4);padding-top:var(--distance-4)}.mpy-5{padding-bottom:var(--distance-5);padding-top:var(--distance-5)}.mpt-auto{padding-top:auto}.mpt-1{padding-top:var(--distance-1)}.mpt-2{padding-top:var(--distance-2)}.mpt-3{padding-top:var(--distance-3)}.mpt-4{padding-top:var(--distance-4)}.mpt-5{padding-top:var(--distance-5)}.mpl-auto{padding-left:auto}.mpl-1{padding-left:var(--distance-1)}.mpl-2{padding-left:var(--distance-2)}.mpl-3{padding-left:var(--distance-3)}.mpl-4{padding-left:var(--distance-4)}.mpl-5{padding-left:var(--distance-5)}.mpr-auto{padding-right:auto}.mpr-1{padding-right:var(--distance-1)}.mpr-2{padding-right:var(--distance-2)}.mpr-3{padding-right:var(--distance-3)}.mpr-4{padding-right:var(--distance-4)}.mpr-5{padding-right:var(--distance-5)}.mpb-auto{padding-bottom:auto}.mpb-1{padding-bottom:var(--distance-1)}.mpb-2{padding-bottom:var(--distance-2)}.mpb-3{padding-bottom:var(--distance-3)}.mpb-4{padding-bottom:var(--distance-4)}.mpb-5{padding-bottom:var(--distance-5)}}hr{border-color:var(--hr-color);border-style:solid;border-width:0 0 .5px;margin-bottom:var(--default-distance)}button{background-color:var(--button-background);border:.5px solid var(--border-color);border-radius:2px;padding:.6rem 1.5rem}@supports (-moz-appearance:none){button{padding:.6rem 1.5rem .9rem}}button:active,button:focus{box-shadow:0 0 0 1px var(--button-outline-color);cursor:pointer;outline:none}button.no-border{background-color:transparent!important;border:none!important}button:hover{background-color:var(--button-hover)!important;cursor:pointer}button.icon{color:var(--icon)!important;display:flex;flex-direction:column;padding:0;width:auto}button.icon:disabled{color:var(--icon-disabled)!important}button.icon:disabled:hover{background-color:transparent!important}button.primary{background-color:var(--primary)!important;border:0;color:var(--color-on-primary)!important}button.primary:hover{background-color:var(--primary-hover)!important}button.danger{background-color:var(--danger)!important;border:0;color:var(--color-on-danger)!important}button.danger:hover{background-color:var(--danger-hover)!important}button.accent{background-color:var(--accent)!important;border:0;color:var(--color-on-accent)!important}button.accent:hover{background-color:var(--accent-hover)!important}button.contrast{background-color:var(--contrast)!important;border:0;color:var(--color-on-contrast)!important}button.contrast:hover{background-color:var(--contrast-hover)!important}button.accent:active,button.accent:focus,button.contrast:active,button.contrast:focus,button.danger:active,button.danger:focus,button.primary:active,button.primary:focus{box-shadow:0 0 0 1px var(--button-outline-color)!important}button.accent.disabled,button.accent:disabled,button.contrast.disabled,button.contrast:disabled,button.danger.disabled,button.danger:disabled,button.primary.disabled,button.primary:disabled{color:var(--colored-disabled-button-color)!important;cursor:auto;outline:none}button.accent.disabled:not(.link),button.accent:disabled:not(.link),button.contrast.disabled:not(.link),button.contrast:disabled:not(.link),button.danger.disabled:not(.link),button.danger:disabled:not(.link),button.primary.disabled:not(.link),button.primary:disabled:not(.link){background-color:var(--disabled-button-background)!important;border-color:var(--disabled-button-background)!important}button.outline-hover:hover{background-color:transparent!important;outline:.5px solid var(--button-outline-color)!important}button.link{background-color:transparent!important;border:0;color:var(--primary)!important;padding:0}button.link.accent{color:var(--accent)!important}button.link.contrast{color:var(--contrast)!important}button.link.danger{color:var(--danger)!important}button.link:active,button.link:focus,button.link:hover{background-color:transparent!important;box-shadow:unset!important;text-decoration:underline!important}button.disabled,button:disabled{color:var(--disabled-button-color)!important;cursor:auto}button.disabled:not(.link):not(.icon),button:disabled:not(.link):not(.icon){background-color:var(--disabled-button-background)!important;border-color:var(--disabled-button-background)!important}button.disabled.link,button:disabled.link{color:var(--disabled-button-color)!important}button.disabled:hover,button:disabled:hover{outline:none;text-decoration:none}select{background-color:var(--background);border:.5px solid var(--input-border-color);outline:var(--primary) none 0;padding:.5rem}select:focus{border-color:var(--primary);box-shadow:inset 1px 1px 0 var(--primary),inset -1px -1px 0 var(--primary)}select:disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);box-shadow:none;color:var(--disabled-button-colour);cursor:auto}input,textarea{accent-color:var(--primary);border:.5px solid var(--input-border-color);border-radius:2px;min-height:3rem;outline:0 none currentcolor;padding:0 1rem}input:focus,textarea:focus{border-color:var(--primary);box-shadow:inset 1px 1px 0 var(--primary),inset -1px -1px 0 var(--primary)}input:invalid:not([invalid=false]):not([required]),input[invalid]:not([invalid=false]),textarea:invalid:not([invalid=false]):not([required]),textarea[invalid]:not([invalid=false]){border-color:var(--danger)}input:invalid:not([invalid=false]):not([required]):focus,input:invalid:not([invalid=false]):not([required]):hover,input[invalid]:not([invalid=false]):focus,input[invalid]:not([invalid=false]):hover,textarea:invalid:not([invalid=false]):not([required]):focus,textarea:invalid:not([invalid=false]):not([required]):hover,textarea[invalid]:not([invalid=false]):focus,textarea[invalid]:not([invalid=false]):hover{box-shadow:inset 1px 1px 0 var(--danger),inset -1px -1px 0 var(--danger)}input:disabled,textarea:disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);box-shadow:none;color:var(--disabled-button-color);cursor:auto}input[type=checkbox],input[type=color],input[type=file],input[type=image],input[type=radio],input[type=range],textarea[type=checkbox],textarea[type=color],textarea[type=file],textarea[type=image],textarea[type=radio],textarea[type=range]{border:none;min-height:unset;padding-left:0}input[type=checkbox]:focus-visible,input[type=radio]:focus-visible,textarea[type=checkbox]:focus-visible,textarea[type=radio]:focus-visible{outline:var(--button-outline-color) dashed .1rem;outline-offset:.1rem}input[type=button],input[type=reset],input[type=submit],textarea[type=button],textarea[type=reset],textarea[type=submit]{border:0;padding:.6rem 1.5rem}@supports (-moz-appearance:none){input[type=button],input[type=reset],input[type=submit],textarea[type=button],textarea[type=reset],textarea[type=submit]{padding:.6rem 1.5rem .9rem}}input[type=button]:hover,input[type=reset]:hover,input[type=submit]:hover,textarea[type=button]:hover,textarea[type=reset]:hover,textarea[type=submit]:hover{background-color:var(--button-hover);cursor:pointer}input[type=button]:active,input[type=button]:focus,input[type=reset]:active,input[type=reset]:focus,input[type=submit]:active,input[type=submit]:focus,textarea[type=button]:active,textarea[type=button]:focus,textarea[type=reset]:active,textarea[type=reset]:focus,textarea[type=submit]:active,textarea[type=submit]:focus{box-shadow:0 0 0 2px var(--button-outline-color);cursor:pointer;outline:none}input[type=button]:disabled,input[type=button]:hover:disabled,input[type=reset]:disabled,input[type=reset]:hover:disabled,input[type=submit]:disabled,input[type=submit]:hover:disabled,textarea[type=button]:disabled,textarea[type=button]:hover:disabled,textarea[type=reset]:disabled,textarea[type=reset]:hover:disabled,textarea[type=submit]:disabled,textarea[type=submit]:hover:disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);box-shadow:none;color:var(--disabled-button-color);cursor:auto}input[type=reset],textarea[type=reset]{background-color:var(--background);border:.5px solid var(--border-color)}input[type=reset]:active,input[type=reset]:focus,textarea[type=reset]:active,textarea[type=reset]:focus{box-shadow:0 0 0 1px var(--button-outline-color);cursor:pointer;outline:none}input[type=button],input[type=submit],textarea[type=button],textarea[type=submit]{background-color:var(--primary);color:var(--color-on-primary)}input[type=button]:hover,input[type=submit]:hover,textarea[type=button]:hover,textarea[type=submit]:hover{background-color:var(--primary-hover)}input[type=color],input[type=file],input[type=range],textarea[type=color],textarea[type=file],textarea[type=range]{border:none}input[type=color]:focus,input[type=file]:focus,input[type=range]:focus,textarea[type=color]:focus,textarea[type=file]:focus,textarea[type=range]:focus{box-shadow:none;outline:var(--primary) solid 2px;outline-offset:2px}input[type=file]::-webkit-file-upload-button,input[type=file]::file-selector-button,textarea[type=file]::-webkit-file-upload-button,textarea[type=file]::file-selector-button{background-color:var(--primary);border:0;border-radius:2px;color:var(--color-on-primary);padding:.6rem 1.5rem}input[type=file]:active::-webkit-file-upload-button,input[type=file]:active::file-selector-button,textarea[type=file]:active::-webkit-file-upload-button,textarea[type=file]:active::file-selector-button{box-shadow:inset 0 0 0 2px var(--button-outline-color)}input[type=file]:hover::-webkit-file-upload-button,input[type=file]:hover::file-selector-button,textarea[type=file]:hover::-webkit-file-upload-button,textarea[type=file]:hover::file-selector-button{background-color:var(--primary-hover);cursor:pointer}input[type=file]:focus,textarea[type=file]:focus{outline:var(--button-outline-color) solid .2rem;outline-offset:.1rem}input[type=color],textarea[type=color]{background-color:transparent;padding:0;width:8rem}input[type=range],textarea[type=range]{appearance:none;-webkit-appearance:none;background:transparent;padding:0}input[type=range]::-moz-range-thumb,textarea[type=range]::-moz-range-thumb{background:var(--background);border:2px solid var(--range-filled-track-color);border-radius:100px;height:1.2rem;width:1.2rem}input[type=range]::-moz-range-track,textarea[type=range]::-moz-range-track{background-color:var(--range-track-color);height:.3rem}input[type=range]::-moz-range-progress,textarea[type=range]::-moz-range-progress{background-color:var(--range-filled-track-color);height:.3rem}input[type=range]::-webkit-slider-thumb,textarea[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:var(--background);border:2px solid var(--range-filled-track-color);border-radius:100px;height:1.6rem;margin-top:-6px;width:1.6rem}input[type=range]::-webkit-slider-runnable-track,textarea[type=range]::-webkit-slider-runnable-track{background:var(--range-track-color);border:none;border-radius:3px;height:3px}input[type=range]:focus,input[type=range]:hover,textarea[type=range]:focus,textarea[type=range]:hover{background:transparent;outline:none}input[type=range]:focus::-moz-range-progress,input[type=range]:hover::-moz-range-progress,textarea[type=range]:focus::-moz-range-progress,textarea[type=range]:hover::-moz-range-progress{background-color:var(--primary)}input[type=range]:focus::-moz-range-thumb,input[type=range]:hover::-moz-range-thumb,textarea[type=range]:focus::-moz-range-thumb,textarea[type=range]:hover::-moz-range-thumb{border:2px solid var(--primary)}input[type=range]:focus::-webkit-slider-runnable-track,input[type=range]:hover::-webkit-slider-runnable-track,textarea[type=range]:focus::-webkit-slider-runnable-track,textarea[type=range]:hover::-webkit-slider-runnable-track{background-color:var(--primary)}input[type=range]:focus::-webkit-slider-thumb,input[type=range]:hover::-webkit-slider-thumb,textarea[type=range]:focus::-webkit-slider-thumb,textarea[type=range]:hover::-webkit-slider-thumb{border:2px solid var(--primary)}input[type=range]:disabled:focus,input[type=range]:disabled:hover,textarea[type=range]:disabled:focus,textarea[type=range]:disabled:hover{background:transparent;outline:none}input[type=range]:disabled:focus::-moz-range-progress,input[type=range]:disabled:hover::-moz-range-progress,textarea[type=range]:disabled:focus::-moz-range-progress,textarea[type=range]:disabled:hover::-moz-range-progress{background-color:var(--range-filled-track-color)}input[type=range]:disabled:focus::-moz-range-thumb,input[type=range]:disabled:hover::-moz-range-thumb,textarea[type=range]:disabled:focus::-moz-range-thumb,textarea[type=range]:disabled:hover::-moz-range-thumb{border:2px solid var(--range-filled-track-color)}input[type=range]:disabled:focus::-webkit-slider-runnable-track,input[type=range]:disabled:hover::-webkit-slider-runnable-track,textarea[type=range]:disabled:focus::-webkit-slider-runnable-track,textarea[type=range]:disabled:hover::-webkit-slider-runnable-track{background-color:var(--range-filled-track-color)}input[type=range]:disabled:focus::-webkit-slider-thumb,input[type=range]:disabled:hover::-webkit-slider-thumb,textarea[type=range]:disabled:focus::-webkit-slider-thumb,textarea[type=range]:disabled:hover::-webkit-slider-thumb{border:2px solid var(--range-filled-track-color)}input.underline,textarea.underline{background-color:transparent;border-left:0;border-radius:0;border-right:0;border-top:0;padding:0}input.underline:focus,textarea.underline:focus{box-shadow:none}input.underline:focus,input.underline:hover,textarea.underline:focus,textarea.underline:hover{border-color:var(--primary);box-shadow:inset 0 -1px 0 var(--primary)}input.underline:disabled:focus,input.underline:disabled:hover,input.underline:invalid:not([invalid=false]):not([required]):focus,input.underline:invalid:not([invalid=false]):not([required]):hover,textarea.underline:disabled:focus,textarea.underline:disabled:hover,textarea.underline:invalid:not([invalid=false]):not([required]):focus,textarea.underline:invalid:not([invalid=false]):not([required]):hover{border-left:0;border-right:0;border-top:0;box-shadow:none}input.underline:invalid:not([invalid=false]):not([required]):focus,input.underline:invalid:not([invalid=false]):not([required]):hover,input.underline[invalid]:not([invalid=false]):focus,input.underline[invalid]:not([invalid=false]):hover,textarea.underline:invalid:not([invalid=false]):not([required]):focus,textarea.underline:invalid:not([invalid=false]):not([required]):hover,textarea.underline[invalid]:not([invalid=false]):focus,textarea.underline[invalid]:not([invalid=false]):hover{border-color:var(--danger);box-shadow:inset 0 -1px 0 var(--danger)}input.underline:disabled:focus,input.underline:disabled:hover,textarea.underline:disabled:focus,textarea.underline:disabled:hover{border-color:var(--disabled-button-background)}a{color:var(--primary)}a:active,a:focus,a:focus-visible,a:hover{outline:unset}a.accent{color:var(--accent)}a.danger{color:var(--danger)}a.contrast{color:var(--contrast)}a.button{background-color:transparent;border-radius:2px;color:var(--button-color);display:inline-block;padding:.9rem 1.5rem;text-align:center;text-decoration:none}a.button.normal{border:.5px solid var(--border-color)}a.button.normal.disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);color:var(--disabled-button-color);cursor:default}a.button:hover{background-color:var(--button-hover);cursor:pointer}a.button:active,a.button:focus{box-shadow:0 0 0 1px var(--button-outline-color);cursor:pointer;outline:none}a.button.primary{background-color:var(--primary);border:0;color:var(--color-on-primary)}a.button.primary:hover{background-color:var(--primary-hover)}a.button.danger{background-color:var(--danger);border:0;color:var(--color-on-danger)}a.button.danger:hover{background-color:var(--danger-hover)}a.button.accent{background-color:var(--accent);border:0;color:var(--color-on-accent)}a.button.accent:hover{background-color:var(--accent-hover)}a.button.contrast{background-color:var(--contrast);border:0;color:var(--color-on-contrast)}a.button.contrast:hover{background-color:var(--contrast-hover)}a.button.accent:active,a.button.accent:focus,a.button.contrast:active,a.button.contrast:focus,a.button.danger:active,a.button.danger:focus,a.button.primary:active,a.button.primary:focus{box-shadow:0 0 0 2px var(--button-outline-color)}a.button.accent.disabled,a.button.contrast.disabled,a.button.danger.disabled,a.button.primary.disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);color:var(--colored-disabled-button-color);cursor:default}table{border-collapse:collapse}table td,table th{padding:.5rem 2.5rem .6rem .5rem;text-align:left;vertical-align:top}table:not(.no-hover) tbody tr:hover{background-color:var(--table-hover)}table.table tbody tr,table.table thead{border-bottom:.5px solid var(--border-color)}table.table tbody tr{border-color:var(--light)}table.table tfoot{font-size:small;font-style:italic}table.sticky-header>thead{background-color:var(--background);border-bottom:0;-webkit-box-shadow:0 1px 4px 0 rgba(var(--shadow-color),.16),0 1px 4px 0 rgba(var(--shadow-color),.12);box-shadow:0 1px 4px 0 rgba(var(--shadow-color),.16),0 1px 4px 0 rgba(var(--shadow-color),.12);position:sticky;position:-webkit-sticky;top:0;white-space:nowrap;z-index:2}table.striped tbody tr:nth-child(odd){background-color:var(--table-stripe)}table.striped tbody tr:hover{background-color:var(--table-striped-hover)}.table-container{border:.5px solid var(--border-color);border-color:var(--light);display:inline-block;overflow-x:hidden;overflow-y:auto;width:fit-content}@-moz-document url-prefix(){.table-container{padding-right:1.7rem}}.cursor-not-allowed:hover{cursor:not-allowed!important}.cursor-pointer{-webkit-user-select:none;-ms-user-select:none;user-select:none}.cursor-pointer:hover{cursor:pointer!important}.cursor-grab:hover{cursor:grab!important}.cursor-grabbing:hover{cursor:grabbing!important}.cursor-zoom-in:hover{cursor:zoom-in!important}.cursor-zoom-out:hover{cursor:zoom-out!important}.cursor-wait:hover{cursor:wait!important}.cursor-help:hover{cursor:help!important}.cursor-default,.cursor-default:hover{cursor:default!important}.cursor-no-select{-webkit-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.border{border:.5px solid var(--border-color)}.border-bottom{border-bottom:.5px solid var(--border-color)}.border-top{border-top:.5px solid var(--border-color)}.border-right{border-right:.5px solid var(--border-color)}.border-left{border-left:.5px solid var(--border-color)}.border-black{border-color:var(--black)}.border-white{border-color:var(--white)}.border-primary{border-color:var(--primary)}.border-accent{border-color:var(--accent)}.border-danger{border-color:var(--danger)}.border-light{border-color:var(--light)}.border-success{border-color:var(--icon-success)}html{background-color:var(--html-background)!important}.bg-gray-light{background-color:var(--gray-light)!important;color:var(--color-on-gray-light)!important}.bg-gray{background-color:var(--gray)!important;color:var(--color-on-gray)!important}.bg-gray-dark{background-color:var(--gray-dark)!important;color:var(--color-on-gray-dark)!important}.bg-black{background-color:var(--black)!important;color:var(--color-on-black)!important}.bg-white{background-color:var(--white)!important;color:var(--font-color)!important}.bg-primary{background-color:var(--primary)!important;color:var(--color-on-primary)!important}.bg-accent{background-color:var(--accent)!important;color:var(--color-on-accent)!important}.bg-danger{background-color:var(--danger)!important;color:var(--color-on-danger)!important}.bg-success{background-color:var(--success)!important;color:var(--color-on-success)!important}.bg-error{background-color:var(--error)!important;color:var(--color-on-error)!important}.bg-warning{background-color:var(--warning)!important;color:var(--color-on-warning)!important}.bg-transparent{background-color:transparent!important}.text-black{color:var(--black)!important}.text-white{color:var(--white)!important}.text-gray{color:var(--gray-darker)!important}.text-primary{color:var(--primary)!important}.text-accent{color:var(--accent)!important}.text-danger{color:var(--danger)!important}.text-success{color:var(--icon-success)!important}.icon-gray{color:var(--gray)!important}.icon-gray-dark{color:var(--gray-dark)!important}.icon-success{color:var(--icon-success)!important}.icon-primary{color:var(--primary)!important}.icon-accent{color:var(--accent)!important}.icon-danger{color:var(--danger)!important}.icon-black{color:var(--black)!important}.icon-white{color:var(--white)!important}.shadow{box-shadow:0 .6px 3.6px 0 rgba(var(--shadow-color),.132),0 .3px .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-top{box-shadow:0 -1.6px 3.6px 0 rgba(var(--shadow-color),.132),0 -.3px .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-left{box-shadow:-1.6px 0 3.6px 0 rgba(var(--shadow-color),.132),.3px 0 .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-right{box-shadow:1.6px 0 3.6px 0 rgba(var(--shadow-color),.132),-.3px 0 .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-bottom{box-shadow:0 1.6px 3.6px 0 rgba(var(--shadow-color),.132),0 .3px .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-lg{box-shadow:0 0 5px 0 rgba(var(--shadow-color),.132)!important}.shadow-top-lg{box-shadow:0 -3px 5px 0 rgba(var(--shadow-color),.132)!important}.shadow-bottom-lg{box-shadow:0 3px 5px 0 rgba(var(--shadow-color),.132)!important}.shadow-left-lg{box-shadow:-3px 0 5px 0 rgba(var(--shadow-color),.132)!important}.shadow-right-lg{box-shadow:3px 0 5px 0 rgba(var(--shadow-color),.132)!important} \ No newline at end of file diff --git a/docs/cdn/ibiss-v0.0.9/flightkit.min.js b/docs/cdn/ibiss-v0.0.9/flightkit.min.js new file mode 100644 index 0000000..19d801c --- /dev/null +++ b/docs/cdn/ibiss-v0.0.9/flightkit.min.js @@ -0,0 +1 @@ +!function(){"use strict";function i(e,t){if(!t||0===t.length)return e;const s=Object.assign([],e);if(Array.isArray(s[0])){e=s;var n=t;const r=[];for(const i of e)r.push(i.sort(E(n)));r}else s.sort(E(t));return s}function v(e){let t=e.toString();e=t.match(/^\d+|\d+$/);return e?parseInt(e[0]):null}function b(e){return"boolean"==typeof e||"string"==typeof e&&("true"===(e=e.toLocaleLowerCase())||"false"===e)}function w(e){return"boolean"==typeof e?e:"true"===e.toLocaleLowerCase()}function E(f,y=0){return function(e,t){var{propertyName:s,direction:d}=f[y];let n=null===e[s]||void 0===e[s]?"":e[s],r=null===t[s]||void 0===t[s]?"":t[s];const h=/^(\d{1,4}-\d{1,4}-\d{1,4}(T)?)/gim;var s=n instanceof Date&&r instanceof Date||h.test(n)&&h.test(r),p=(s&&(n=n instanceof Date?n.valueOf():new Date(Date.parse(n)),r=r instanceof Date?r.valueOf():new Date(Date.parse(r))),b(n)&&b(r)),u=!p&&!isNaN(n)&&!isNaN(r),i=v(n),o=v(r);u?(n=parseFloat(n).toPrecision(12),r=parseFloat(r).toPrecision(12)):null!==i&&null!==o&&(n=parseFloat(i).toPrecision(12),r=parseFloat(o).toPrecision(12)),p&&(n=w(n),r=w(r));let a,l;switch(d){case"descending":case"desc":a=r,l=n;break;default:a=n,l=r}let c=0;if(p||s||u)c=a-l;else{a=a.toString().trim().toLowerCase(),l=l.toString().trim().toLowerCase();const m=/\d/gim;i=m.test(n)&&m.test(r);c=i?a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"}):a.localeCompare(l)}o=y+1;if(0===c&&o(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),s=t.split("-")[0];return window.$flightkitUUIDStore||(window.$flightkitUUIDStore=[]),window.$flightkitUUIDStore.some(e=>e===s)?e():(window.$flightkitUUIDStore.push(s),s)}()}render(t){if(!t.component)throw new Error("Component is not assigned! Can't render");t.id=t.id||this.generateId();var e=this._getAllEventAttributes(t);if(e){var s="#"+t.id;for(const i of e){var n="e-"+i;this.addEvent(s,i,t.getAttribute(n))}}var r=Object.keys(t.classList).length;if(r){for(let e=0;e{this._assignToDom(t,t.component),clearTimeout(this._renderTimer)},10)}addEvent(e,t,s){this._events.push({selector:e,eventType:t,callback:s})}_getExternalCallback(e){let t=void 0;for(const s of e.split("."))t=(t||window)[s];return t}_getAllEventAttributes(e){e=e.attributes;const t=Array.from(e).filter(e=>e.name.startsWith("e-"));return t.map(e=>e.name.slice(2))}_isFlightkitElement(e){return e.toUpperCase().includes("FLK-")}_outerEventHandler(e){const t=h(e),s=(t.contents=e.detail,t.target.getAttribute("e-"+t.type));let n=void 0;for(const r of s.split("."))n=(n||window)[r];return e.preventDefault(),e.stopPropagation(),n(t)}_addEvents(e){if(e.isConnected)for(const s of this._events)if(s.selector.startsWith("."))for(const n of document.querySelectorAll(s.selector))this._addEventToElement(s,n);else{var t=document.querySelector(s.selector);this._addEventToElement(s,t)}}_addEventToElement(e,t){t&&("function"==typeof e.callback?(t.removeEventListener(e.eventType,e.callback),t.addEventListener(e.eventType,e.callback)):(t.removeEventListener(e.eventType,this._outerEventHandler),t.addEventListener(e.eventType,this._outerEventHandler)))}removeEvents(){for(const t of this._events)if(t.selector.startsWith("."))for(const s of document.querySelectorAll(t.selector))this._addEventToElement(t,s);else{var e=document.querySelector(t.selector);this._addEventToElement(t,e)}this._events=[]}_removeEventToElement(e,t){t&&("function"==typeof e.callback?t.removeEventListener(e.eventType,e.callback):t.removeEventListener(e.eventType,this._outerEventHandler))}_assignToDom(e,t){e.innerHTML="";for(const n of Array.isArray(t)?t:[t])e.append(n);const s=setTimeout(()=>{this._addEvents(e),clearTimeout(s)},10)}}const u='',m='';function l(e){const t=new DOMParser;return t.parseFromString(e,"image/svg+xml").documentElement}class e extends HTMLElement{base;component=null;_contents=[];_orderBy=[];properties=new Set;_columnOrder=[];_filter="";_selectionProperty="";_selectedIds=new Set;uniqueEntriesByProperties={};propertyLabelDictionary={};_templates={};_templateClasses={};static get observedAttributes(){return["contents","columns","order","filter","selection-property","templates"]}get columnOrder(){return this._columnOrder.length?this._columnOrder:this.properties}set columnOrder(e){let t;"string"==typeof e&&(t=e.split(",")),t=e,this._columnOrder=t}get contents(){return this._contents}set contents(e){this.analyzeData(e),this._contents=e}get orderBy(){return this._orderBy}set orderBy(e){if(Array.isArray(e))this._orderBy=e;else{const n=[];for(const r of e.split(",")){var t=r.split("|"),s=t[0],t=1e[s._selectionProperty])):new Set;e=t?s.contents.execute():[];s._emit("select",s,{selection:e}),s._updateCheckboxes(s)}emitSelect(e){var t=e.target.checked,s=e.target.dataset.objectId;const n=h(e).target,r=(t?n._selectedIds.add(s):n._selectedIds.delete(s),n._selectionProperty);e=n.contents.execute().filter(e=>n._selectedIds.has(e[r]));n._emit("select",n,{selection:e}),n._updateCheckboxes(n)}sortData(e){const t=h(e).target,s=p(e,"column");s&&(-1<(e=t._orderBy.findIndex(e=>e.propertyName===s))?"asc"===t._orderBy[e].direction?t._orderBy[e].direction="desc":t._orderBy.splice(e,1):t._orderBy.push({propertyName:s,direction:"asc"}),t.createHtml(),t.base.render(t))}setColumnOrder(e){this._columnOrder=e?Array.isArray(e)?e:e.split(","):[]}analyzeData(t){this.properties=new Set;var s=t.length;for(let e=0;e"_"===e?" ":" "+e.toLowerCase()).trim();var s=t.charAt(0).toUpperCase()+t.slice(1);return this.propertyLabelDictionary[e]=s}parseTemplate(e,n){return e.replace(/\{\{([\s\S]+?)\}\}/gim,(e,t)=>{let s="";t=t.trim();t=n[t];return t&&(s=t),Array.isArray(s)?s.join(", "):s.toString().trim()})}createSelectionCheckbox(e){const t=document.createElement("input");return t.setAttribute("type","checkbox"),t.classList.add("flk-selection-checkbox"),e&&(t.dataset.selected=e[this._selectionProperty]),t}createRow(e){const t=document.createElement("tr");if(this._selectionProperty.length){const r=document.createElement("td");var s=this.base.generateId();const i=this.createSelectionCheckbox(e);i.id=s,i.dataset.objectId=e[this._selectionProperty];var n=e[this._selectionProperty];this._selectedIds.has(n)?i.checked=!0:i.checked=!1,this.base.addEvent("#"+s,"change",this.emitSelect),r.append(i),t.append(r)}for(const o of this.columnOrder){const a=document.createElement("td");this._templates[o]?(a.innerHTML=this.parseTemplate(this._templates[o],e),this._templateClasses[o]&&a.classList.add(...this._templateClasses[o])):a.innerText=e[o],t.append(a)}return t}createBody(e){const t=document.createElement("tbody");for(const n of e){var s=this.createRow(n,null);t.append(s)}return t}createHead(){const e=document.createElement("thead"),t=document.createElement("tr");if(t.classList.add("cursor-pointer"),this._selectionProperty.length){const r=document.createElement("th");var s=this.base.generateId();const i=this.createSelectionCheckbox();i.id=s;var d=this.contents.execute().length;0e.propertyName===o);const c=document.createElement("span");n?c.innerHTML="asc"===n.direction?'':'':(c.style.display="inline-block",c.style.width="24px"),a.append(c),t.append(a)}return e.append(t),e}addEvent(e,t,s){this.base.addEvent(e,t,s)}init(){this.createHtml(),this.base.render(this)}}class t extends HTMLElement{base;componentId;constructor(){super(),this.base=new r}connectedCallback(){var e=this.getAttribute("top"),t=this.getAttribute("left"),s=this.getAttribute("center"),n=this.getAttribute("zIndex");this.id||(this.id=this.base.generateId()),this.style.display="block",this.style.position="fixed","string"==typeof s?(this.style.top=e||"50%",this.style.left="50%",this.style.transform="translate(-50%, -50%)"):(this.style.top=e||this.clientTop+"px",this.style.left=t||this.clientLeft+"px"),n&&(this.style.zIndex=n),this.componentId=this.getAttribute("handle");const r=document.createElement("div");r.innerHTML=this.innerHTML,this.component=r;s="#"+(this.componentId||this.id);this.base.addEvent(s,"mousedown",this._dragElement),this.base.addEvent(s,"mouseup",this._reset),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this)}_dragElement(e){const s=h(e,"flk-draggable").target;let n,r;function t(e){n=e.clientX-s.offsetLeft,r=e.clientY-s.offsetTop}function i(e){var t=e.clientX-n,e=e.clientY-r;s.style.left=t+"px",s.style.top=e+"px"}function o(e){e.preventDefault()}function a(){s.removeAttribute("draggable"),s.removeEventListener("dragstart",t),s.removeEventListener("dragend",a),document.removeEventListener("dragover",o),document.removeEventListener("drop",i)}s.setAttribute("draggable",!0),s.addEventListener("dragstart",t),s.addEventListener("dragend",a),document.addEventListener("dragover",o),document.addEventListener("drop",i)}}class s extends HTMLElement{_id;base;_draggableId;constructor(){super(),this.base=new r}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}_closeModal(e){e.stopPropagation();const t=h(e,"flk-modal").target;t.classList.add("hidden")}closeModal(e){this.classList.add("hidden")}openModal(e=!0){const t=document.getElementById(this._draggableId);e&&(t.style.top="40%",t.style.left="50%"),this.classList.remove("hidden")}connectedCallback(){this.id||(this.id=this.base.generateId());const e=document.createElement("div");var t=this.base.generateId();const s=document.createElement("flk-draggable"),n=(this._draggableId=this.base.generateId(),s.id=this._draggableId,s.setAttribute("center",""),s.setAttribute("top","40%"),s.setAttribute("handle",t),s.setAttribute("zIndex","1080"),s.classList.add("border","shadow-lg","bg-white"),s.style.width="max-content",document.createElement("div"));var r=this.getAttribute("modal-title");if(r){const c=document.createElement("span");c.innerText=r,c.classList.add("ml-1","mr-auto"),n.append(c)}n.id=t;const i=this.getAttribute("header-class");let o=[];i?o=o.concat(i.split(" ")):o.push("bg-gray-light"),n.classList.add(...o,"border-bottom","row","justify-end","cursor-no-select");r=this.base.generateId();const a=document.createElement("button"),l=(a.classList.add("py-0","px-1","outline-hover","no-border","cursor-default",...o),a.innerText="X",a.id=r,n.append(a),s.append(n),document.createElement("div"));l.innerHTML=this.innerHTML,s.append(l),e.append(s),this.component=e,this.base.addEvent("#"+r,"click",this._closeModal),this.base.render(this),this.classList.add("hidden")}disconnectedCallback(){this.base.removeEvents(this)}}class n extends HTMLElement{base;_buttonId;_drawerId;_iconId;constructor(){super(),this.base=new r}connectedCallback(){this.style.position="relative",this.style.display="flex",this.style.width="fit-content",this._buttonId=this.base.generateId();const e=document.createElement("button"),t=(e.setAttribute("type","button"),e.classList.add("row"),e.id=this._buttonId,document.createElement("span")),s=(t.classList.add("self-align-center"),t.innerText=this.getAttribute("text"),this._iconId=this.base.generateId(),document.createElement("span"));s.classList.add("self-align-center");var n=l('');const r=l(''),i=(r.classList.add("hidden"),s.append(n,r),s.id=this._iconId,e.append(t,s),this._drawerId=this.base.generateId(),document.createElement("div"));i.id=this._drawerId,i.classList.add("shadow","inline-block","bg-white"),i.style.position="absolute",i.style.zIndex="1040";n=this.querySelector("template");n.innerHTML.length?i.innerHTML=n.innerHTML:i.append(n.firstChild),i.style.display="none",this.component=[e,i],this.base.addEvent("#"+this._buttonId,"click",this.toggleMenu);const o=document.querySelector("body");""!==o.getAttribute("flk-close-dropdown")&&(o.setAttribute("flk-close-dropdown",""),o.addEventListener("click",this.closeAllDropdownButtons)),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this);var e=document.querySelectorAll("flk-dropdown");if(!e||!e.length){const t=document.querySelector("body");t.removeAttribute("flk-close-dropdown"),t.removeEventListener("click",this.closeAllDropdownButtons)}}toggleMenu(e){const t=h(e).target;e=t._drawerId;const s=document.getElementById(e);var e="none"!==s.style.display,n=(s.style.display=e?"none":"block",t.getAttribute("drawer-width")),n=("string"==typeof t.getAttribute("right")&&(s.style.right="0px"),s.style.top=t.offsetHeight+"px",s.style.width=n||t.offsetWidth+"px",t._iconId);const r=document.getElementById(n);e?(r.childNodes[0].classList.remove("hidden"),r.childNodes[1].classList.add("hidden")):(r.childNodes[0].classList.add("hidden"),r.childNodes[1].classList.remove("hidden"))}_closeDropdown(){var e=this._drawerId;const t=document.getElementById(e);if("none"!==t.style.display){e=this._iconId;const s=document.getElementById(e);t.style.display="none",s.childNodes[0].classList.remove("hidden"),s.childNodes[1].classList.add("hidden")}}closeAllDropdownButtons(e){var t,s=h(e,"flk-dropdown").target,e=document.querySelectorAll("flk-dropdown");if(s)for(const n of e)s._buttonId!==n._buttonId&&(t=n._drawerId,"none"!==document.getElementById(t).style.display&&n._closeDropdown());else for(const r of e)r._closeDropdown()}}class o extends HTMLElement{base;contents;component;listType="ul";iconSet;filter={value:"",caseSensitive:!1};selectedElements=[];static get observedAttributes(){return["contents","icon-set","max-depth","filter"]}_jsonToValueArray(e){let t=JSON.stringify(e);t=t.replace(/[\[\]{}\"]/g,"");let s=[];for(const n of t.split(","))s=s.concat(n.split(":"));return[...new Set(s)]}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}constructor(){super(),this.base=new r,this.setContents(this.getAttribute("contents")),this.iconSet=this.getAttribute("icon-set")?this.getAttribute("icon-type"):"file",this.maxDepth=this.getAttribute("max-depth")?parseInt(this.getAttribute("max-depth")):-1,this.setFilter(this.getAttribute("filter")),this.style.display="block",this.style.maxWidth="fit-content",this.style.margin="0 1rem 0 0",this.base.addEvent(".flk-branch","click",this.emitNodeToggle)}deselectTree(){if(this.selectedElements.length)for(const e of this.selectedElements)e.classList.remove("font-weight-bold"),delete e.dataset.selected}emitNodeToggle(e){if(e.stopPropagation(),["LI","UL"].includes(e.target.tagName))return!1;const t=h(e,"flk-tree-nav").target,s=p(e,"branchKey");let n=t.contents;const r=s.split(".");for(const a of r)if(n[a])n=n[a];else if(null===n[a])n=null;else{let e=[];for(const l of n)l[a]&&e.push(l[a]);n=e}let i,o=e.target;for(;o.dataset&&o.dataset.leafKey?i=o.dataset.leafKey:o=o.parentNode||o.parentElement,!i;);t.selectedElements.length&&t.deselectTree(),t.selectedElements=[],"DETAILS"===o.tagName?(t.selectedElements.push(o.childNodes[0]),o.childNodes.length&&o.childNodes[0].childNodes.length&&"DIV"===o.childNodes[0].childNodes[0].tagName&&(console.log(o.childNodes[0].childNodes),t.selectedElements=o.childNodes[0].childNodes[0].childNodes)):t.selectedElements.push(o);for(const c of t.selectedElements)c.dataset.selected||(c.classList.add("font-weight-bold"),c.dataset.selected=!0);var e=s.substring(s.indexOf(".")+1),d=t.createLeafText(r.reverse()[0]);t._emit("tree-click",t,{path:e,data:n,key:i,label:(d.titleText+" "+d.commentText).trim(),branch:"object"==typeof n})}convertJsonKeyToTitle(e){if(!e)return"";const t=(e="string"!=typeof e?e.toString():e).replace(/([A-Z_])/g,e=>"_"===e?" ":" "+e).trim();return t.charAt(0).toUpperCase()+t.slice(1)}setContents(e){var t=e||this.contents||[];try{switch(typeof t){case"string":this.contents=JSON.parse(t);break;case"object":Array.isArray(t)?this.contents=t:this.contents=[t]}}catch(e){console.log(e)}}applyFilter(e){let t;var s="details"===e.tagName.toLowerCase();t=this.filter.caseSensitive?e.dataset.branchValues.includes(this.filter.value):e.dataset.branchValues.toLowerCase().includes(this.filter.value.toLowerCase()),t?e.parentElement.classList.remove("hidden"):e.parentElement.classList.add("hidden"),s&&t?e.setAttribute("open",""):e.removeAttribute("open")}resetTree(e){e.parentElement.classList.remove("hidden"),e.removeAttribute("open")}filterTree(){let t=setTimeout(()=>{for(const e of this.querySelectorAll("[data-branch-values]"))void 0===this.filter.value||0===this.filter.value.length?this.resetTree(e):this.applyFilter(e);clearTimeout(t)},10)}setFilter(e){const t=e||{};try{switch(typeof t){case"string":t.includes("{")?(this.filter=JSON.parse(t),!1===this.filter.caseSensitive&&(this.filter.value=this.filter.value.toLowerCase())):this.filter.value=e.toLowerCase();break;case"object":this.filter=t}}catch(e){console.log(e)}this.filterTree()}createLeafText(e){var t,s;let n="",r="";return"string"==typeof e&&(e.includes("(")||e.includes("["))?(s=e.indexOf("("),s=-1===(t=e.indexOf("["))?s:t,n=this.convertJsonKeyToTitle(e.substring(0,s)),r=e.substring(s)):n=this.convertJsonKeyToTitle(e),{titleText:n,commentText:r}}createTextTag(n,r){n=this.createLeafText(n);if(n.commentText){let e=document.createElement("div"),t=document.createElement("span"),s=(t.innerText=n.titleText,document.createElement("small"));s.innerText=n.commentText,s.style.marginLeft="1rem",e.append(t,s),e.style.display="inline-flex",e.style.alignItems="center",r.append(e)}else r.innerText=n.titleText}createLeaf(e,t,s,n=[]){let r=document.createElement("li");r.classList.add("cursor-no-select"),r.style.marginTop="0.4rem",r.dataset.branchKey=s;const i="file"===this.iconSet?'':'';r.style.listStyleImage=`url('data:image/svg+xml,${i}')`,r.style.position="relative",r.style.left="2px";let o=document.createElement("span");s=[e].concat(n);if(o.dataset.branchValues=[...new Set(s)].join(),o.dataset.leafKey=s[0],this.createTextTag(e,o),o.style.position="relative",o.style.top="-3px",r.append(o),t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);const i="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${i}')`,e.append(r),t.append(e)}else t.append(r)}createBranch(s,t,n,r){if(r===this.maxDepth&&"object"==typeof s)for(const o of Array.isArray(s)?s:Object.keys(s)){let e;s[o]&&(e=this._jsonToValueArray(s[o])),this.createLeaf(o,t,n+"."+o,e)}else if(Array.isArray(s))for(var e in s){var d=document.createElement(this.listType);t.append(this.createBranch(s[e],d,n+"."+e,r+1))}else if(null!==s&&"object"==typeof s){const a=[];for(const l of Object.keys(s)){let e=document.createElement("li"),t=(e.classList.add("cursor-no-select"),e.style.position="relative",e.style.left="2px",e.dataset.branchKey=n+"."+l,document.createElement("details"));t.classList.add("flk-branch"),t.dataset.branchValues=[l].concat(this._jsonToValueArray(s[l])),t.style.position="relative",t.style.top="-3px",t.classList.add("cursor-default");var i=document.createElement("summary");this.createTextTag(l,i),t.dataset.leafKey=l,t.append(i),e.append(this.createBranch(s[l],t,n+"."+l,r+1)),a.push(e)}if(t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);var h="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${h}')`;for(const c of a)e.append(c);t.append(e)}else for(const p of a)t.append(p)}else this.createLeaf(s,t,n);return t}createHtml(){let e=document.createElement(this.listType);var t="file"===this.iconSet?u:'';if(e.style.listStyleImage=`url('data:image/svg+xml,${t}')`,e.style.marginLeft="3rem",this.contents.length){for(const s in this.contents)e=this.createBranch(this.contents[s],e,s,0);this.component=e}else this.component=e}attributeChangedCallback(e,t,s){switch(e){case"contents":this.setContents(s);break;case"icon-set":this.iconSet=s;break;case"max-depth":this.maxDepth="string"==typeof s?parseInt(s):s;break;case"filter":this.setFilter(s)}this.init()}connectedCallback(){this.init()}disconnectedCallback(){this.base.removeEvents(this)}init(){this.createHtml(),this.base.render(this)}}customElements.define("flk-table",e),customElements.define("flk-draggable",t),customElements.define("flk-modal",s),customElements.define("flk-dropdown",n),customElements.define("flk-tree-nav",o)}(); \ No newline at end of file diff --git a/docs/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js b/docs/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js new file mode 100644 index 0000000..c035056 --- /dev/null +++ b/docs/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js @@ -0,0 +1 @@ +!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";htmx.defineExtension("ibiss-ui",{onEvent:function(t,e){if("htmx:beforeRequest"===t){const{target:i,detail:n}=e;t=i.getAttribute("ibiss-router");if(window[t]&&"function"==typeof window[t])return window[t](i,n,e),!1}}})}); \ No newline at end of file diff --git a/docs/cdn/ibiss-v0.0.9/rocket.min.js b/docs/cdn/ibiss-v0.0.9/rocket.min.js new file mode 100644 index 0000000..0a7f9d0 --- /dev/null +++ b/docs/cdn/ibiss-v0.0.9/rocket.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).rocketjs=t()}(this,function(){"use strict";function y(e,t){let r=0,l=e.indexOf(t);for(;-1!==l;)r++,l=e.indexOf(t,l+1);return r}function e(){return{sequence:"",match:!1}}function v(e,t,r){let l=r.sequence;return l.length===t.length&&(l=l.substring(1)),l+=e,r.sequence=l,r.match=l===t,r}class g{static getTemplates(t,r,l){if(r.length!==l.length)throw new Error("Template start is not the same length as template end");var g=t.length;let a=e(),o=e(),n=0,s=0,i=[],p=[];const u=[];for(let e=0;ee.replace(new RegExp(t,"g"),r));return l=l.replace(/if([\s\S]+?)\s|is|not/gm,e=>e.replace(new RegExp(t,"g"),r)),l=l.replace(/(of|in)([\s\S]+?)(?=<|{)/gm,e=>e.replace(new RegExp(t,"g"),r)),l}}class o{static resolvePartials(e,t){let r=e;for(const a of g.getTemplates(e,"{{#","#}}")){var l=g.getInnerTemplate(a),l=g.getPropertyValue(l,t);let e=l?l:"";r=r.replace(a,e)}if(r.includes("{{#")){if(e===r)return r;r=o.resolvePartials(r,t)}return r}}class s{static interpolateTemplate(e,r){let l=e;for(const n of g.getTemplates(e,"{{","}}")){let e=g.getInnerTemplate(n,2);var a="!"===e[0],o=(a&&(e=e.substr(1).trim()),g.getPropertyValue(e,r));let t=o?o:"";t=Array.isArray(t)?t.join(", "):t.toString().trim();o=a?s.escapeHtml(t):t;l=l.replace(n,o)}return l}static escapeHtml(e){return e=(e=(e=(e=(e=e.replace(/&/gm,"&")).replace(//gm,">")).replace(/"/gm,""")).replace(/\//gm,"'")}}class r{static buildTemplate(e,t){e=o.resolvePartials(e,t),e=class{static resolveWrapper(e){let t=e;for(const o of g.getTemplates(e,"{{$","$}}")){var r=g.getWrapperProperty(o),l=g.getTemplates(r.templateToFill,"{{","}}"),l=g.getToplevelTemplates(l);let e=r.templateToFill;for(const n of l){var a=g.getProperty(n);e=e.replace(new RegExp(a,"g"),r.property+"."+a)}t=t.replace(o,e)}return t}}.resolveWrapper(e);return e=c.resolveLoop(e,t),class{static resolveConditional(e,l){let a=e;for(const p of g.getTemplates(e,"{{~","~}}")){const c=g.getConditionalLogic(p);var o=c.property,n=c.logiclessTemplate,s=c.truthy,i=!c.truthy;let e="",t=(c.comparison&&(e=c.comparison),""),r=g.getPropertyValue(o,l);r&&(r=Array.isArray(r)?r:r.toString().trim().toLocaleLowerCase(),e=c.comparison?c.comparison.toLocaleLowerCase():null),e?(s&&(t=r===e?n:""),i&&(t=r!==e?n:"")):t="false"===r||!r||Array.isArray(r)&&!r.length?"":n,a=a.replace(p,t)}return a}}.resolveConditional(e,t)}static interpolateTemplate(e,t){return s.interpolateTemplate(e,t)}static render(e,t){e=r.buildTemplate(e,t);return r.interpolateTemplate(e,t)}}return r}); \ No newline at end of file diff --git a/docs/js/flightkit.min.js b/docs/js/flightkit.min.js index af4f23f..19d801c 100644 --- a/docs/js/flightkit.min.js +++ b/docs/js/flightkit.min.js @@ -1 +1 @@ -!function(){"use strict";function i(e,t){if(!t||0===t.length)return e;const s=Object.assign([],e);if(Array.isArray(s[0])){e=s;var n=t;const r=[];for(const i of e)r.push(i.sort(E(n)));r}else s.sort(E(t));return s}function y(e){let t=e.toString();e=t.match(/^\d+|\d+$/);return e?parseInt(e[0]):null}function b(e){return"boolean"==typeof e||"string"==typeof e&&("true"===(e=e.toLocaleLowerCase())||"false"===e)}function w(e){return"boolean"==typeof e?e:"true"===e.toLocaleLowerCase()}function E(f,v=0){return function(e,t){var{propertyName:s,direction:d}=f[v];let n=null===e[s]||void 0===e[s]?"":e[s],r=null===t[s]||void 0===t[s]?"":t[s];const h=/^(\d{1,4}-\d{1,4}-\d{1,4}(T)?)/gim;var s=n instanceof Date&&r instanceof Date||h.test(n)&&h.test(r),p=(s&&(n=n instanceof Date?n.valueOf():new Date(Date.parse(n)),r=r instanceof Date?r.valueOf():new Date(Date.parse(r))),b(n)&&b(r)),u=!p&&!isNaN(n)&&!isNaN(r),i=y(n),o=y(r);u?(n=parseFloat(n).toPrecision(12),r=parseFloat(r).toPrecision(12)):null!==i&&null!==o&&(n=parseFloat(i).toPrecision(12),r=parseFloat(o).toPrecision(12)),p&&(n=w(n),r=w(r));let a,l;switch(d){case"descending":case"desc":a=r,l=n;break;default:a=n,l=r}let c=0;if(p||s||u)c=a-l;else{a=a.toString().trim().toLowerCase(),l=l.toString().trim().toLowerCase();const m=/\d/gim;i=m.test(n)&&m.test(r);c=i?a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"}):a.localeCompare(l)}o=v+1;if(0===c&&o(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),s=t.split("-")[0];return window.$flightkitUUIDStore||(window.$flightkitUUIDStore=[]),window.$flightkitUUIDStore.some(e=>e===s)?e():(window.$flightkitUUIDStore.push(s),s)}()}render(t){if(!t.component)throw new Error("Component is not assigned! Can't render");t.id=t.id||this.generateId();var e=this._getAllEventAttributes(t);if(e){var s="#"+t.id;for(const i of e){var n="e-"+i;this.addEvent(s,i,t.getAttribute(n))}}var r=Object.keys(t.classList).length;if(r){for(let e=0;e{this._assignToDom(t,t.component),clearTimeout(this._renderTimer)},10)}addEvent(e,t,s){this._events.push({selector:e,eventType:t,callback:s})}_getExternalCallback(e){let t=void 0;for(const s of e.split("."))t=(t||window)[s];return t}_getAllEventAttributes(e){e=e.attributes;const t=Array.from(e).filter(e=>e.name.startsWith("e-"));return t.map(e=>e.name.slice(2))}_isFlightkitElement(e){return e.toUpperCase().includes("FLK-")}_outerEventHandler(e){const t=h(e),s=(t.contents=e.detail,t.target.getAttribute("e-"+t.type));let n=void 0;for(const r of s.split("."))n=(n||window)[r];return e.preventDefault(),e.stopPropagation(),n(t)}_addEvents(e){if(e.isConnected)for(const s of this._events)if(s.selector.startsWith("."))for(const n of document.querySelectorAll(s.selector))this._addEventToElement(s,n);else{var t=document.querySelector(s.selector);this._addEventToElement(s,t)}}_addEventToElement(e,t){t&&("function"==typeof e.callback?(t.removeEventListener(e.eventType,e.callback),t.addEventListener(e.eventType,e.callback)):(t.removeEventListener(e.eventType,this._outerEventHandler),t.addEventListener(e.eventType,this._outerEventHandler)))}removeEvents(){for(const t of this._events)if(t.selector.startsWith("."))for(const s of document.querySelectorAll(t.selector))this._addEventToElement(t,s);else{var e=document.querySelector(t.selector);this._addEventToElement(t,e)}this._events=[]}_removeEventToElement(e,t){t&&("function"==typeof e.callback?t.removeEventListener(e.eventType,e.callback):t.removeEventListener(e.eventType,this._outerEventHandler))}_assignToDom(e,t){e.innerHTML="";for(const n of Array.isArray(t)?t:[t])e.append(n);const s=setTimeout(()=>{this._addEvents(e),clearTimeout(s)},10)}}const u='',m='';function l(e){const t=new DOMParser;return t.parseFromString(e,"image/svg+xml").documentElement}class e extends HTMLElement{base;component=null;_contents=[];_orderBy=[];properties=new Set;_columnOrder=[];_filter="";_selectionProperty="";_selectedIds=new Set;uniqueEntriesByProperties={};propertyLabelDictionary={};_templates={};_templateClasses={};static get observedAttributes(){return["contents","columns","order","filter","selection-property","templates"]}get columnOrder(){return this._columnOrder.length?this._columnOrder:this.properties}set columnOrder(e){let t;"string"==typeof e&&(t=e.split(",")),t=e,this._columnOrder=t}get contents(){return this._contents}set contents(e){this.analyzeData(e),this._contents=e}get orderBy(){return this._orderBy}set orderBy(e){if(Array.isArray(e))this._orderBy=e;else{const n=[];for(const r of e.split(",")){var t=r.split("|"),s=t[0],t=1e[s._selectionProperty])):new Set;e=t?s.contents.execute():[];s._emit("select",s,{selection:e}),s._updateCheckboxes(s)}emitSelect(e){var t=e.target.checked,s=e.target.dataset.objectId;const n=h(e).target,r=(t?n._selectedIds.add(s):n._selectedIds.delete(s),n._selectionProperty);e=n.contents.execute().filter(e=>n._selectedIds.has(e[r]));n._emit("select",n,{selection:e}),n._updateCheckboxes(n)}sortData(e){const t=h(e).target,s=p(e,"column");s&&(-1<(e=t._orderBy.findIndex(e=>e.propertyName===s))?"asc"===t._orderBy[e].direction?t._orderBy[e].direction="desc":t._orderBy.splice(e,1):t._orderBy.push({propertyName:s,direction:"asc"}),t.createHtml(),t.base.render(t))}setColumnOrder(e){this._columnOrder=e?Array.isArray(e)?e:e.split(","):[]}analyzeData(t){this.properties=new Set;var s=t.length;for(let e=0;e"_"===e?" ":" "+e.toLowerCase()).trim();var s=t.charAt(0).toUpperCase()+t.slice(1);return this.propertyLabelDictionary[e]=s}parseTemplate(e,n){return e.replace(/\{\{([\s\S]+?)\}\}/gim,(e,t)=>{let s="";t=t.trim();t=n[t];return t&&(s=t),Array.isArray(s)?s.join(", "):s.toString().trim()})}createSelectionCheckbox(e){const t=document.createElement("input");return t.setAttribute("type","checkbox"),t.classList.add("flk-selection-checkbox"),e&&(t.dataset.selected=e[this._selectionProperty]),t}createRow(e){const t=document.createElement("tr");if(this._selectionProperty.length){const r=document.createElement("td");var s=this.base.generateId();const i=this.createSelectionCheckbox(e);i.id=s,i.dataset.objectId=e[this._selectionProperty];var n=e[this._selectionProperty];this._selectedIds.has(n)?i.checked=!0:i.checked=!1,this.base.addEvent("#"+s,"change",this.emitSelect),r.append(i),t.append(r)}for(const o of this.columnOrder){const a=document.createElement("td");this._templates[o]?(a.innerHTML=this.parseTemplate(this._templates[o],e),this._templateClasses[o]&&a.classList.add(...this._templateClasses[o])):a.innerText=e[o],t.append(a)}return t}createBody(e){const t=document.createElement("tbody");for(const n of e){var s=this.createRow(n,null);t.append(s)}return t}createHead(){const e=document.createElement("thead"),t=document.createElement("tr");if(t.classList.add("cursor-pointer"),this._selectionProperty.length){const r=document.createElement("th");var s=this.base.generateId();const i=this.createSelectionCheckbox();i.id=s;var d=this.contents.execute().length;0e.propertyName===o);if(n){const c=document.createElement("span");c.innerHTML="asc"===n.direction?'':'',a.append(c)}t.append(a)}return e.append(t),e}addEvent(e,t,s){this.base.addEvent(e,t,s)}init(){this.createHtml(),this.base.render(this)}}class t extends HTMLElement{base;componentId;constructor(){super(),this.base=new r}connectedCallback(){var e=this.getAttribute("top"),t=this.getAttribute("left"),s=this.getAttribute("center"),n=this.getAttribute("zIndex");this.id||(this.id=this.base.generateId()),this.style.display="block",this.style.position="fixed","string"==typeof s?(this.style.top=e||"50%",this.style.left="50%",this.style.transform="translate(-50%, -50%)"):(this.style.top=e||this.clientTop+"px",this.style.left=t||this.clientLeft+"px"),n&&(this.style.zIndex=n),this.componentId=this.getAttribute("handle");const r=document.createElement("div");r.innerHTML=this.innerHTML,this.component=r;s="#"+(this.componentId||this.id);this.base.addEvent(s,"mousedown",this._dragElement),this.base.addEvent(s,"mouseup",this._reset),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this)}_dragElement(e){const s=h(e,"flk-draggable").target;let n,r;function t(e){n=e.clientX-s.offsetLeft,r=e.clientY-s.offsetTop}function i(e){var t=e.clientX-n,e=e.clientY-r;s.style.left=t+"px",s.style.top=e+"px"}function o(e){e.preventDefault()}function a(){s.removeAttribute("draggable"),s.removeEventListener("dragstart",t),s.removeEventListener("dragend",a),document.removeEventListener("dragover",o),document.removeEventListener("drop",i)}s.setAttribute("draggable",!0),s.addEventListener("dragstart",t),s.addEventListener("dragend",a),document.addEventListener("dragover",o),document.addEventListener("drop",i)}}class s extends HTMLElement{_id;base;_draggableId;constructor(){super(),this.base=new r}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}_closeModal(e){e.stopPropagation();const t=h(e,"flk-modal").target;t.classList.add("hidden")}closeModal(e){this.classList.add("hidden")}openModal(e=!0){const t=document.getElementById(this._draggableId);e&&(t.style.top="40%",t.style.left="50%"),this.classList.remove("hidden")}connectedCallback(){this.id||(this.id=this.base.generateId());const e=document.createElement("div");var t=this.base.generateId();const s=document.createElement("flk-draggable"),n=(this._draggableId=this.base.generateId(),s.id=this._draggableId,s.setAttribute("center",""),s.setAttribute("top","40%"),s.setAttribute("handle",t),s.setAttribute("zIndex","1080"),s.classList.add("border","shadow-lg","bg-white"),s.style.width="max-content",document.createElement("div"));var r=this.getAttribute("modal-title");if(r){const c=document.createElement("span");c.innerText=r,c.classList.add("ml-1","mr-auto"),n.append(c)}n.id=t;const i=this.getAttribute("header-class");let o=[];i?o=o.concat(i.split(" ")):o.push("bg-gray-light"),n.classList.add(...o,"border-bottom","row","justify-end","cursor-no-select");r=this.base.generateId();const a=document.createElement("button"),l=(a.classList.add("py-0","px-1","outline-hover","no-border","cursor-default",...o),a.innerText="X",a.id=r,n.append(a),s.append(n),document.createElement("div"));l.innerHTML=this.innerHTML,s.append(l),e.append(s),this.component=e,this.base.addEvent("#"+r,"click",this._closeModal),this.base.render(this),this.classList.add("hidden")}disconnectedCallback(){this.base.removeEvents(this)}}class n extends HTMLElement{base;_buttonId;_drawerId;_iconId;constructor(){super(),this.base=new r}connectedCallback(){this.style.position="relative",this.style.display="flex",this.style.width="fit-content",this._buttonId=this.base.generateId();const e=document.createElement("button"),t=(e.setAttribute("type","button"),e.classList.add("row"),e.id=this._buttonId,document.createElement("span")),s=(t.classList.add("self-align-center"),t.innerText=this.getAttribute("text"),this._iconId=this.base.generateId(),document.createElement("span"));s.classList.add("self-align-center");var n=l('');const r=l(''),i=(r.classList.add("hidden"),s.append(n,r),s.id=this._iconId,e.append(t,s),this._drawerId=this.base.generateId(),document.createElement("div"));i.id=this._drawerId,i.classList.add("shadow","inline-block","bg-white"),i.style.position="absolute",i.style.zIndex="1040";n=this.querySelector("template");n.innerHTML.length?i.innerHTML=n.innerHTML:i.append(n.firstChild),i.style.display="none",this.component=[e,i],this.base.addEvent("#"+this._buttonId,"click",this.toggleMenu);const o=document.querySelector("body");""!==o.getAttribute("flk-close-dropdown")&&(o.setAttribute("flk-close-dropdown",""),o.addEventListener("click",this.closeAllDropdownButtons)),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this);var e=document.querySelectorAll("flk-dropdown");if(!e||!e.length){const t=document.querySelector("body");t.removeAttribute("flk-close-dropdown"),t.removeEventListener("click",this.closeAllDropdownButtons)}}toggleMenu(e){const t=h(e).target;e=t._drawerId;const s=document.getElementById(e);var e="none"!==s.style.display,n=(s.style.display=e?"none":"block",t.getAttribute("drawer-width")),n=("string"==typeof t.getAttribute("right")&&(s.style.right="0px"),s.style.top=t.offsetHeight+"px",s.style.width=n||t.offsetWidth+"px",t._iconId);const r=document.getElementById(n);e?(r.childNodes[0].classList.remove("hidden"),r.childNodes[1].classList.add("hidden")):(r.childNodes[0].classList.add("hidden"),r.childNodes[1].classList.remove("hidden"))}_closeDropdown(){var e=this._drawerId;const t=document.getElementById(e);if("none"!==t.style.display){e=this._iconId;const s=document.getElementById(e);t.style.display="none",s.childNodes[0].classList.remove("hidden"),s.childNodes[1].classList.add("hidden")}}closeAllDropdownButtons(e){var t,s=h(e,"flk-dropdown").target,e=document.querySelectorAll("flk-dropdown");if(s)for(const n of e)s._buttonId!==n._buttonId&&(t=n._drawerId,"none"!==document.getElementById(t).style.display&&n._closeDropdown());else for(const r of e)r._closeDropdown()}}class o extends HTMLElement{base;contents;component;listType="ul";iconSet;filter={value:"",caseSensitive:!1};selectedElements=[];static get observedAttributes(){return["contents","icon-set","max-depth","filter"]}_jsonToValueArray(e){let t=JSON.stringify(e);t=t.replace(/[\[\]{}\"]/g,"");let s=[];for(const n of t.split(","))s=s.concat(n.split(":"));return[...new Set(s)]}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}constructor(){super(),this.base=new r,this.setContents(this.getAttribute("contents")),this.iconSet=this.getAttribute("icon-set")?this.getAttribute("icon-type"):"file",this.maxDepth=this.getAttribute("max-depth")?parseInt(this.getAttribute("max-depth")):-1,this.setFilter(this.getAttribute("filter")),this.style.display="block",this.style.maxWidth="fit-content",this.style.margin="0 1rem 0 0",this.base.addEvent(".flk-branch","click",this.emitNodeToggle)}deselectTree(){if(this.selectedElements.length)for(const e of this.selectedElements)e.classList.remove("font-weight-bold"),delete e.dataset.selected}emitNodeToggle(e){if(e.stopPropagation(),["LI","UL"].includes(e.target.tagName))return!1;const t=h(e,"flk-tree-nav").target,s=p(e,"branchKey");let n=t.contents;const r=s.split(".");for(const a of r)if(n[a])n=n[a];else if(null===n[a])n=null;else{let e=[];for(const l of n)l[a]&&e.push(l[a]);n=e}let i,o=e.target;for(;o.dataset&&o.dataset.leafKey?i=o.dataset.leafKey:o=o.parentNode||o.parentElement,!i;);t.selectedElements.length&&t.deselectTree(),t.selectedElements=[],"DETAILS"===o.tagName?(t.selectedElements.push(o.childNodes[0]),o.childNodes.length&&o.childNodes[0].childNodes.length&&"DIV"===o.childNodes[0].childNodes[0].tagName&&(console.log(o.childNodes[0].childNodes),t.selectedElements=o.childNodes[0].childNodes[0].childNodes)):t.selectedElements.push(o);for(const c of t.selectedElements)c.dataset.selected||(c.classList.add("font-weight-bold"),c.dataset.selected=!0);var e=s.substring(s.indexOf(".")+1),d=t.createLeafText(r.reverse()[0]);t._emit("tree-click",t,{path:e,data:n,key:i,label:(d.titleText+" "+d.commentText).trim(),branch:"object"==typeof n})}convertJsonKeyToTitle(e){if(!e)return"";const t=(e="string"!=typeof e?e.toString():e).replace(/([A-Z_])/g,e=>"_"===e?" ":" "+e).trim();return t.charAt(0).toUpperCase()+t.slice(1)}setContents(e){var t=e||this.contents||[];try{switch(typeof t){case"string":this.contents=JSON.parse(t);break;case"object":Array.isArray(t)?this.contents=t:this.contents=[t]}}catch(e){console.log(e)}}applyFilter(e){let t;var s="details"===e.tagName.toLowerCase();t=this.filter.caseSensitive?e.dataset.branchValues.includes(this.filter.value):e.dataset.branchValues.toLowerCase().includes(this.filter.value.toLowerCase()),t?e.parentElement.classList.remove("hidden"):e.parentElement.classList.add("hidden"),s&&t?e.setAttribute("open",""):e.removeAttribute("open")}resetTree(e){e.parentElement.classList.remove("hidden"),e.removeAttribute("open")}filterTree(){let t=setTimeout(()=>{for(const e of this.querySelectorAll("[data-branch-values]"))void 0===this.filter.value||0===this.filter.value.length?this.resetTree(e):this.applyFilter(e);clearTimeout(t)},10)}setFilter(e){const t=e||{};try{switch(typeof t){case"string":t.includes("{")?(this.filter=JSON.parse(t),!1===this.filter.caseSensitive&&(this.filter.value=this.filter.value.toLowerCase())):this.filter.value=e.toLowerCase();break;case"object":this.filter=t}}catch(e){console.log(e)}this.filterTree()}createLeafText(e){var t,s;let n="",r="";return"string"==typeof e&&(e.includes("(")||e.includes("["))?(s=e.indexOf("("),s=-1===(t=e.indexOf("["))?s:t,n=this.convertJsonKeyToTitle(e.substring(0,s)),r=e.substring(s)):n=this.convertJsonKeyToTitle(e),{titleText:n,commentText:r}}createTextTag(n,r){n=this.createLeafText(n);if(n.commentText){let e=document.createElement("div"),t=document.createElement("span"),s=(t.innerText=n.titleText,document.createElement("small"));s.innerText=n.commentText,s.style.marginLeft="1rem",e.append(t,s),e.style.display="inline-flex",e.style.alignItems="center",r.append(e)}else r.innerText=n.titleText}createLeaf(e,t,s,n=[]){let r=document.createElement("li");r.classList.add("cursor-no-select"),r.style.marginTop="0.4rem",r.dataset.branchKey=s;const i="file"===this.iconSet?'':'';r.style.listStyleImage=`url('data:image/svg+xml,${i}')`,r.style.position="relative",r.style.left="2px";let o=document.createElement("span");s=[e].concat(n);if(o.dataset.branchValues=[...new Set(s)].join(),o.dataset.leafKey=s[0],this.createTextTag(e,o),o.style.position="relative",o.style.top="-3px",r.append(o),t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);const i="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${i}')`,e.append(r),t.append(e)}else t.append(r)}createBranch(s,t,n,r){if(r===this.maxDepth&&"object"==typeof s)for(const o of Array.isArray(s)?s:Object.keys(s)){let e;s[o]&&(e=this._jsonToValueArray(s[o])),this.createLeaf(o,t,n+"."+o,e)}else if(Array.isArray(s))for(var e in s){var d=document.createElement(this.listType);t.append(this.createBranch(s[e],d,n+"."+e,r+1))}else if(null!==s&&"object"==typeof s){const a=[];for(const l of Object.keys(s)){let e=document.createElement("li"),t=(e.classList.add("cursor-no-select"),e.style.position="relative",e.style.left="2px",e.dataset.branchKey=n+"."+l,document.createElement("details"));t.classList.add("flk-branch"),t.dataset.branchValues=[l].concat(this._jsonToValueArray(s[l])),t.style.position="relative",t.style.top="-3px",t.classList.add("cursor-default");var i=document.createElement("summary");this.createTextTag(l,i),t.dataset.leafKey=l,t.append(i),e.append(this.createBranch(s[l],t,n+"."+l,r+1)),a.push(e)}if(t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);var h="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${h}')`;for(const c of a)e.append(c);t.append(e)}else for(const p of a)t.append(p)}else this.createLeaf(s,t,n);return t}createHtml(){let e=document.createElement(this.listType);var t="file"===this.iconSet?u:'';if(e.style.listStyleImage=`url('data:image/svg+xml,${t}')`,e.style.marginLeft="3rem",this.contents.length){for(const s in this.contents)e=this.createBranch(this.contents[s],e,s,0);this.component=e}else this.component=e}attributeChangedCallback(e,t,s){switch(e){case"contents":this.setContents(s);break;case"icon-set":this.iconSet=s;break;case"max-depth":this.maxDepth="string"==typeof s?parseInt(s):s;break;case"filter":this.setFilter(s)}this.init()}connectedCallback(){this.init()}disconnectedCallback(){this.base.removeEvents(this)}init(){this.createHtml(),this.base.render(this)}}customElements.define("flk-table",e),customElements.define("flk-draggable",t),customElements.define("flk-modal",s),customElements.define("flk-dropdown",n),customElements.define("flk-tree-nav",o)}(); \ No newline at end of file +!function(){"use strict";function i(e,t){if(!t||0===t.length)return e;const s=Object.assign([],e);if(Array.isArray(s[0])){e=s;var n=t;const r=[];for(const i of e)r.push(i.sort(E(n)));r}else s.sort(E(t));return s}function v(e){let t=e.toString();e=t.match(/^\d+|\d+$/);return e?parseInt(e[0]):null}function b(e){return"boolean"==typeof e||"string"==typeof e&&("true"===(e=e.toLocaleLowerCase())||"false"===e)}function w(e){return"boolean"==typeof e?e:"true"===e.toLocaleLowerCase()}function E(f,y=0){return function(e,t){var{propertyName:s,direction:d}=f[y];let n=null===e[s]||void 0===e[s]?"":e[s],r=null===t[s]||void 0===t[s]?"":t[s];const h=/^(\d{1,4}-\d{1,4}-\d{1,4}(T)?)/gim;var s=n instanceof Date&&r instanceof Date||h.test(n)&&h.test(r),p=(s&&(n=n instanceof Date?n.valueOf():new Date(Date.parse(n)),r=r instanceof Date?r.valueOf():new Date(Date.parse(r))),b(n)&&b(r)),u=!p&&!isNaN(n)&&!isNaN(r),i=v(n),o=v(r);u?(n=parseFloat(n).toPrecision(12),r=parseFloat(r).toPrecision(12)):null!==i&&null!==o&&(n=parseFloat(i).toPrecision(12),r=parseFloat(o).toPrecision(12)),p&&(n=w(n),r=w(r));let a,l;switch(d){case"descending":case"desc":a=r,l=n;break;default:a=n,l=r}let c=0;if(p||s||u)c=a-l;else{a=a.toString().trim().toLowerCase(),l=l.toString().trim().toLowerCase();const m=/\d/gim;i=m.test(n)&&m.test(r);c=i?a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"}):a.localeCompare(l)}o=y+1;if(0===c&&o(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),s=t.split("-")[0];return window.$flightkitUUIDStore||(window.$flightkitUUIDStore=[]),window.$flightkitUUIDStore.some(e=>e===s)?e():(window.$flightkitUUIDStore.push(s),s)}()}render(t){if(!t.component)throw new Error("Component is not assigned! Can't render");t.id=t.id||this.generateId();var e=this._getAllEventAttributes(t);if(e){var s="#"+t.id;for(const i of e){var n="e-"+i;this.addEvent(s,i,t.getAttribute(n))}}var r=Object.keys(t.classList).length;if(r){for(let e=0;e{this._assignToDom(t,t.component),clearTimeout(this._renderTimer)},10)}addEvent(e,t,s){this._events.push({selector:e,eventType:t,callback:s})}_getExternalCallback(e){let t=void 0;for(const s of e.split("."))t=(t||window)[s];return t}_getAllEventAttributes(e){e=e.attributes;const t=Array.from(e).filter(e=>e.name.startsWith("e-"));return t.map(e=>e.name.slice(2))}_isFlightkitElement(e){return e.toUpperCase().includes("FLK-")}_outerEventHandler(e){const t=h(e),s=(t.contents=e.detail,t.target.getAttribute("e-"+t.type));let n=void 0;for(const r of s.split("."))n=(n||window)[r];return e.preventDefault(),e.stopPropagation(),n(t)}_addEvents(e){if(e.isConnected)for(const s of this._events)if(s.selector.startsWith("."))for(const n of document.querySelectorAll(s.selector))this._addEventToElement(s,n);else{var t=document.querySelector(s.selector);this._addEventToElement(s,t)}}_addEventToElement(e,t){t&&("function"==typeof e.callback?(t.removeEventListener(e.eventType,e.callback),t.addEventListener(e.eventType,e.callback)):(t.removeEventListener(e.eventType,this._outerEventHandler),t.addEventListener(e.eventType,this._outerEventHandler)))}removeEvents(){for(const t of this._events)if(t.selector.startsWith("."))for(const s of document.querySelectorAll(t.selector))this._addEventToElement(t,s);else{var e=document.querySelector(t.selector);this._addEventToElement(t,e)}this._events=[]}_removeEventToElement(e,t){t&&("function"==typeof e.callback?t.removeEventListener(e.eventType,e.callback):t.removeEventListener(e.eventType,this._outerEventHandler))}_assignToDom(e,t){e.innerHTML="";for(const n of Array.isArray(t)?t:[t])e.append(n);const s=setTimeout(()=>{this._addEvents(e),clearTimeout(s)},10)}}const u='',m='';function l(e){const t=new DOMParser;return t.parseFromString(e,"image/svg+xml").documentElement}class e extends HTMLElement{base;component=null;_contents=[];_orderBy=[];properties=new Set;_columnOrder=[];_filter="";_selectionProperty="";_selectedIds=new Set;uniqueEntriesByProperties={};propertyLabelDictionary={};_templates={};_templateClasses={};static get observedAttributes(){return["contents","columns","order","filter","selection-property","templates"]}get columnOrder(){return this._columnOrder.length?this._columnOrder:this.properties}set columnOrder(e){let t;"string"==typeof e&&(t=e.split(",")),t=e,this._columnOrder=t}get contents(){return this._contents}set contents(e){this.analyzeData(e),this._contents=e}get orderBy(){return this._orderBy}set orderBy(e){if(Array.isArray(e))this._orderBy=e;else{const n=[];for(const r of e.split(",")){var t=r.split("|"),s=t[0],t=1e[s._selectionProperty])):new Set;e=t?s.contents.execute():[];s._emit("select",s,{selection:e}),s._updateCheckboxes(s)}emitSelect(e){var t=e.target.checked,s=e.target.dataset.objectId;const n=h(e).target,r=(t?n._selectedIds.add(s):n._selectedIds.delete(s),n._selectionProperty);e=n.contents.execute().filter(e=>n._selectedIds.has(e[r]));n._emit("select",n,{selection:e}),n._updateCheckboxes(n)}sortData(e){const t=h(e).target,s=p(e,"column");s&&(-1<(e=t._orderBy.findIndex(e=>e.propertyName===s))?"asc"===t._orderBy[e].direction?t._orderBy[e].direction="desc":t._orderBy.splice(e,1):t._orderBy.push({propertyName:s,direction:"asc"}),t.createHtml(),t.base.render(t))}setColumnOrder(e){this._columnOrder=e?Array.isArray(e)?e:e.split(","):[]}analyzeData(t){this.properties=new Set;var s=t.length;for(let e=0;e"_"===e?" ":" "+e.toLowerCase()).trim();var s=t.charAt(0).toUpperCase()+t.slice(1);return this.propertyLabelDictionary[e]=s}parseTemplate(e,n){return e.replace(/\{\{([\s\S]+?)\}\}/gim,(e,t)=>{let s="";t=t.trim();t=n[t];return t&&(s=t),Array.isArray(s)?s.join(", "):s.toString().trim()})}createSelectionCheckbox(e){const t=document.createElement("input");return t.setAttribute("type","checkbox"),t.classList.add("flk-selection-checkbox"),e&&(t.dataset.selected=e[this._selectionProperty]),t}createRow(e){const t=document.createElement("tr");if(this._selectionProperty.length){const r=document.createElement("td");var s=this.base.generateId();const i=this.createSelectionCheckbox(e);i.id=s,i.dataset.objectId=e[this._selectionProperty];var n=e[this._selectionProperty];this._selectedIds.has(n)?i.checked=!0:i.checked=!1,this.base.addEvent("#"+s,"change",this.emitSelect),r.append(i),t.append(r)}for(const o of this.columnOrder){const a=document.createElement("td");this._templates[o]?(a.innerHTML=this.parseTemplate(this._templates[o],e),this._templateClasses[o]&&a.classList.add(...this._templateClasses[o])):a.innerText=e[o],t.append(a)}return t}createBody(e){const t=document.createElement("tbody");for(const n of e){var s=this.createRow(n,null);t.append(s)}return t}createHead(){const e=document.createElement("thead"),t=document.createElement("tr");if(t.classList.add("cursor-pointer"),this._selectionProperty.length){const r=document.createElement("th");var s=this.base.generateId();const i=this.createSelectionCheckbox();i.id=s;var d=this.contents.execute().length;0e.propertyName===o);const c=document.createElement("span");n?c.innerHTML="asc"===n.direction?'':'':(c.style.display="inline-block",c.style.width="24px"),a.append(c),t.append(a)}return e.append(t),e}addEvent(e,t,s){this.base.addEvent(e,t,s)}init(){this.createHtml(),this.base.render(this)}}class t extends HTMLElement{base;componentId;constructor(){super(),this.base=new r}connectedCallback(){var e=this.getAttribute("top"),t=this.getAttribute("left"),s=this.getAttribute("center"),n=this.getAttribute("zIndex");this.id||(this.id=this.base.generateId()),this.style.display="block",this.style.position="fixed","string"==typeof s?(this.style.top=e||"50%",this.style.left="50%",this.style.transform="translate(-50%, -50%)"):(this.style.top=e||this.clientTop+"px",this.style.left=t||this.clientLeft+"px"),n&&(this.style.zIndex=n),this.componentId=this.getAttribute("handle");const r=document.createElement("div");r.innerHTML=this.innerHTML,this.component=r;s="#"+(this.componentId||this.id);this.base.addEvent(s,"mousedown",this._dragElement),this.base.addEvent(s,"mouseup",this._reset),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this)}_dragElement(e){const s=h(e,"flk-draggable").target;let n,r;function t(e){n=e.clientX-s.offsetLeft,r=e.clientY-s.offsetTop}function i(e){var t=e.clientX-n,e=e.clientY-r;s.style.left=t+"px",s.style.top=e+"px"}function o(e){e.preventDefault()}function a(){s.removeAttribute("draggable"),s.removeEventListener("dragstart",t),s.removeEventListener("dragend",a),document.removeEventListener("dragover",o),document.removeEventListener("drop",i)}s.setAttribute("draggable",!0),s.addEventListener("dragstart",t),s.addEventListener("dragend",a),document.addEventListener("dragover",o),document.addEventListener("drop",i)}}class s extends HTMLElement{_id;base;_draggableId;constructor(){super(),this.base=new r}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}_closeModal(e){e.stopPropagation();const t=h(e,"flk-modal").target;t.classList.add("hidden")}closeModal(e){this.classList.add("hidden")}openModal(e=!0){const t=document.getElementById(this._draggableId);e&&(t.style.top="40%",t.style.left="50%"),this.classList.remove("hidden")}connectedCallback(){this.id||(this.id=this.base.generateId());const e=document.createElement("div");var t=this.base.generateId();const s=document.createElement("flk-draggable"),n=(this._draggableId=this.base.generateId(),s.id=this._draggableId,s.setAttribute("center",""),s.setAttribute("top","40%"),s.setAttribute("handle",t),s.setAttribute("zIndex","1080"),s.classList.add("border","shadow-lg","bg-white"),s.style.width="max-content",document.createElement("div"));var r=this.getAttribute("modal-title");if(r){const c=document.createElement("span");c.innerText=r,c.classList.add("ml-1","mr-auto"),n.append(c)}n.id=t;const i=this.getAttribute("header-class");let o=[];i?o=o.concat(i.split(" ")):o.push("bg-gray-light"),n.classList.add(...o,"border-bottom","row","justify-end","cursor-no-select");r=this.base.generateId();const a=document.createElement("button"),l=(a.classList.add("py-0","px-1","outline-hover","no-border","cursor-default",...o),a.innerText="X",a.id=r,n.append(a),s.append(n),document.createElement("div"));l.innerHTML=this.innerHTML,s.append(l),e.append(s),this.component=e,this.base.addEvent("#"+r,"click",this._closeModal),this.base.render(this),this.classList.add("hidden")}disconnectedCallback(){this.base.removeEvents(this)}}class n extends HTMLElement{base;_buttonId;_drawerId;_iconId;constructor(){super(),this.base=new r}connectedCallback(){this.style.position="relative",this.style.display="flex",this.style.width="fit-content",this._buttonId=this.base.generateId();const e=document.createElement("button"),t=(e.setAttribute("type","button"),e.classList.add("row"),e.id=this._buttonId,document.createElement("span")),s=(t.classList.add("self-align-center"),t.innerText=this.getAttribute("text"),this._iconId=this.base.generateId(),document.createElement("span"));s.classList.add("self-align-center");var n=l('');const r=l(''),i=(r.classList.add("hidden"),s.append(n,r),s.id=this._iconId,e.append(t,s),this._drawerId=this.base.generateId(),document.createElement("div"));i.id=this._drawerId,i.classList.add("shadow","inline-block","bg-white"),i.style.position="absolute",i.style.zIndex="1040";n=this.querySelector("template");n.innerHTML.length?i.innerHTML=n.innerHTML:i.append(n.firstChild),i.style.display="none",this.component=[e,i],this.base.addEvent("#"+this._buttonId,"click",this.toggleMenu);const o=document.querySelector("body");""!==o.getAttribute("flk-close-dropdown")&&(o.setAttribute("flk-close-dropdown",""),o.addEventListener("click",this.closeAllDropdownButtons)),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this);var e=document.querySelectorAll("flk-dropdown");if(!e||!e.length){const t=document.querySelector("body");t.removeAttribute("flk-close-dropdown"),t.removeEventListener("click",this.closeAllDropdownButtons)}}toggleMenu(e){const t=h(e).target;e=t._drawerId;const s=document.getElementById(e);var e="none"!==s.style.display,n=(s.style.display=e?"none":"block",t.getAttribute("drawer-width")),n=("string"==typeof t.getAttribute("right")&&(s.style.right="0px"),s.style.top=t.offsetHeight+"px",s.style.width=n||t.offsetWidth+"px",t._iconId);const r=document.getElementById(n);e?(r.childNodes[0].classList.remove("hidden"),r.childNodes[1].classList.add("hidden")):(r.childNodes[0].classList.add("hidden"),r.childNodes[1].classList.remove("hidden"))}_closeDropdown(){var e=this._drawerId;const t=document.getElementById(e);if("none"!==t.style.display){e=this._iconId;const s=document.getElementById(e);t.style.display="none",s.childNodes[0].classList.remove("hidden"),s.childNodes[1].classList.add("hidden")}}closeAllDropdownButtons(e){var t,s=h(e,"flk-dropdown").target,e=document.querySelectorAll("flk-dropdown");if(s)for(const n of e)s._buttonId!==n._buttonId&&(t=n._drawerId,"none"!==document.getElementById(t).style.display&&n._closeDropdown());else for(const r of e)r._closeDropdown()}}class o extends HTMLElement{base;contents;component;listType="ul";iconSet;filter={value:"",caseSensitive:!1};selectedElements=[];static get observedAttributes(){return["contents","icon-set","max-depth","filter"]}_jsonToValueArray(e){let t=JSON.stringify(e);t=t.replace(/[\[\]{}\"]/g,"");let s=[];for(const n of t.split(","))s=s.concat(n.split(":"));return[...new Set(s)]}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}constructor(){super(),this.base=new r,this.setContents(this.getAttribute("contents")),this.iconSet=this.getAttribute("icon-set")?this.getAttribute("icon-type"):"file",this.maxDepth=this.getAttribute("max-depth")?parseInt(this.getAttribute("max-depth")):-1,this.setFilter(this.getAttribute("filter")),this.style.display="block",this.style.maxWidth="fit-content",this.style.margin="0 1rem 0 0",this.base.addEvent(".flk-branch","click",this.emitNodeToggle)}deselectTree(){if(this.selectedElements.length)for(const e of this.selectedElements)e.classList.remove("font-weight-bold"),delete e.dataset.selected}emitNodeToggle(e){if(e.stopPropagation(),["LI","UL"].includes(e.target.tagName))return!1;const t=h(e,"flk-tree-nav").target,s=p(e,"branchKey");let n=t.contents;const r=s.split(".");for(const a of r)if(n[a])n=n[a];else if(null===n[a])n=null;else{let e=[];for(const l of n)l[a]&&e.push(l[a]);n=e}let i,o=e.target;for(;o.dataset&&o.dataset.leafKey?i=o.dataset.leafKey:o=o.parentNode||o.parentElement,!i;);t.selectedElements.length&&t.deselectTree(),t.selectedElements=[],"DETAILS"===o.tagName?(t.selectedElements.push(o.childNodes[0]),o.childNodes.length&&o.childNodes[0].childNodes.length&&"DIV"===o.childNodes[0].childNodes[0].tagName&&(console.log(o.childNodes[0].childNodes),t.selectedElements=o.childNodes[0].childNodes[0].childNodes)):t.selectedElements.push(o);for(const c of t.selectedElements)c.dataset.selected||(c.classList.add("font-weight-bold"),c.dataset.selected=!0);var e=s.substring(s.indexOf(".")+1),d=t.createLeafText(r.reverse()[0]);t._emit("tree-click",t,{path:e,data:n,key:i,label:(d.titleText+" "+d.commentText).trim(),branch:"object"==typeof n})}convertJsonKeyToTitle(e){if(!e)return"";const t=(e="string"!=typeof e?e.toString():e).replace(/([A-Z_])/g,e=>"_"===e?" ":" "+e).trim();return t.charAt(0).toUpperCase()+t.slice(1)}setContents(e){var t=e||this.contents||[];try{switch(typeof t){case"string":this.contents=JSON.parse(t);break;case"object":Array.isArray(t)?this.contents=t:this.contents=[t]}}catch(e){console.log(e)}}applyFilter(e){let t;var s="details"===e.tagName.toLowerCase();t=this.filter.caseSensitive?e.dataset.branchValues.includes(this.filter.value):e.dataset.branchValues.toLowerCase().includes(this.filter.value.toLowerCase()),t?e.parentElement.classList.remove("hidden"):e.parentElement.classList.add("hidden"),s&&t?e.setAttribute("open",""):e.removeAttribute("open")}resetTree(e){e.parentElement.classList.remove("hidden"),e.removeAttribute("open")}filterTree(){let t=setTimeout(()=>{for(const e of this.querySelectorAll("[data-branch-values]"))void 0===this.filter.value||0===this.filter.value.length?this.resetTree(e):this.applyFilter(e);clearTimeout(t)},10)}setFilter(e){const t=e||{};try{switch(typeof t){case"string":t.includes("{")?(this.filter=JSON.parse(t),!1===this.filter.caseSensitive&&(this.filter.value=this.filter.value.toLowerCase())):this.filter.value=e.toLowerCase();break;case"object":this.filter=t}}catch(e){console.log(e)}this.filterTree()}createLeafText(e){var t,s;let n="",r="";return"string"==typeof e&&(e.includes("(")||e.includes("["))?(s=e.indexOf("("),s=-1===(t=e.indexOf("["))?s:t,n=this.convertJsonKeyToTitle(e.substring(0,s)),r=e.substring(s)):n=this.convertJsonKeyToTitle(e),{titleText:n,commentText:r}}createTextTag(n,r){n=this.createLeafText(n);if(n.commentText){let e=document.createElement("div"),t=document.createElement("span"),s=(t.innerText=n.titleText,document.createElement("small"));s.innerText=n.commentText,s.style.marginLeft="1rem",e.append(t,s),e.style.display="inline-flex",e.style.alignItems="center",r.append(e)}else r.innerText=n.titleText}createLeaf(e,t,s,n=[]){let r=document.createElement("li");r.classList.add("cursor-no-select"),r.style.marginTop="0.4rem",r.dataset.branchKey=s;const i="file"===this.iconSet?'':'';r.style.listStyleImage=`url('data:image/svg+xml,${i}')`,r.style.position="relative",r.style.left="2px";let o=document.createElement("span");s=[e].concat(n);if(o.dataset.branchValues=[...new Set(s)].join(),o.dataset.leafKey=s[0],this.createTextTag(e,o),o.style.position="relative",o.style.top="-3px",r.append(o),t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);const i="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${i}')`,e.append(r),t.append(e)}else t.append(r)}createBranch(s,t,n,r){if(r===this.maxDepth&&"object"==typeof s)for(const o of Array.isArray(s)?s:Object.keys(s)){let e;s[o]&&(e=this._jsonToValueArray(s[o])),this.createLeaf(o,t,n+"."+o,e)}else if(Array.isArray(s))for(var e in s){var d=document.createElement(this.listType);t.append(this.createBranch(s[e],d,n+"."+e,r+1))}else if(null!==s&&"object"==typeof s){const a=[];for(const l of Object.keys(s)){let e=document.createElement("li"),t=(e.classList.add("cursor-no-select"),e.style.position="relative",e.style.left="2px",e.dataset.branchKey=n+"."+l,document.createElement("details"));t.classList.add("flk-branch"),t.dataset.branchValues=[l].concat(this._jsonToValueArray(s[l])),t.style.position="relative",t.style.top="-3px",t.classList.add("cursor-default");var i=document.createElement("summary");this.createTextTag(l,i),t.dataset.leafKey=l,t.append(i),e.append(this.createBranch(s[l],t,n+"."+l,r+1)),a.push(e)}if(t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);var h="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${h}')`;for(const c of a)e.append(c);t.append(e)}else for(const p of a)t.append(p)}else this.createLeaf(s,t,n);return t}createHtml(){let e=document.createElement(this.listType);var t="file"===this.iconSet?u:'';if(e.style.listStyleImage=`url('data:image/svg+xml,${t}')`,e.style.marginLeft="3rem",this.contents.length){for(const s in this.contents)e=this.createBranch(this.contents[s],e,s,0);this.component=e}else this.component=e}attributeChangedCallback(e,t,s){switch(e){case"contents":this.setContents(s);break;case"icon-set":this.iconSet=s;break;case"max-depth":this.maxDepth="string"==typeof s?parseInt(s):s;break;case"filter":this.setFilter(s)}this.init()}connectedCallback(){this.init()}disconnectedCallback(){this.base.removeEvents(this)}init(){this.createHtml(),this.base.render(this)}}customElements.define("flk-table",e),customElements.define("flk-draggable",t),customElements.define("flk-modal",s),customElements.define("flk-dropdown",n),customElements.define("flk-tree-nav",o)}(); \ No newline at end of file diff --git a/documentation/public/cdn/ibiss-v0.0.9/avian.min.css b/documentation/public/cdn/ibiss-v0.0.9/avian.min.css new file mode 100644 index 0000000..53c6f0a --- /dev/null +++ b/documentation/public/cdn/ibiss-v0.0.9/avian.min.css @@ -0,0 +1 @@ +:root{--html-background:#faf9f8;--background:#fff;--code-background:#f3f2f1;--overlay-background:0,0,0;--color-on-black:#c8c6c4;--font-color:#323130;--shadow-color:0,0,0;--hr-color:#d2d0ce;--border-color:#8a8886;--gray-light:#edebe9;--color-on-gray-light:#000;--gray:#a19f9d;--color-on-gray:#000;--gray-dark:#605e5c;--color-on-gray-dark:#faf9f8;--gray-darker:#8a8886;--light:#d2d0ce;--black:#000;--white:#fff;--icon:#605e5c;--icon-disabled:#a19f9d;--icon-error:#a80000;--icon-success:#107c10;--icon-warning:#797673;--primary:#0078d4;--primary-hover:#0068b8;--color-on-primary:#fff;--accent:#fce100;--accent-hover:#e6cf00;--color-on-accent:#000;--danger:#d13438;--danger-hover:#bb2a2f;--color-on-danger:#fff;--warning:#fff4ce;--color-on-warning:#323130;--error:#fde7e9;--color-on-error:#323130;--success:#dff6dd;--color-on-success:#323130;--contrast:#ccc;--contrast-hover:#b2b2b2;--color-on-contrast:#000;--disabled:#d2d0ce;--color-on-disabled:#a19f9d;--button-background:#fff;--button-hover:#e1dfdd;--button-outline-color:#000;--button-color:#000;--disabled-button-background:#f3f2f1;--disabled-button-color:#a19f9d;--colored-disabled-button-color:#d2d0ce;--input-border-color:#605e5c;--input-hover:#c8c6c4;--range-track-color:#c8c6c4;--range-filled-track-color:#605e5c;--range-track-hover-color:#e0f2ff;--switch-border-color:#000;--switch-toggle-off-color:#000;--switch-toggle-on-color:#fff;--table-hover:#e1dfdd;--table-striped-hover:#d2d0ce;--table-stripe:#edebe9;--default-distance:1.5rem;--distance-0:0;--distance-1:0.5rem;--distance-2:1rem;--distance-3:1.5rem;--distance-4:2rem;--distance-5:2.5rem;--h1-font-size:3.2rem;--h2-font-size:3rem;--h3-font-size:2.8rem;--h4-font-size:2.6rem;--h5-font-size:2.4rem;--h6-font-size:2.2rem;--th-font-size:2.2rem;--paragraph-font-size:1.6rem;--label-font-size:1.6rem;--small-font-size:1.2rem;--font-weight-normal:400;--font-weight-semibold:600;--font-weight-bold:700}*,:after,:before{box-sizing:border-box;font:inherit;font-weight:var(--font-weight-normal);margin:0;padding:0}html{font-size:62.5%;hanging-punctuation:first last}body{font-family:Segoe UI,"Segoe UI Web (West European)",-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif;font-size:1.6rem;height:100svh;line-height:1.5;text-rendering:optimizeSpeed}h1,h2,h3,h4,h5,h6{text-wrap:balance}p{text-wrap:pretty;max-width:75ch}ol,ul{margin-left:2rem}img,picture{display:block;max-width:100%}.lucide{left:2px;position:relative;top:3px}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms;animation-iteration-count:1;scroll-behavior:auto;transition-duration:.01ms}}@media (prefers-reduced-motion:no-preference){:has(:target),html{scroll-behavior:smooth;scroll-padding-top:3rem}}h1{font-size:var(--h1-font-size)}h1,h2{font-weight:var(--font-weight-bold)}h2{font-size:var(--h2-font-size)}h3{font-size:var(--h3-font-size);font-weight:var(--font-weight-bold)}h4{font-size:var(--h4-font-size)}h4,h5{font-weight:var(--font-weight-semibold)}h5{font-size:var(--h5-font-size)}h6{font-size:var(--h6-font-size);font-weight:var(--font-weight-semibold)}p{font-size:var(--paragraph-font-size)}label{font-size:var(--label-font-size)}small{font-size:var(--small-font-size)}b,strong{font-weight:var(--font-weight-bold)}cite,em,i{font-style:italic}code:not([class*=language]),kbd{background-color:var(--code-background);border:.5px solid var(--border-color);border-radius:.2rem;bottom:.1rem;margin:0 .2rem;padding:.2rem .4rem;position:relative}mark{background-color:var(--accent)}th{font-size:var(--th-font-size);font-weight:var(--font-weight-semibold)}.font-size-68{font-size:6.8rem!important}.font-size-42{font-size:4.2rem!important}.font-size-32{font-size:3.2rem!important}.font-size-28{font-size:2.8rem!important}.font-size-24{font-size:2.4rem!important}.font-size-20{font-size:2rem!important}.font-size-18{font-size:1.8rem!important}.font-size-16{font-size:1.6rem!important}.font-size-14{font-size:1.4rem!important}.font-size-12{font-size:1.2rem!important}.font-size-10{font-size:1rem!important}.font-weight-normal{font-weight:400!important}.font-weight-semibold{font-weight:600!important}.font-weight-bold{font-weight:700!important}.align-center{align-items:center}.align-end{align-items:flex-end}.align-start{align-items:flex-start}.align-stretch{align-items:stretch}.align-between{align-content:space-between}.align-around{align-content:space-around}.align-evenly{align-content:space-evenly}.self-align-stretch{align-self:stretch}.self-align-center{align-self:center}.self-align-start{align-self:flex-start}.self-align-end{align-self:flex-end}.row{display:flex;flex-wrap:wrap}.column{display:flex;flex-direction:column}.no-wrap{flex-wrap:nowrap}.wrap-reverse{flex-wrap:wrap-reverse}.row-reverse{flex-direction:row-reverse}.column-reverse{flex-direction:column-reverse}@media (min-width:993px){.drow-reverse{flex-direction:row-reverse}.dcolumn-reverse{flex-direction:column-reverse}}@media (min-width:768px) and (max-width:992px){.trow-reverse{flex-direction:row-reverse}.tcolumn-reverse{flex-direction:column-reverse}}@media (max-width:767px){.mrow-reverse{flex-direction:row-reverse}.mcolumn-reverse{flex-direction:column-reverse}}.gap-0{gap:var(--distance-0)}.gap-1{gap:var(--distance-1)}.gap-2{gap:var(--distance-2)}.gap-3{gap:var(--distance-3)}.gap-4{gap:var(--distance-4)}.gap-5{gap:var(--distance-5)}.justify-center{justify-content:center}.justify-around{justify-content:space-around}.justify-evenly{justify-content:space-evenly}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.justify-start{justify-content:flex-start}.f-100{flex:1 1 100%}.f-90{flex:0 0 90%}.f-80{flex:0 0 80%}.f-75{flex:0 0 75%}.f-70{flex:0 0 70%}.f-60{flex:0 0 60%}.f-50{flex:0 0 50%}.f-33{flex:0 0 33.33%}.f-30{flex:0 0 30%}.f-25{flex:0 0 25%}.f-20{flex:0 0 20%}.f-16{flex:0 0 16.67%}.f-10{flex:0 0 10%}.f-8{flex:0 0 8.33%}.f-auto{flex:1 1 auto;max-width:fitcontent;min-width:auto;width:auto}.f-fill{flex:1;max-width:none;min-width:auto;width:100%}@media (min-width:768px) and (max-width:992px){.tf-100{flex:1 1 100%}.tf-90{flex:0 0 90%}.tf-80{flex:0 0 80%}.tf-75{flex:0 0 75%}.tf-70{flex:0 0 70%}.tf-60{flex:0 0 60%}.tf-50{flex:0 0 50%}.tf-33{flex:0 0 33.33%}.tf-30{flex:0 0 30%}.tf-25{flex:0 0 25%}.tf-20{flex:0 0 20%}.tf-16{flex:0 0 16.67%}.tf-10{flex:0 0 10%}.tf-8{flex:0 0 8.33%}.tf-auto{flex:1 1 auto;max-width:fitcontent;min-width:auto;width:auto}.tf-fill{flex:1;max-width:none;min-width:auto;width:100%}}@media (max-width:767px){.mf-100{flex:1 1 100%}.mf-90{flex:0 0 90%}.mf-80{flex:0 0 80%}.mf-75{flex:0 0 75%}.mf-70{flex:0 0 70%}.mf-60{flex:0 0 60%}.mf-50{flex:0 0 50%}.mf-33{flex:0 0 33.33%}.mf-30{flex:0 0 30%}.mf-25{flex:0 0 25%}.mf-20{flex:0 0 20%}.mf-16{flex:0 0 16.67%}.mf-10{flex:0 0 10%}.mf-8{flex:0 0 8.33%}.mf-auto{flex:1 1 auto;max-width:fitcontent;min-width:auto;width:auto}.mf-fill{flex:1;max-width:none;min-width:auto;width:100%}}.no-scroll{overflow:hidden}.text-no-wrap{white-space:nowrap}.text-normal{font-weight:400}.sticky{height:auto;position:sticky;position:-webkit-sticky;top:0;z-index:1000}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.block{display:block}.hidden{display:none}@media (min-width:768px){.mobile{display:none!important}}.tablet{display:none}@media (min-width:768px) and (max-width:992px){.tablet{display:inherit!important}}@media (max-width:992px){.desktop{display:none!important}}@media (min-width:769px){.small-screen{display:none!important}}@media (max-width:768px){.large-screen{display:none!important}}.fit-content{max-width:fit-content!important;max-width:-moz-fit-content!important}.list-style-none{list-style:none!important}.m-0{margin:var(--distance-0)!important}.ml-0{margin-left:var(--distance-0)!important}.mr-0{margin-right:var(--distance-0)!important}.mt-0{margin-top:var(--distance-0)!important}.mb-0{margin-bottom:var(--distance-0)!important}.mx-0{margin-left:var(--distance-0)!important;margin-right:var(--distance-0)!important}.m-1{margin:var(--distance-1)!important}.m-2{margin:var(--distance-2)!important}.m-3{margin:var(--distance-3)!important}.m-4{margin:var(--distance-4)!important}.m-5{margin:var(--distance-5)!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.mx-1{margin-left:var(--distance-1)!important;margin-right:var(--distance-1)!important}.mx-2{margin-left:var(--distance-2)!important;margin-right:var(--distance-2)!important}.mx-3{margin-left:var(--distance-3)!important;margin-right:var(--distance-3)!important}.mx-4{margin-left:var(--distance-4)!important;margin-right:var(--distance-4)!important}.mx-5{margin-left:var(--distance-5)!important;margin-right:var(--distance-5)!important}.my-auto{margin-bottom:auto!important;margin-top:auto!important}.my-0{margin-bottom:var(--distance-0)!important;margin-top:var(--distance-0)!important}.my-1{margin-bottom:var(--distance-1)!important;margin-top:var(--distance-1)!important}.my-2{margin-bottom:var(--distance-2)!important;margin-top:var(--distance-2)!important}.my-3{margin-bottom:var(--distance-3)!important;margin-top:var(--distance-3)!important}.my-4{margin-bottom:var(--distance-4)!important;margin-top:var(--distance-4)!important}.my-5{margin-bottom:var(--distance-5)!important;margin-top:var(--distance-5)!important}.mt-auto{margin-top:auto!important}.mt-1{margin-top:var(--distance-1)!important}.mt-2{margin-top:var(--distance-2)!important}.mt-3{margin-top:var(--distance-3)!important}.mt-4{margin-top:var(--distance-4)!important}.mt-5{margin-top:var(--distance-5)!important}.ml-auto{margin-left:auto!important}.ml-1{margin-left:var(--distance-1)!important}.ml-2{margin-left:var(--distance-2)!important}.ml-3{margin-left:var(--distance-3)!important}.ml-4{margin-left:var(--distance-4)!important}.ml-5{margin-left:var(--distance-5)!important}.mr-auto{margin-right:auto!important}.mr-1{margin-right:var(--distance-1)!important}.mr-2{margin-right:var(--distance-2)!important}.mr-3{margin-right:var(--distance-3)!important}.mr-4{margin-right:var(--distance-4)!important}.mr-5{margin-right:var(--distance-5)!important}.mb-auto{margin-bottom:auto!important}.mb-1{margin-bottom:var(--distance-1)!important}.mb-2{margin-bottom:var(--distance-2)!important}.mb-3{margin-bottom:var(--distance-3)!important}.mb-4{margin-bottom:var(--distance-4)!important}.mb-5{margin-bottom:var(--distance-5)!important}@media (min-width:768px) and (max-width:992px){.tm-0{margin:var(--distance-0)!important}.tml-0{margin-left:var(--distance-0)!important}.tmr-0{margin-right:var(--distance-0)!important}.tmt-0{margin-top:var(--distance-0)!important}.tmb-0{margin-bottom:var(--distance-0)!important}.tmx-0{margin-left:var(--distance-0)!important;margin-right:var(--distance-0)!important}.tm-1{margin:var(--distance-1)!important}.tm-2{margin:var(--distance-2)!important}.tm-3{margin:var(--distance-3)!important}.tm-4{margin:var(--distance-4)!important}.tm-5{margin:var(--distance-5)!important}.tmx-auto{margin-left:auto!important;margin-right:auto!important}.tmx-1{margin-left:var(--distance-1)!important;margin-right:var(--distance-1)!important}.tmx-2{margin-left:var(--distance-2)!important;margin-right:var(--distance-2)!important}.tmx-3{margin-left:var(--distance-3)!important;margin-right:var(--distance-3)!important}.tmx-4{margin-left:var(--distance-4)!important;margin-right:var(--distance-4)!important}.tmx-5{margin-left:var(--distance-5)!important;margin-right:var(--distance-5)!important}.tmy-auto{margin-bottom:auto!important;margin-top:auto!important}.tmy-0{margin-bottom:var(--distance-0)!important;margin-top:var(--distance-0)!important}.tmy-1{margin-bottom:var(--distance-1)!important;margin-top:var(--distance-1)!important}.tmy-2{margin-bottom:var(--distance-2)!important;margin-top:var(--distance-2)!important}.tmy-3{margin-bottom:var(--distance-3)!important;margin-top:var(--distance-3)!important}.tmy-4{margin-bottom:var(--distance-4)!important;margin-top:var(--distance-4)!important}.tmy-5{margin-bottom:var(--distance-5)!important;margin-top:var(--distance-5)!important}.tmt-auto{margin-top:auto!important}.tmt-1{margin-top:var(--distance-1)!important}.tmt-2{margin-top:var(--distance-2)!important}.tmt-3{margin-top:var(--distance-3)!important}.tmt-4{margin-top:var(--distance-4)!important}.tmt-5{margin-top:var(--distance-5)!important}.tml-auto{margin-left:auto!important}.tml-1{margin-left:var(--distance-1)!important}.tml-2{margin-left:var(--distance-2)!important}.tml-3{margin-left:var(--distance-3)!important}.tml-4{margin-left:var(--distance-4)!important}.tml-5{margin-left:var(--distance-5)!important}.tmr-auto{margin-right:auto!important}.tmr-1{margin-right:var(--distance-1)!important}.tmr-2{margin-right:var(--distance-2)!important}.tmr-3{margin-right:var(--distance-3)!important}.tmr-4{margin-right:var(--distance-4)!important}.tmr-5{margin-right:var(--distance-5)!important}.tmb-auto{margin-bottom:auto!important}.tmb-1{margin-bottom:var(--distance-1)!important}.tmb-2{margin-bottom:var(--distance-2)!important}.tmb-3{margin-bottom:var(--distance-3)!important}.tmb-4{margin-bottom:var(--distance-4)!important}.tmb-5{margin-bottom:var(--distance-5)!important}}@media (max-width:767px){.mm-0{margin:var(--distance-0)!important}.mml-0{margin-left:var(--distance-0)!important}.mmr-0{margin-right:var(--distance-0)!important}.mmt-0{margin-top:var(--distance-0)!important}.mmb-0{margin-bottom:var(--distance-0)!important}.mmx-0{margin-left:var(--distance-0)!important;margin-right:var(--distance-0)!important}.mm-1{margin:var(--distance-1)!important}.mm-2{margin:var(--distance-2)!important}.mm-3{margin:var(--distance-3)!important}.mm-4{margin:var(--distance-4)!important}.mm-5{margin:var(--distance-5)!important}.mmx-auto{margin-left:auto!important;margin-right:auto!important}.mmx-1{margin-left:var(--distance-1)!important;margin-right:var(--distance-1)!important}.mmx-2{margin-left:var(--distance-2)!important;margin-right:var(--distance-2)!important}.mmx-3{margin-left:var(--distance-3)!important;margin-right:var(--distance-3)!important}.mmx-4{margin-left:var(--distance-4)!important;margin-right:var(--distance-4)!important}.mmx-5{margin-left:var(--distance-5)!important;margin-right:var(--distance-5)!important}.mmy-auto{margin-bottom:auto!important;margin-top:auto!important}.mmy-0{margin-bottom:var(--distance-0)!important;margin-top:var(--distance-0)!important}.mmy-1{margin-bottom:var(--distance-1)!important;margin-top:var(--distance-1)!important}.mmy-2{margin-bottom:var(--distance-2)!important;margin-top:var(--distance-2)!important}.mmy-3{margin-bottom:var(--distance-3)!important;margin-top:var(--distance-3)!important}.mmy-4{margin-bottom:var(--distance-4)!important;margin-top:var(--distance-4)!important}.mmy-5{margin-bottom:var(--distance-5)!important;margin-top:var(--distance-5)!important}.mmt-auto{margin-top:auto!important}.mmt-1{margin-top:var(--distance-1)!important}.mmt-2{margin-top:var(--distance-2)!important}.mmt-3{margin-top:var(--distance-3)!important}.mmt-4{margin-top:var(--distance-4)!important}.mmt-5{margin-top:var(--distance-5)!important}.mml-auto{margin-left:auto!important}.mml-1{margin-left:var(--distance-1)!important}.mml-2{margin-left:var(--distance-2)!important}.mml-3{margin-left:var(--distance-3)!important}.mml-4{margin-left:var(--distance-4)!important}.mml-5{margin-left:var(--distance-5)!important}.mmr-auto{margin-right:auto!important}.mmr-1{margin-right:var(--distance-1)!important}.mmr-2{margin-right:var(--distance-2)!important}.mmr-3{margin-right:var(--distance-3)!important}.mmr-4{margin-right:var(--distance-4)!important}.mmr-5{margin-right:var(--distance-5)!important}.mmb-auto{margin-bottom:auto!important}.mmb-1{margin-bottom:var(--distance-1)!important}.mmb-2{margin-bottom:var(--distance-2)!important}.mmb-3{margin-bottom:var(--distance-3)!important}.mmb-4{margin-bottom:var(--distance-4)!important}.mmb-5{margin-bottom:var(--distance-5)!important}}.p-0{padding:var(--distance-0)}.pl-0{padding-left:var(--distance-0)}.pr-0{padding-right:var(--distance-0)}.pt-0{padding-top:var(--distance-0)}.pb-0{padding-bottom:var(--distance-0)}.p-1{padding:var(--distance-1)}.p-2{padding:var(--distance-2)}.p-3{padding:var(--distance-3)}.p-4{padding:var(--distance-4)}.p-5{padding:var(--distance-5)}.px-0{padding-left:var(--distance-0);padding-right:var(--distance-0)}.px-auto{padding-left:auto;padding-right:auto}.px-1{padding-left:var(--distance-1);padding-right:var(--distance-1)}.px-2{padding-left:var(--distance-2);padding-right:var(--distance-2)}.px-3{padding-left:var(--distance-3);padding-right:var(--distance-3)}.px-4{padding-left:var(--distance-4);padding-right:var(--distance-4)}.px-5{padding-left:var(--distance-5);padding-right:var(--distance-5)}.py-auto{padding-bottom:auto;padding-top:auto}.py-0{padding-bottom:var(--distance-0);padding-top:var(--distance-0)}.py-1{padding-bottom:var(--distance-1);padding-top:var(--distance-1)}.py-2{padding-bottom:var(--distance-2);padding-top:var(--distance-2)}.py-3{padding-bottom:var(--distance-3);padding-top:var(--distance-3)}.py-4{padding-bottom:var(--distance-4);padding-top:var(--distance-4)}.py-5{padding-bottom:var(--distance-5);padding-top:var(--distance-5)}.pt-auto{padding-top:auto}.pt-1{padding-top:var(--distance-1)}.pt-2{padding-top:var(--distance-2)}.pt-3{padding-top:var(--distance-3)}.pt-4{padding-top:var(--distance-4)}.pt-5{padding-top:var(--distance-5)}.pl-auto{padding-left:auto}.pl-1{padding-left:var(--distance-1)}.pl-2{padding-left:var(--distance-2)}.pl-3{padding-left:var(--distance-3)}.pl-4{padding-left:var(--distance-4)}.pl-5{padding-left:var(--distance-5)}.pr-auto{padding-right:auto}.pr-1{padding-right:var(--distance-1)}.pr-2{padding-right:var(--distance-2)}.pr-3{padding-right:var(--distance-3)}.pr-4{padding-right:var(--distance-4)}.pr-5{padding-right:var(--distance-5)}.pb-auto{padding-bottom:auto}.pb-1{padding-bottom:var(--distance-1)}.pb-2{padding-bottom:var(--distance-2)}.pb-3{padding-bottom:var(--distance-3)}.pb-4{padding-bottom:var(--distance-4)}.pb-5{padding-bottom:var(--distance-5)}@media (min-width:768px) and (max-width:992px){.tp-0{padding:var(--distance-0)}.tpl-0{padding-left:var(--distance-0)}.tpr-0{padding-right:var(--distance-0)}.tpt-0{padding-top:var(--distance-0)}.tpb-0{padding-bottom:var(--distance-0)}.tpx-0{padding-left:var(--distance-0);padding-right:var(--distance-0)}.tp-1{padding:var(--distance-1)}.tp-2{padding:var(--distance-2)}.tp-3{padding:var(--distance-3)}.tp-4{padding:var(--distance-4)}.tp-5{padding:var(--distance-5)}.tpx-auto{padding-left:auto;padding-right:auto}.tpx-1{padding-left:var(--distance-1);padding-right:var(--distance-1)}.tpx-2{padding-left:var(--distance-2);padding-right:var(--distance-2)}.tpx-3{padding-left:var(--distance-3);padding-right:var(--distance-3)}.tpx-4{padding-left:var(--distance-4);padding-right:var(--distance-4)}.tpx-5{padding-left:var(--distance-5);padding-right:var(--distance-5)}.tpy-auto{padding-bottom:auto;padding-top:auto}.tpy-0{padding-bottom:var(--distance-0);padding-top:var(--distance-0)}.tpy-1{padding-bottom:var(--distance-1);padding-top:var(--distance-1)}.tpy-2{padding-bottom:var(--distance-2);padding-top:var(--distance-2)}.tpy-3{padding-bottom:var(--distance-3);padding-top:var(--distance-3)}.tpy-4{padding-bottom:var(--distance-4);padding-top:var(--distance-4)}.tpy-5{padding-bottom:var(--distance-5);padding-top:var(--distance-5)}.tpt-auto{padding-top:auto}.tpt-1{padding-top:var(--distance-1)}.tpt-2{padding-top:var(--distance-2)}.tpt-3{padding-top:var(--distance-3)}.tpt-4{padding-top:var(--distance-4)}.tpt-5{padding-top:var(--distance-5)}.tpl-auto{padding-left:auto}.tpl-1{padding-left:var(--distance-1)}.tpl-2{padding-left:var(--distance-2)}.tpl-3{padding-left:var(--distance-3)}.tpl-4{padding-left:var(--distance-4)}.tpl-5{padding-left:var(--distance-5)}.tpr-auto{padding-right:auto}.tpr-1{padding-right:var(--distance-1)}.tpr-2{padding-right:var(--distance-2)}.tpr-3{padding-right:var(--distance-3)}.tpr-4{padding-right:var(--distance-4)}.tpr-5{padding-right:var(--distance-5)}.tpb-auto{padding-bottom:auto}.tpb-1{padding-bottom:var(--distance-1)}.tpb-2{padding-bottom:var(--distance-2)}.tpb-3{padding-bottom:var(--distance-3)}.tpb-4{padding-bottom:var(--distance-4)}.tpb-5{padding-bottom:var(--distance-5)}}@media (max-width:767px){.mp-0{padding:var(--distance-0)}.mpl-0{padding-left:var(--distance-0)}.mpr-0{padding-right:var(--distance-0)}.mpt-0{padding-top:var(--distance-0)}.mpb-0{padding-bottom:var(--distance-0)}.mpx-0{padding-left:var(--distance-0);padding-right:var(--distance-0)}.mp-1{padding:var(--distance-1)}.mp-2{padding:var(--distance-2)}.mp-3{padding:var(--distance-3)}.mp-4{padding:var(--distance-4)}.mp-5{padding:var(--distance-5)}.mpx-auto{padding-left:auto;padding-right:auto}.mpx-1{padding-left:var(--distance-1);padding-right:var(--distance-1)}.mpx-2{padding-left:var(--distance-2);padding-right:var(--distance-2)}.mpx-3{padding-left:var(--distance-3);padding-right:var(--distance-3)}.mpx-4{padding-left:var(--distance-4);padding-right:var(--distance-4)}.mpx-5{padding-left:var(--distance-5);padding-right:var(--distance-5)}.mpy-auto{padding-bottom:auto;padding-top:auto}.mpy-0{padding-bottom:var(--distance-0);padding-top:var(--distance-0)}.mpy-1{padding-bottom:var(--distance-1);padding-top:var(--distance-1)}.mpy-2{padding-bottom:var(--distance-2);padding-top:var(--distance-2)}.mpy-3{padding-bottom:var(--distance-3);padding-top:var(--distance-3)}.mpy-4{padding-bottom:var(--distance-4);padding-top:var(--distance-4)}.mpy-5{padding-bottom:var(--distance-5);padding-top:var(--distance-5)}.mpt-auto{padding-top:auto}.mpt-1{padding-top:var(--distance-1)}.mpt-2{padding-top:var(--distance-2)}.mpt-3{padding-top:var(--distance-3)}.mpt-4{padding-top:var(--distance-4)}.mpt-5{padding-top:var(--distance-5)}.mpl-auto{padding-left:auto}.mpl-1{padding-left:var(--distance-1)}.mpl-2{padding-left:var(--distance-2)}.mpl-3{padding-left:var(--distance-3)}.mpl-4{padding-left:var(--distance-4)}.mpl-5{padding-left:var(--distance-5)}.mpr-auto{padding-right:auto}.mpr-1{padding-right:var(--distance-1)}.mpr-2{padding-right:var(--distance-2)}.mpr-3{padding-right:var(--distance-3)}.mpr-4{padding-right:var(--distance-4)}.mpr-5{padding-right:var(--distance-5)}.mpb-auto{padding-bottom:auto}.mpb-1{padding-bottom:var(--distance-1)}.mpb-2{padding-bottom:var(--distance-2)}.mpb-3{padding-bottom:var(--distance-3)}.mpb-4{padding-bottom:var(--distance-4)}.mpb-5{padding-bottom:var(--distance-5)}}hr{border-color:var(--hr-color);border-style:solid;border-width:0 0 .5px;margin-bottom:var(--default-distance)}button{background-color:var(--button-background);border:.5px solid var(--border-color);border-radius:2px;padding:.6rem 1.5rem}@supports (-moz-appearance:none){button{padding:.6rem 1.5rem .9rem}}button:active,button:focus{box-shadow:0 0 0 1px var(--button-outline-color);cursor:pointer;outline:none}button.no-border{background-color:transparent!important;border:none!important}button:hover{background-color:var(--button-hover)!important;cursor:pointer}button.icon{color:var(--icon)!important;display:flex;flex-direction:column;padding:0;width:auto}button.icon:disabled{color:var(--icon-disabled)!important}button.icon:disabled:hover{background-color:transparent!important}button.primary{background-color:var(--primary)!important;border:0;color:var(--color-on-primary)!important}button.primary:hover{background-color:var(--primary-hover)!important}button.danger{background-color:var(--danger)!important;border:0;color:var(--color-on-danger)!important}button.danger:hover{background-color:var(--danger-hover)!important}button.accent{background-color:var(--accent)!important;border:0;color:var(--color-on-accent)!important}button.accent:hover{background-color:var(--accent-hover)!important}button.contrast{background-color:var(--contrast)!important;border:0;color:var(--color-on-contrast)!important}button.contrast:hover{background-color:var(--contrast-hover)!important}button.accent:active,button.accent:focus,button.contrast:active,button.contrast:focus,button.danger:active,button.danger:focus,button.primary:active,button.primary:focus{box-shadow:0 0 0 1px var(--button-outline-color)!important}button.accent.disabled,button.accent:disabled,button.contrast.disabled,button.contrast:disabled,button.danger.disabled,button.danger:disabled,button.primary.disabled,button.primary:disabled{color:var(--colored-disabled-button-color)!important;cursor:auto;outline:none}button.accent.disabled:not(.link),button.accent:disabled:not(.link),button.contrast.disabled:not(.link),button.contrast:disabled:not(.link),button.danger.disabled:not(.link),button.danger:disabled:not(.link),button.primary.disabled:not(.link),button.primary:disabled:not(.link){background-color:var(--disabled-button-background)!important;border-color:var(--disabled-button-background)!important}button.outline-hover:hover{background-color:transparent!important;outline:.5px solid var(--button-outline-color)!important}button.link{background-color:transparent!important;border:0;color:var(--primary)!important;padding:0}button.link.accent{color:var(--accent)!important}button.link.contrast{color:var(--contrast)!important}button.link.danger{color:var(--danger)!important}button.link:active,button.link:focus,button.link:hover{background-color:transparent!important;box-shadow:unset!important;text-decoration:underline!important}button.disabled,button:disabled{color:var(--disabled-button-color)!important;cursor:auto}button.disabled:not(.link):not(.icon),button:disabled:not(.link):not(.icon){background-color:var(--disabled-button-background)!important;border-color:var(--disabled-button-background)!important}button.disabled.link,button:disabled.link{color:var(--disabled-button-color)!important}button.disabled:hover,button:disabled:hover{outline:none;text-decoration:none}select{background-color:var(--background);border:.5px solid var(--input-border-color);outline:var(--primary) none 0;padding:.5rem}select:focus{border-color:var(--primary);box-shadow:inset 1px 1px 0 var(--primary),inset -1px -1px 0 var(--primary)}select:disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);box-shadow:none;color:var(--disabled-button-colour);cursor:auto}input,textarea{accent-color:var(--primary);border:.5px solid var(--input-border-color);border-radius:2px;min-height:3rem;outline:0 none currentcolor;padding:0 1rem}input:focus,textarea:focus{border-color:var(--primary);box-shadow:inset 1px 1px 0 var(--primary),inset -1px -1px 0 var(--primary)}input:invalid:not([invalid=false]):not([required]),input[invalid]:not([invalid=false]),textarea:invalid:not([invalid=false]):not([required]),textarea[invalid]:not([invalid=false]){border-color:var(--danger)}input:invalid:not([invalid=false]):not([required]):focus,input:invalid:not([invalid=false]):not([required]):hover,input[invalid]:not([invalid=false]):focus,input[invalid]:not([invalid=false]):hover,textarea:invalid:not([invalid=false]):not([required]):focus,textarea:invalid:not([invalid=false]):not([required]):hover,textarea[invalid]:not([invalid=false]):focus,textarea[invalid]:not([invalid=false]):hover{box-shadow:inset 1px 1px 0 var(--danger),inset -1px -1px 0 var(--danger)}input:disabled,textarea:disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);box-shadow:none;color:var(--disabled-button-color);cursor:auto}input[type=checkbox],input[type=color],input[type=file],input[type=image],input[type=radio],input[type=range],textarea[type=checkbox],textarea[type=color],textarea[type=file],textarea[type=image],textarea[type=radio],textarea[type=range]{border:none;min-height:unset;padding-left:0}input[type=checkbox]:focus-visible,input[type=radio]:focus-visible,textarea[type=checkbox]:focus-visible,textarea[type=radio]:focus-visible{outline:var(--button-outline-color) dashed .1rem;outline-offset:.1rem}input[type=button],input[type=reset],input[type=submit],textarea[type=button],textarea[type=reset],textarea[type=submit]{border:0;padding:.6rem 1.5rem}@supports (-moz-appearance:none){input[type=button],input[type=reset],input[type=submit],textarea[type=button],textarea[type=reset],textarea[type=submit]{padding:.6rem 1.5rem .9rem}}input[type=button]:hover,input[type=reset]:hover,input[type=submit]:hover,textarea[type=button]:hover,textarea[type=reset]:hover,textarea[type=submit]:hover{background-color:var(--button-hover);cursor:pointer}input[type=button]:active,input[type=button]:focus,input[type=reset]:active,input[type=reset]:focus,input[type=submit]:active,input[type=submit]:focus,textarea[type=button]:active,textarea[type=button]:focus,textarea[type=reset]:active,textarea[type=reset]:focus,textarea[type=submit]:active,textarea[type=submit]:focus{box-shadow:0 0 0 2px var(--button-outline-color);cursor:pointer;outline:none}input[type=button]:disabled,input[type=button]:hover:disabled,input[type=reset]:disabled,input[type=reset]:hover:disabled,input[type=submit]:disabled,input[type=submit]:hover:disabled,textarea[type=button]:disabled,textarea[type=button]:hover:disabled,textarea[type=reset]:disabled,textarea[type=reset]:hover:disabled,textarea[type=submit]:disabled,textarea[type=submit]:hover:disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);box-shadow:none;color:var(--disabled-button-color);cursor:auto}input[type=reset],textarea[type=reset]{background-color:var(--background);border:.5px solid var(--border-color)}input[type=reset]:active,input[type=reset]:focus,textarea[type=reset]:active,textarea[type=reset]:focus{box-shadow:0 0 0 1px var(--button-outline-color);cursor:pointer;outline:none}input[type=button],input[type=submit],textarea[type=button],textarea[type=submit]{background-color:var(--primary);color:var(--color-on-primary)}input[type=button]:hover,input[type=submit]:hover,textarea[type=button]:hover,textarea[type=submit]:hover{background-color:var(--primary-hover)}input[type=color],input[type=file],input[type=range],textarea[type=color],textarea[type=file],textarea[type=range]{border:none}input[type=color]:focus,input[type=file]:focus,input[type=range]:focus,textarea[type=color]:focus,textarea[type=file]:focus,textarea[type=range]:focus{box-shadow:none;outline:var(--primary) solid 2px;outline-offset:2px}input[type=file]::-webkit-file-upload-button,input[type=file]::file-selector-button,textarea[type=file]::-webkit-file-upload-button,textarea[type=file]::file-selector-button{background-color:var(--primary);border:0;border-radius:2px;color:var(--color-on-primary);padding:.6rem 1.5rem}input[type=file]:active::-webkit-file-upload-button,input[type=file]:active::file-selector-button,textarea[type=file]:active::-webkit-file-upload-button,textarea[type=file]:active::file-selector-button{box-shadow:inset 0 0 0 2px var(--button-outline-color)}input[type=file]:hover::-webkit-file-upload-button,input[type=file]:hover::file-selector-button,textarea[type=file]:hover::-webkit-file-upload-button,textarea[type=file]:hover::file-selector-button{background-color:var(--primary-hover);cursor:pointer}input[type=file]:focus,textarea[type=file]:focus{outline:var(--button-outline-color) solid .2rem;outline-offset:.1rem}input[type=color],textarea[type=color]{background-color:transparent;padding:0;width:8rem}input[type=range],textarea[type=range]{appearance:none;-webkit-appearance:none;background:transparent;padding:0}input[type=range]::-moz-range-thumb,textarea[type=range]::-moz-range-thumb{background:var(--background);border:2px solid var(--range-filled-track-color);border-radius:100px;height:1.2rem;width:1.2rem}input[type=range]::-moz-range-track,textarea[type=range]::-moz-range-track{background-color:var(--range-track-color);height:.3rem}input[type=range]::-moz-range-progress,textarea[type=range]::-moz-range-progress{background-color:var(--range-filled-track-color);height:.3rem}input[type=range]::-webkit-slider-thumb,textarea[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:var(--background);border:2px solid var(--range-filled-track-color);border-radius:100px;height:1.6rem;margin-top:-6px;width:1.6rem}input[type=range]::-webkit-slider-runnable-track,textarea[type=range]::-webkit-slider-runnable-track{background:var(--range-track-color);border:none;border-radius:3px;height:3px}input[type=range]:focus,input[type=range]:hover,textarea[type=range]:focus,textarea[type=range]:hover{background:transparent;outline:none}input[type=range]:focus::-moz-range-progress,input[type=range]:hover::-moz-range-progress,textarea[type=range]:focus::-moz-range-progress,textarea[type=range]:hover::-moz-range-progress{background-color:var(--primary)}input[type=range]:focus::-moz-range-thumb,input[type=range]:hover::-moz-range-thumb,textarea[type=range]:focus::-moz-range-thumb,textarea[type=range]:hover::-moz-range-thumb{border:2px solid var(--primary)}input[type=range]:focus::-webkit-slider-runnable-track,input[type=range]:hover::-webkit-slider-runnable-track,textarea[type=range]:focus::-webkit-slider-runnable-track,textarea[type=range]:hover::-webkit-slider-runnable-track{background-color:var(--primary)}input[type=range]:focus::-webkit-slider-thumb,input[type=range]:hover::-webkit-slider-thumb,textarea[type=range]:focus::-webkit-slider-thumb,textarea[type=range]:hover::-webkit-slider-thumb{border:2px solid var(--primary)}input[type=range]:disabled:focus,input[type=range]:disabled:hover,textarea[type=range]:disabled:focus,textarea[type=range]:disabled:hover{background:transparent;outline:none}input[type=range]:disabled:focus::-moz-range-progress,input[type=range]:disabled:hover::-moz-range-progress,textarea[type=range]:disabled:focus::-moz-range-progress,textarea[type=range]:disabled:hover::-moz-range-progress{background-color:var(--range-filled-track-color)}input[type=range]:disabled:focus::-moz-range-thumb,input[type=range]:disabled:hover::-moz-range-thumb,textarea[type=range]:disabled:focus::-moz-range-thumb,textarea[type=range]:disabled:hover::-moz-range-thumb{border:2px solid var(--range-filled-track-color)}input[type=range]:disabled:focus::-webkit-slider-runnable-track,input[type=range]:disabled:hover::-webkit-slider-runnable-track,textarea[type=range]:disabled:focus::-webkit-slider-runnable-track,textarea[type=range]:disabled:hover::-webkit-slider-runnable-track{background-color:var(--range-filled-track-color)}input[type=range]:disabled:focus::-webkit-slider-thumb,input[type=range]:disabled:hover::-webkit-slider-thumb,textarea[type=range]:disabled:focus::-webkit-slider-thumb,textarea[type=range]:disabled:hover::-webkit-slider-thumb{border:2px solid var(--range-filled-track-color)}input.underline,textarea.underline{background-color:transparent;border-left:0;border-radius:0;border-right:0;border-top:0;padding:0}input.underline:focus,textarea.underline:focus{box-shadow:none}input.underline:focus,input.underline:hover,textarea.underline:focus,textarea.underline:hover{border-color:var(--primary);box-shadow:inset 0 -1px 0 var(--primary)}input.underline:disabled:focus,input.underline:disabled:hover,input.underline:invalid:not([invalid=false]):not([required]):focus,input.underline:invalid:not([invalid=false]):not([required]):hover,textarea.underline:disabled:focus,textarea.underline:disabled:hover,textarea.underline:invalid:not([invalid=false]):not([required]):focus,textarea.underline:invalid:not([invalid=false]):not([required]):hover{border-left:0;border-right:0;border-top:0;box-shadow:none}input.underline:invalid:not([invalid=false]):not([required]):focus,input.underline:invalid:not([invalid=false]):not([required]):hover,input.underline[invalid]:not([invalid=false]):focus,input.underline[invalid]:not([invalid=false]):hover,textarea.underline:invalid:not([invalid=false]):not([required]):focus,textarea.underline:invalid:not([invalid=false]):not([required]):hover,textarea.underline[invalid]:not([invalid=false]):focus,textarea.underline[invalid]:not([invalid=false]):hover{border-color:var(--danger);box-shadow:inset 0 -1px 0 var(--danger)}input.underline:disabled:focus,input.underline:disabled:hover,textarea.underline:disabled:focus,textarea.underline:disabled:hover{border-color:var(--disabled-button-background)}a{color:var(--primary)}a:active,a:focus,a:focus-visible,a:hover{outline:unset}a.accent{color:var(--accent)}a.danger{color:var(--danger)}a.contrast{color:var(--contrast)}a.button{background-color:transparent;border-radius:2px;color:var(--button-color);display:inline-block;padding:.9rem 1.5rem;text-align:center;text-decoration:none}a.button.normal{border:.5px solid var(--border-color)}a.button.normal.disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);color:var(--disabled-button-color);cursor:default}a.button:hover{background-color:var(--button-hover);cursor:pointer}a.button:active,a.button:focus{box-shadow:0 0 0 1px var(--button-outline-color);cursor:pointer;outline:none}a.button.primary{background-color:var(--primary);border:0;color:var(--color-on-primary)}a.button.primary:hover{background-color:var(--primary-hover)}a.button.danger{background-color:var(--danger);border:0;color:var(--color-on-danger)}a.button.danger:hover{background-color:var(--danger-hover)}a.button.accent{background-color:var(--accent);border:0;color:var(--color-on-accent)}a.button.accent:hover{background-color:var(--accent-hover)}a.button.contrast{background-color:var(--contrast);border:0;color:var(--color-on-contrast)}a.button.contrast:hover{background-color:var(--contrast-hover)}a.button.accent:active,a.button.accent:focus,a.button.contrast:active,a.button.contrast:focus,a.button.danger:active,a.button.danger:focus,a.button.primary:active,a.button.primary:focus{box-shadow:0 0 0 2px var(--button-outline-color)}a.button.accent.disabled,a.button.contrast.disabled,a.button.danger.disabled,a.button.primary.disabled{background-color:var(--disabled-button-background);border-color:var(--disabled-button-background);color:var(--colored-disabled-button-color);cursor:default}table{border-collapse:collapse}table td,table th{padding:.5rem 2.5rem .6rem .5rem;text-align:left;vertical-align:top}table:not(.no-hover) tbody tr:hover{background-color:var(--table-hover)}table.table tbody tr,table.table thead{border-bottom:.5px solid var(--border-color)}table.table tbody tr{border-color:var(--light)}table.table tfoot{font-size:small;font-style:italic}table.sticky-header>thead{background-color:var(--background);border-bottom:0;-webkit-box-shadow:0 1px 4px 0 rgba(var(--shadow-color),.16),0 1px 4px 0 rgba(var(--shadow-color),.12);box-shadow:0 1px 4px 0 rgba(var(--shadow-color),.16),0 1px 4px 0 rgba(var(--shadow-color),.12);position:sticky;position:-webkit-sticky;top:0;white-space:nowrap;z-index:2}table.striped tbody tr:nth-child(odd){background-color:var(--table-stripe)}table.striped tbody tr:hover{background-color:var(--table-striped-hover)}.table-container{border:.5px solid var(--border-color);border-color:var(--light);display:inline-block;overflow-x:hidden;overflow-y:auto;width:fit-content}@-moz-document url-prefix(){.table-container{padding-right:1.7rem}}.cursor-not-allowed:hover{cursor:not-allowed!important}.cursor-pointer{-webkit-user-select:none;-ms-user-select:none;user-select:none}.cursor-pointer:hover{cursor:pointer!important}.cursor-grab:hover{cursor:grab!important}.cursor-grabbing:hover{cursor:grabbing!important}.cursor-zoom-in:hover{cursor:zoom-in!important}.cursor-zoom-out:hover{cursor:zoom-out!important}.cursor-wait:hover{cursor:wait!important}.cursor-help:hover{cursor:help!important}.cursor-default,.cursor-default:hover{cursor:default!important}.cursor-no-select{-webkit-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.border{border:.5px solid var(--border-color)}.border-bottom{border-bottom:.5px solid var(--border-color)}.border-top{border-top:.5px solid var(--border-color)}.border-right{border-right:.5px solid var(--border-color)}.border-left{border-left:.5px solid var(--border-color)}.border-black{border-color:var(--black)}.border-white{border-color:var(--white)}.border-primary{border-color:var(--primary)}.border-accent{border-color:var(--accent)}.border-danger{border-color:var(--danger)}.border-light{border-color:var(--light)}.border-success{border-color:var(--icon-success)}html{background-color:var(--html-background)!important}.bg-gray-light{background-color:var(--gray-light)!important;color:var(--color-on-gray-light)!important}.bg-gray{background-color:var(--gray)!important;color:var(--color-on-gray)!important}.bg-gray-dark{background-color:var(--gray-dark)!important;color:var(--color-on-gray-dark)!important}.bg-black{background-color:var(--black)!important;color:var(--color-on-black)!important}.bg-white{background-color:var(--white)!important;color:var(--font-color)!important}.bg-primary{background-color:var(--primary)!important;color:var(--color-on-primary)!important}.bg-accent{background-color:var(--accent)!important;color:var(--color-on-accent)!important}.bg-danger{background-color:var(--danger)!important;color:var(--color-on-danger)!important}.bg-success{background-color:var(--success)!important;color:var(--color-on-success)!important}.bg-error{background-color:var(--error)!important;color:var(--color-on-error)!important}.bg-warning{background-color:var(--warning)!important;color:var(--color-on-warning)!important}.bg-transparent{background-color:transparent!important}.text-black{color:var(--black)!important}.text-white{color:var(--white)!important}.text-gray{color:var(--gray-darker)!important}.text-primary{color:var(--primary)!important}.text-accent{color:var(--accent)!important}.text-danger{color:var(--danger)!important}.text-success{color:var(--icon-success)!important}.icon-gray{color:var(--gray)!important}.icon-gray-dark{color:var(--gray-dark)!important}.icon-success{color:var(--icon-success)!important}.icon-primary{color:var(--primary)!important}.icon-accent{color:var(--accent)!important}.icon-danger{color:var(--danger)!important}.icon-black{color:var(--black)!important}.icon-white{color:var(--white)!important}.shadow{box-shadow:0 .6px 3.6px 0 rgba(var(--shadow-color),.132),0 .3px .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-top{box-shadow:0 -1.6px 3.6px 0 rgba(var(--shadow-color),.132),0 -.3px .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-left{box-shadow:-1.6px 0 3.6px 0 rgba(var(--shadow-color),.132),.3px 0 .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-right{box-shadow:1.6px 0 3.6px 0 rgba(var(--shadow-color),.132),-.3px 0 .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-bottom{box-shadow:0 1.6px 3.6px 0 rgba(var(--shadow-color),.132),0 .3px .9px 0 rgba(var(--shadow-color),.108)!important}.shadow-lg{box-shadow:0 0 5px 0 rgba(var(--shadow-color),.132)!important}.shadow-top-lg{box-shadow:0 -3px 5px 0 rgba(var(--shadow-color),.132)!important}.shadow-bottom-lg{box-shadow:0 3px 5px 0 rgba(var(--shadow-color),.132)!important}.shadow-left-lg{box-shadow:-3px 0 5px 0 rgba(var(--shadow-color),.132)!important}.shadow-right-lg{box-shadow:3px 0 5px 0 rgba(var(--shadow-color),.132)!important} \ No newline at end of file diff --git a/documentation/public/cdn/ibiss-v0.0.9/flightkit.min.js b/documentation/public/cdn/ibiss-v0.0.9/flightkit.min.js new file mode 100644 index 0000000..19d801c --- /dev/null +++ b/documentation/public/cdn/ibiss-v0.0.9/flightkit.min.js @@ -0,0 +1 @@ +!function(){"use strict";function i(e,t){if(!t||0===t.length)return e;const s=Object.assign([],e);if(Array.isArray(s[0])){e=s;var n=t;const r=[];for(const i of e)r.push(i.sort(E(n)));r}else s.sort(E(t));return s}function v(e){let t=e.toString();e=t.match(/^\d+|\d+$/);return e?parseInt(e[0]):null}function b(e){return"boolean"==typeof e||"string"==typeof e&&("true"===(e=e.toLocaleLowerCase())||"false"===e)}function w(e){return"boolean"==typeof e?e:"true"===e.toLocaleLowerCase()}function E(f,y=0){return function(e,t){var{propertyName:s,direction:d}=f[y];let n=null===e[s]||void 0===e[s]?"":e[s],r=null===t[s]||void 0===t[s]?"":t[s];const h=/^(\d{1,4}-\d{1,4}-\d{1,4}(T)?)/gim;var s=n instanceof Date&&r instanceof Date||h.test(n)&&h.test(r),p=(s&&(n=n instanceof Date?n.valueOf():new Date(Date.parse(n)),r=r instanceof Date?r.valueOf():new Date(Date.parse(r))),b(n)&&b(r)),u=!p&&!isNaN(n)&&!isNaN(r),i=v(n),o=v(r);u?(n=parseFloat(n).toPrecision(12),r=parseFloat(r).toPrecision(12)):null!==i&&null!==o&&(n=parseFloat(i).toPrecision(12),r=parseFloat(o).toPrecision(12)),p&&(n=w(n),r=w(r));let a,l;switch(d){case"descending":case"desc":a=r,l=n;break;default:a=n,l=r}let c=0;if(p||s||u)c=a-l;else{a=a.toString().trim().toLowerCase(),l=l.toString().trim().toLowerCase();const m=/\d/gim;i=m.test(n)&&m.test(r);c=i?a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"}):a.localeCompare(l)}o=y+1;if(0===c&&o(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),s=t.split("-")[0];return window.$flightkitUUIDStore||(window.$flightkitUUIDStore=[]),window.$flightkitUUIDStore.some(e=>e===s)?e():(window.$flightkitUUIDStore.push(s),s)}()}render(t){if(!t.component)throw new Error("Component is not assigned! Can't render");t.id=t.id||this.generateId();var e=this._getAllEventAttributes(t);if(e){var s="#"+t.id;for(const i of e){var n="e-"+i;this.addEvent(s,i,t.getAttribute(n))}}var r=Object.keys(t.classList).length;if(r){for(let e=0;e{this._assignToDom(t,t.component),clearTimeout(this._renderTimer)},10)}addEvent(e,t,s){this._events.push({selector:e,eventType:t,callback:s})}_getExternalCallback(e){let t=void 0;for(const s of e.split("."))t=(t||window)[s];return t}_getAllEventAttributes(e){e=e.attributes;const t=Array.from(e).filter(e=>e.name.startsWith("e-"));return t.map(e=>e.name.slice(2))}_isFlightkitElement(e){return e.toUpperCase().includes("FLK-")}_outerEventHandler(e){const t=h(e),s=(t.contents=e.detail,t.target.getAttribute("e-"+t.type));let n=void 0;for(const r of s.split("."))n=(n||window)[r];return e.preventDefault(),e.stopPropagation(),n(t)}_addEvents(e){if(e.isConnected)for(const s of this._events)if(s.selector.startsWith("."))for(const n of document.querySelectorAll(s.selector))this._addEventToElement(s,n);else{var t=document.querySelector(s.selector);this._addEventToElement(s,t)}}_addEventToElement(e,t){t&&("function"==typeof e.callback?(t.removeEventListener(e.eventType,e.callback),t.addEventListener(e.eventType,e.callback)):(t.removeEventListener(e.eventType,this._outerEventHandler),t.addEventListener(e.eventType,this._outerEventHandler)))}removeEvents(){for(const t of this._events)if(t.selector.startsWith("."))for(const s of document.querySelectorAll(t.selector))this._addEventToElement(t,s);else{var e=document.querySelector(t.selector);this._addEventToElement(t,e)}this._events=[]}_removeEventToElement(e,t){t&&("function"==typeof e.callback?t.removeEventListener(e.eventType,e.callback):t.removeEventListener(e.eventType,this._outerEventHandler))}_assignToDom(e,t){e.innerHTML="";for(const n of Array.isArray(t)?t:[t])e.append(n);const s=setTimeout(()=>{this._addEvents(e),clearTimeout(s)},10)}}const u='',m='';function l(e){const t=new DOMParser;return t.parseFromString(e,"image/svg+xml").documentElement}class e extends HTMLElement{base;component=null;_contents=[];_orderBy=[];properties=new Set;_columnOrder=[];_filter="";_selectionProperty="";_selectedIds=new Set;uniqueEntriesByProperties={};propertyLabelDictionary={};_templates={};_templateClasses={};static get observedAttributes(){return["contents","columns","order","filter","selection-property","templates"]}get columnOrder(){return this._columnOrder.length?this._columnOrder:this.properties}set columnOrder(e){let t;"string"==typeof e&&(t=e.split(",")),t=e,this._columnOrder=t}get contents(){return this._contents}set contents(e){this.analyzeData(e),this._contents=e}get orderBy(){return this._orderBy}set orderBy(e){if(Array.isArray(e))this._orderBy=e;else{const n=[];for(const r of e.split(",")){var t=r.split("|"),s=t[0],t=1e[s._selectionProperty])):new Set;e=t?s.contents.execute():[];s._emit("select",s,{selection:e}),s._updateCheckboxes(s)}emitSelect(e){var t=e.target.checked,s=e.target.dataset.objectId;const n=h(e).target,r=(t?n._selectedIds.add(s):n._selectedIds.delete(s),n._selectionProperty);e=n.contents.execute().filter(e=>n._selectedIds.has(e[r]));n._emit("select",n,{selection:e}),n._updateCheckboxes(n)}sortData(e){const t=h(e).target,s=p(e,"column");s&&(-1<(e=t._orderBy.findIndex(e=>e.propertyName===s))?"asc"===t._orderBy[e].direction?t._orderBy[e].direction="desc":t._orderBy.splice(e,1):t._orderBy.push({propertyName:s,direction:"asc"}),t.createHtml(),t.base.render(t))}setColumnOrder(e){this._columnOrder=e?Array.isArray(e)?e:e.split(","):[]}analyzeData(t){this.properties=new Set;var s=t.length;for(let e=0;e"_"===e?" ":" "+e.toLowerCase()).trim();var s=t.charAt(0).toUpperCase()+t.slice(1);return this.propertyLabelDictionary[e]=s}parseTemplate(e,n){return e.replace(/\{\{([\s\S]+?)\}\}/gim,(e,t)=>{let s="";t=t.trim();t=n[t];return t&&(s=t),Array.isArray(s)?s.join(", "):s.toString().trim()})}createSelectionCheckbox(e){const t=document.createElement("input");return t.setAttribute("type","checkbox"),t.classList.add("flk-selection-checkbox"),e&&(t.dataset.selected=e[this._selectionProperty]),t}createRow(e){const t=document.createElement("tr");if(this._selectionProperty.length){const r=document.createElement("td");var s=this.base.generateId();const i=this.createSelectionCheckbox(e);i.id=s,i.dataset.objectId=e[this._selectionProperty];var n=e[this._selectionProperty];this._selectedIds.has(n)?i.checked=!0:i.checked=!1,this.base.addEvent("#"+s,"change",this.emitSelect),r.append(i),t.append(r)}for(const o of this.columnOrder){const a=document.createElement("td");this._templates[o]?(a.innerHTML=this.parseTemplate(this._templates[o],e),this._templateClasses[o]&&a.classList.add(...this._templateClasses[o])):a.innerText=e[o],t.append(a)}return t}createBody(e){const t=document.createElement("tbody");for(const n of e){var s=this.createRow(n,null);t.append(s)}return t}createHead(){const e=document.createElement("thead"),t=document.createElement("tr");if(t.classList.add("cursor-pointer"),this._selectionProperty.length){const r=document.createElement("th");var s=this.base.generateId();const i=this.createSelectionCheckbox();i.id=s;var d=this.contents.execute().length;0e.propertyName===o);const c=document.createElement("span");n?c.innerHTML="asc"===n.direction?'':'':(c.style.display="inline-block",c.style.width="24px"),a.append(c),t.append(a)}return e.append(t),e}addEvent(e,t,s){this.base.addEvent(e,t,s)}init(){this.createHtml(),this.base.render(this)}}class t extends HTMLElement{base;componentId;constructor(){super(),this.base=new r}connectedCallback(){var e=this.getAttribute("top"),t=this.getAttribute("left"),s=this.getAttribute("center"),n=this.getAttribute("zIndex");this.id||(this.id=this.base.generateId()),this.style.display="block",this.style.position="fixed","string"==typeof s?(this.style.top=e||"50%",this.style.left="50%",this.style.transform="translate(-50%, -50%)"):(this.style.top=e||this.clientTop+"px",this.style.left=t||this.clientLeft+"px"),n&&(this.style.zIndex=n),this.componentId=this.getAttribute("handle");const r=document.createElement("div");r.innerHTML=this.innerHTML,this.component=r;s="#"+(this.componentId||this.id);this.base.addEvent(s,"mousedown",this._dragElement),this.base.addEvent(s,"mouseup",this._reset),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this)}_dragElement(e){const s=h(e,"flk-draggable").target;let n,r;function t(e){n=e.clientX-s.offsetLeft,r=e.clientY-s.offsetTop}function i(e){var t=e.clientX-n,e=e.clientY-r;s.style.left=t+"px",s.style.top=e+"px"}function o(e){e.preventDefault()}function a(){s.removeAttribute("draggable"),s.removeEventListener("dragstart",t),s.removeEventListener("dragend",a),document.removeEventListener("dragover",o),document.removeEventListener("drop",i)}s.setAttribute("draggable",!0),s.addEventListener("dragstart",t),s.addEventListener("dragend",a),document.addEventListener("dragover",o),document.addEventListener("drop",i)}}class s extends HTMLElement{_id;base;_draggableId;constructor(){super(),this.base=new r}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}_closeModal(e){e.stopPropagation();const t=h(e,"flk-modal").target;t.classList.add("hidden")}closeModal(e){this.classList.add("hidden")}openModal(e=!0){const t=document.getElementById(this._draggableId);e&&(t.style.top="40%",t.style.left="50%"),this.classList.remove("hidden")}connectedCallback(){this.id||(this.id=this.base.generateId());const e=document.createElement("div");var t=this.base.generateId();const s=document.createElement("flk-draggable"),n=(this._draggableId=this.base.generateId(),s.id=this._draggableId,s.setAttribute("center",""),s.setAttribute("top","40%"),s.setAttribute("handle",t),s.setAttribute("zIndex","1080"),s.classList.add("border","shadow-lg","bg-white"),s.style.width="max-content",document.createElement("div"));var r=this.getAttribute("modal-title");if(r){const c=document.createElement("span");c.innerText=r,c.classList.add("ml-1","mr-auto"),n.append(c)}n.id=t;const i=this.getAttribute("header-class");let o=[];i?o=o.concat(i.split(" ")):o.push("bg-gray-light"),n.classList.add(...o,"border-bottom","row","justify-end","cursor-no-select");r=this.base.generateId();const a=document.createElement("button"),l=(a.classList.add("py-0","px-1","outline-hover","no-border","cursor-default",...o),a.innerText="X",a.id=r,n.append(a),s.append(n),document.createElement("div"));l.innerHTML=this.innerHTML,s.append(l),e.append(s),this.component=e,this.base.addEvent("#"+r,"click",this._closeModal),this.base.render(this),this.classList.add("hidden")}disconnectedCallback(){this.base.removeEvents(this)}}class n extends HTMLElement{base;_buttonId;_drawerId;_iconId;constructor(){super(),this.base=new r}connectedCallback(){this.style.position="relative",this.style.display="flex",this.style.width="fit-content",this._buttonId=this.base.generateId();const e=document.createElement("button"),t=(e.setAttribute("type","button"),e.classList.add("row"),e.id=this._buttonId,document.createElement("span")),s=(t.classList.add("self-align-center"),t.innerText=this.getAttribute("text"),this._iconId=this.base.generateId(),document.createElement("span"));s.classList.add("self-align-center");var n=l('');const r=l(''),i=(r.classList.add("hidden"),s.append(n,r),s.id=this._iconId,e.append(t,s),this._drawerId=this.base.generateId(),document.createElement("div"));i.id=this._drawerId,i.classList.add("shadow","inline-block","bg-white"),i.style.position="absolute",i.style.zIndex="1040";n=this.querySelector("template");n.innerHTML.length?i.innerHTML=n.innerHTML:i.append(n.firstChild),i.style.display="none",this.component=[e,i],this.base.addEvent("#"+this._buttonId,"click",this.toggleMenu);const o=document.querySelector("body");""!==o.getAttribute("flk-close-dropdown")&&(o.setAttribute("flk-close-dropdown",""),o.addEventListener("click",this.closeAllDropdownButtons)),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this);var e=document.querySelectorAll("flk-dropdown");if(!e||!e.length){const t=document.querySelector("body");t.removeAttribute("flk-close-dropdown"),t.removeEventListener("click",this.closeAllDropdownButtons)}}toggleMenu(e){const t=h(e).target;e=t._drawerId;const s=document.getElementById(e);var e="none"!==s.style.display,n=(s.style.display=e?"none":"block",t.getAttribute("drawer-width")),n=("string"==typeof t.getAttribute("right")&&(s.style.right="0px"),s.style.top=t.offsetHeight+"px",s.style.width=n||t.offsetWidth+"px",t._iconId);const r=document.getElementById(n);e?(r.childNodes[0].classList.remove("hidden"),r.childNodes[1].classList.add("hidden")):(r.childNodes[0].classList.add("hidden"),r.childNodes[1].classList.remove("hidden"))}_closeDropdown(){var e=this._drawerId;const t=document.getElementById(e);if("none"!==t.style.display){e=this._iconId;const s=document.getElementById(e);t.style.display="none",s.childNodes[0].classList.remove("hidden"),s.childNodes[1].classList.add("hidden")}}closeAllDropdownButtons(e){var t,s=h(e,"flk-dropdown").target,e=document.querySelectorAll("flk-dropdown");if(s)for(const n of e)s._buttonId!==n._buttonId&&(t=n._drawerId,"none"!==document.getElementById(t).style.display&&n._closeDropdown());else for(const r of e)r._closeDropdown()}}class o extends HTMLElement{base;contents;component;listType="ul";iconSet;filter={value:"",caseSensitive:!1};selectedElements=[];static get observedAttributes(){return["contents","icon-set","max-depth","filter"]}_jsonToValueArray(e){let t=JSON.stringify(e);t=t.replace(/[\[\]{}\"]/g,"");let s=[];for(const n of t.split(","))s=s.concat(n.split(":"));return[...new Set(s)]}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}constructor(){super(),this.base=new r,this.setContents(this.getAttribute("contents")),this.iconSet=this.getAttribute("icon-set")?this.getAttribute("icon-type"):"file",this.maxDepth=this.getAttribute("max-depth")?parseInt(this.getAttribute("max-depth")):-1,this.setFilter(this.getAttribute("filter")),this.style.display="block",this.style.maxWidth="fit-content",this.style.margin="0 1rem 0 0",this.base.addEvent(".flk-branch","click",this.emitNodeToggle)}deselectTree(){if(this.selectedElements.length)for(const e of this.selectedElements)e.classList.remove("font-weight-bold"),delete e.dataset.selected}emitNodeToggle(e){if(e.stopPropagation(),["LI","UL"].includes(e.target.tagName))return!1;const t=h(e,"flk-tree-nav").target,s=p(e,"branchKey");let n=t.contents;const r=s.split(".");for(const a of r)if(n[a])n=n[a];else if(null===n[a])n=null;else{let e=[];for(const l of n)l[a]&&e.push(l[a]);n=e}let i,o=e.target;for(;o.dataset&&o.dataset.leafKey?i=o.dataset.leafKey:o=o.parentNode||o.parentElement,!i;);t.selectedElements.length&&t.deselectTree(),t.selectedElements=[],"DETAILS"===o.tagName?(t.selectedElements.push(o.childNodes[0]),o.childNodes.length&&o.childNodes[0].childNodes.length&&"DIV"===o.childNodes[0].childNodes[0].tagName&&(console.log(o.childNodes[0].childNodes),t.selectedElements=o.childNodes[0].childNodes[0].childNodes)):t.selectedElements.push(o);for(const c of t.selectedElements)c.dataset.selected||(c.classList.add("font-weight-bold"),c.dataset.selected=!0);var e=s.substring(s.indexOf(".")+1),d=t.createLeafText(r.reverse()[0]);t._emit("tree-click",t,{path:e,data:n,key:i,label:(d.titleText+" "+d.commentText).trim(),branch:"object"==typeof n})}convertJsonKeyToTitle(e){if(!e)return"";const t=(e="string"!=typeof e?e.toString():e).replace(/([A-Z_])/g,e=>"_"===e?" ":" "+e).trim();return t.charAt(0).toUpperCase()+t.slice(1)}setContents(e){var t=e||this.contents||[];try{switch(typeof t){case"string":this.contents=JSON.parse(t);break;case"object":Array.isArray(t)?this.contents=t:this.contents=[t]}}catch(e){console.log(e)}}applyFilter(e){let t;var s="details"===e.tagName.toLowerCase();t=this.filter.caseSensitive?e.dataset.branchValues.includes(this.filter.value):e.dataset.branchValues.toLowerCase().includes(this.filter.value.toLowerCase()),t?e.parentElement.classList.remove("hidden"):e.parentElement.classList.add("hidden"),s&&t?e.setAttribute("open",""):e.removeAttribute("open")}resetTree(e){e.parentElement.classList.remove("hidden"),e.removeAttribute("open")}filterTree(){let t=setTimeout(()=>{for(const e of this.querySelectorAll("[data-branch-values]"))void 0===this.filter.value||0===this.filter.value.length?this.resetTree(e):this.applyFilter(e);clearTimeout(t)},10)}setFilter(e){const t=e||{};try{switch(typeof t){case"string":t.includes("{")?(this.filter=JSON.parse(t),!1===this.filter.caseSensitive&&(this.filter.value=this.filter.value.toLowerCase())):this.filter.value=e.toLowerCase();break;case"object":this.filter=t}}catch(e){console.log(e)}this.filterTree()}createLeafText(e){var t,s;let n="",r="";return"string"==typeof e&&(e.includes("(")||e.includes("["))?(s=e.indexOf("("),s=-1===(t=e.indexOf("["))?s:t,n=this.convertJsonKeyToTitle(e.substring(0,s)),r=e.substring(s)):n=this.convertJsonKeyToTitle(e),{titleText:n,commentText:r}}createTextTag(n,r){n=this.createLeafText(n);if(n.commentText){let e=document.createElement("div"),t=document.createElement("span"),s=(t.innerText=n.titleText,document.createElement("small"));s.innerText=n.commentText,s.style.marginLeft="1rem",e.append(t,s),e.style.display="inline-flex",e.style.alignItems="center",r.append(e)}else r.innerText=n.titleText}createLeaf(e,t,s,n=[]){let r=document.createElement("li");r.classList.add("cursor-no-select"),r.style.marginTop="0.4rem",r.dataset.branchKey=s;const i="file"===this.iconSet?'':'';r.style.listStyleImage=`url('data:image/svg+xml,${i}')`,r.style.position="relative",r.style.left="2px";let o=document.createElement("span");s=[e].concat(n);if(o.dataset.branchValues=[...new Set(s)].join(),o.dataset.leafKey=s[0],this.createTextTag(e,o),o.style.position="relative",o.style.top="-3px",r.append(o),t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);const i="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${i}')`,e.append(r),t.append(e)}else t.append(r)}createBranch(s,t,n,r){if(r===this.maxDepth&&"object"==typeof s)for(const o of Array.isArray(s)?s:Object.keys(s)){let e;s[o]&&(e=this._jsonToValueArray(s[o])),this.createLeaf(o,t,n+"."+o,e)}else if(Array.isArray(s))for(var e in s){var d=document.createElement(this.listType);t.append(this.createBranch(s[e],d,n+"."+e,r+1))}else if(null!==s&&"object"==typeof s){const a=[];for(const l of Object.keys(s)){let e=document.createElement("li"),t=(e.classList.add("cursor-no-select"),e.style.position="relative",e.style.left="2px",e.dataset.branchKey=n+"."+l,document.createElement("details"));t.classList.add("flk-branch"),t.dataset.branchValues=[l].concat(this._jsonToValueArray(s[l])),t.style.position="relative",t.style.top="-3px",t.classList.add("cursor-default");var i=document.createElement("summary");this.createTextTag(l,i),t.dataset.leafKey=l,t.append(i),e.append(this.createBranch(s[l],t,n+"."+l,r+1)),a.push(e)}if(t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);var h="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${h}')`;for(const c of a)e.append(c);t.append(e)}else for(const p of a)t.append(p)}else this.createLeaf(s,t,n);return t}createHtml(){let e=document.createElement(this.listType);var t="file"===this.iconSet?u:'';if(e.style.listStyleImage=`url('data:image/svg+xml,${t}')`,e.style.marginLeft="3rem",this.contents.length){for(const s in this.contents)e=this.createBranch(this.contents[s],e,s,0);this.component=e}else this.component=e}attributeChangedCallback(e,t,s){switch(e){case"contents":this.setContents(s);break;case"icon-set":this.iconSet=s;break;case"max-depth":this.maxDepth="string"==typeof s?parseInt(s):s;break;case"filter":this.setFilter(s)}this.init()}connectedCallback(){this.init()}disconnectedCallback(){this.base.removeEvents(this)}init(){this.createHtml(),this.base.render(this)}}customElements.define("flk-table",e),customElements.define("flk-draggable",t),customElements.define("flk-modal",s),customElements.define("flk-dropdown",n),customElements.define("flk-tree-nav",o)}(); \ No newline at end of file diff --git a/documentation/public/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js b/documentation/public/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js new file mode 100644 index 0000000..c035056 --- /dev/null +++ b/documentation/public/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js @@ -0,0 +1 @@ +!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";htmx.defineExtension("ibiss-ui",{onEvent:function(t,e){if("htmx:beforeRequest"===t){const{target:i,detail:n}=e;t=i.getAttribute("ibiss-router");if(window[t]&&"function"==typeof window[t])return window[t](i,n,e),!1}}})}); \ No newline at end of file diff --git a/documentation/public/cdn/ibiss-v0.0.9/rocket.min.js b/documentation/public/cdn/ibiss-v0.0.9/rocket.min.js new file mode 100644 index 0000000..0a7f9d0 --- /dev/null +++ b/documentation/public/cdn/ibiss-v0.0.9/rocket.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).rocketjs=t()}(this,function(){"use strict";function y(e,t){let r=0,l=e.indexOf(t);for(;-1!==l;)r++,l=e.indexOf(t,l+1);return r}function e(){return{sequence:"",match:!1}}function v(e,t,r){let l=r.sequence;return l.length===t.length&&(l=l.substring(1)),l+=e,r.sequence=l,r.match=l===t,r}class g{static getTemplates(t,r,l){if(r.length!==l.length)throw new Error("Template start is not the same length as template end");var g=t.length;let a=e(),o=e(),n=0,s=0,i=[],p=[];const u=[];for(let e=0;ee.replace(new RegExp(t,"g"),r));return l=l.replace(/if([\s\S]+?)\s|is|not/gm,e=>e.replace(new RegExp(t,"g"),r)),l=l.replace(/(of|in)([\s\S]+?)(?=<|{)/gm,e=>e.replace(new RegExp(t,"g"),r)),l}}class o{static resolvePartials(e,t){let r=e;for(const a of g.getTemplates(e,"{{#","#}}")){var l=g.getInnerTemplate(a),l=g.getPropertyValue(l,t);let e=l?l:"";r=r.replace(a,e)}if(r.includes("{{#")){if(e===r)return r;r=o.resolvePartials(r,t)}return r}}class s{static interpolateTemplate(e,r){let l=e;for(const n of g.getTemplates(e,"{{","}}")){let e=g.getInnerTemplate(n,2);var a="!"===e[0],o=(a&&(e=e.substr(1).trim()),g.getPropertyValue(e,r));let t=o?o:"";t=Array.isArray(t)?t.join(", "):t.toString().trim();o=a?s.escapeHtml(t):t;l=l.replace(n,o)}return l}static escapeHtml(e){return e=(e=(e=(e=(e=e.replace(/&/gm,"&")).replace(//gm,">")).replace(/"/gm,""")).replace(/\//gm,"'")}}class r{static buildTemplate(e,t){e=o.resolvePartials(e,t),e=class{static resolveWrapper(e){let t=e;for(const o of g.getTemplates(e,"{{$","$}}")){var r=g.getWrapperProperty(o),l=g.getTemplates(r.templateToFill,"{{","}}"),l=g.getToplevelTemplates(l);let e=r.templateToFill;for(const n of l){var a=g.getProperty(n);e=e.replace(new RegExp(a,"g"),r.property+"."+a)}t=t.replace(o,e)}return t}}.resolveWrapper(e);return e=c.resolveLoop(e,t),class{static resolveConditional(e,l){let a=e;for(const p of g.getTemplates(e,"{{~","~}}")){const c=g.getConditionalLogic(p);var o=c.property,n=c.logiclessTemplate,s=c.truthy,i=!c.truthy;let e="",t=(c.comparison&&(e=c.comparison),""),r=g.getPropertyValue(o,l);r&&(r=Array.isArray(r)?r:r.toString().trim().toLocaleLowerCase(),e=c.comparison?c.comparison.toLocaleLowerCase():null),e?(s&&(t=r===e?n:""),i&&(t=r!==e?n:"")):t="false"===r||!r||Array.isArray(r)&&!r.length?"":n,a=a.replace(p,t)}return a}}.resolveConditional(e,t)}static interpolateTemplate(e,t){return s.interpolateTemplate(e,t)}static render(e,t){e=r.buildTemplate(e,t);return r.interpolateTemplate(e,t)}}return r}); \ No newline at end of file diff --git a/documentation/public/js/flightkit.min.js b/documentation/public/js/flightkit.min.js index af4f23f..19d801c 100644 --- a/documentation/public/js/flightkit.min.js +++ b/documentation/public/js/flightkit.min.js @@ -1 +1 @@ -!function(){"use strict";function i(e,t){if(!t||0===t.length)return e;const s=Object.assign([],e);if(Array.isArray(s[0])){e=s;var n=t;const r=[];for(const i of e)r.push(i.sort(E(n)));r}else s.sort(E(t));return s}function y(e){let t=e.toString();e=t.match(/^\d+|\d+$/);return e?parseInt(e[0]):null}function b(e){return"boolean"==typeof e||"string"==typeof e&&("true"===(e=e.toLocaleLowerCase())||"false"===e)}function w(e){return"boolean"==typeof e?e:"true"===e.toLocaleLowerCase()}function E(f,v=0){return function(e,t){var{propertyName:s,direction:d}=f[v];let n=null===e[s]||void 0===e[s]?"":e[s],r=null===t[s]||void 0===t[s]?"":t[s];const h=/^(\d{1,4}-\d{1,4}-\d{1,4}(T)?)/gim;var s=n instanceof Date&&r instanceof Date||h.test(n)&&h.test(r),p=(s&&(n=n instanceof Date?n.valueOf():new Date(Date.parse(n)),r=r instanceof Date?r.valueOf():new Date(Date.parse(r))),b(n)&&b(r)),u=!p&&!isNaN(n)&&!isNaN(r),i=y(n),o=y(r);u?(n=parseFloat(n).toPrecision(12),r=parseFloat(r).toPrecision(12)):null!==i&&null!==o&&(n=parseFloat(i).toPrecision(12),r=parseFloat(o).toPrecision(12)),p&&(n=w(n),r=w(r));let a,l;switch(d){case"descending":case"desc":a=r,l=n;break;default:a=n,l=r}let c=0;if(p||s||u)c=a-l;else{a=a.toString().trim().toLowerCase(),l=l.toString().trim().toLowerCase();const m=/\d/gim;i=m.test(n)&&m.test(r);c=i?a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"}):a.localeCompare(l)}o=v+1;if(0===c&&o(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),s=t.split("-")[0];return window.$flightkitUUIDStore||(window.$flightkitUUIDStore=[]),window.$flightkitUUIDStore.some(e=>e===s)?e():(window.$flightkitUUIDStore.push(s),s)}()}render(t){if(!t.component)throw new Error("Component is not assigned! Can't render");t.id=t.id||this.generateId();var e=this._getAllEventAttributes(t);if(e){var s="#"+t.id;for(const i of e){var n="e-"+i;this.addEvent(s,i,t.getAttribute(n))}}var r=Object.keys(t.classList).length;if(r){for(let e=0;e{this._assignToDom(t,t.component),clearTimeout(this._renderTimer)},10)}addEvent(e,t,s){this._events.push({selector:e,eventType:t,callback:s})}_getExternalCallback(e){let t=void 0;for(const s of e.split("."))t=(t||window)[s];return t}_getAllEventAttributes(e){e=e.attributes;const t=Array.from(e).filter(e=>e.name.startsWith("e-"));return t.map(e=>e.name.slice(2))}_isFlightkitElement(e){return e.toUpperCase().includes("FLK-")}_outerEventHandler(e){const t=h(e),s=(t.contents=e.detail,t.target.getAttribute("e-"+t.type));let n=void 0;for(const r of s.split("."))n=(n||window)[r];return e.preventDefault(),e.stopPropagation(),n(t)}_addEvents(e){if(e.isConnected)for(const s of this._events)if(s.selector.startsWith("."))for(const n of document.querySelectorAll(s.selector))this._addEventToElement(s,n);else{var t=document.querySelector(s.selector);this._addEventToElement(s,t)}}_addEventToElement(e,t){t&&("function"==typeof e.callback?(t.removeEventListener(e.eventType,e.callback),t.addEventListener(e.eventType,e.callback)):(t.removeEventListener(e.eventType,this._outerEventHandler),t.addEventListener(e.eventType,this._outerEventHandler)))}removeEvents(){for(const t of this._events)if(t.selector.startsWith("."))for(const s of document.querySelectorAll(t.selector))this._addEventToElement(t,s);else{var e=document.querySelector(t.selector);this._addEventToElement(t,e)}this._events=[]}_removeEventToElement(e,t){t&&("function"==typeof e.callback?t.removeEventListener(e.eventType,e.callback):t.removeEventListener(e.eventType,this._outerEventHandler))}_assignToDom(e,t){e.innerHTML="";for(const n of Array.isArray(t)?t:[t])e.append(n);const s=setTimeout(()=>{this._addEvents(e),clearTimeout(s)},10)}}const u='',m='';function l(e){const t=new DOMParser;return t.parseFromString(e,"image/svg+xml").documentElement}class e extends HTMLElement{base;component=null;_contents=[];_orderBy=[];properties=new Set;_columnOrder=[];_filter="";_selectionProperty="";_selectedIds=new Set;uniqueEntriesByProperties={};propertyLabelDictionary={};_templates={};_templateClasses={};static get observedAttributes(){return["contents","columns","order","filter","selection-property","templates"]}get columnOrder(){return this._columnOrder.length?this._columnOrder:this.properties}set columnOrder(e){let t;"string"==typeof e&&(t=e.split(",")),t=e,this._columnOrder=t}get contents(){return this._contents}set contents(e){this.analyzeData(e),this._contents=e}get orderBy(){return this._orderBy}set orderBy(e){if(Array.isArray(e))this._orderBy=e;else{const n=[];for(const r of e.split(",")){var t=r.split("|"),s=t[0],t=1e[s._selectionProperty])):new Set;e=t?s.contents.execute():[];s._emit("select",s,{selection:e}),s._updateCheckboxes(s)}emitSelect(e){var t=e.target.checked,s=e.target.dataset.objectId;const n=h(e).target,r=(t?n._selectedIds.add(s):n._selectedIds.delete(s),n._selectionProperty);e=n.contents.execute().filter(e=>n._selectedIds.has(e[r]));n._emit("select",n,{selection:e}),n._updateCheckboxes(n)}sortData(e){const t=h(e).target,s=p(e,"column");s&&(-1<(e=t._orderBy.findIndex(e=>e.propertyName===s))?"asc"===t._orderBy[e].direction?t._orderBy[e].direction="desc":t._orderBy.splice(e,1):t._orderBy.push({propertyName:s,direction:"asc"}),t.createHtml(),t.base.render(t))}setColumnOrder(e){this._columnOrder=e?Array.isArray(e)?e:e.split(","):[]}analyzeData(t){this.properties=new Set;var s=t.length;for(let e=0;e"_"===e?" ":" "+e.toLowerCase()).trim();var s=t.charAt(0).toUpperCase()+t.slice(1);return this.propertyLabelDictionary[e]=s}parseTemplate(e,n){return e.replace(/\{\{([\s\S]+?)\}\}/gim,(e,t)=>{let s="";t=t.trim();t=n[t];return t&&(s=t),Array.isArray(s)?s.join(", "):s.toString().trim()})}createSelectionCheckbox(e){const t=document.createElement("input");return t.setAttribute("type","checkbox"),t.classList.add("flk-selection-checkbox"),e&&(t.dataset.selected=e[this._selectionProperty]),t}createRow(e){const t=document.createElement("tr");if(this._selectionProperty.length){const r=document.createElement("td");var s=this.base.generateId();const i=this.createSelectionCheckbox(e);i.id=s,i.dataset.objectId=e[this._selectionProperty];var n=e[this._selectionProperty];this._selectedIds.has(n)?i.checked=!0:i.checked=!1,this.base.addEvent("#"+s,"change",this.emitSelect),r.append(i),t.append(r)}for(const o of this.columnOrder){const a=document.createElement("td");this._templates[o]?(a.innerHTML=this.parseTemplate(this._templates[o],e),this._templateClasses[o]&&a.classList.add(...this._templateClasses[o])):a.innerText=e[o],t.append(a)}return t}createBody(e){const t=document.createElement("tbody");for(const n of e){var s=this.createRow(n,null);t.append(s)}return t}createHead(){const e=document.createElement("thead"),t=document.createElement("tr");if(t.classList.add("cursor-pointer"),this._selectionProperty.length){const r=document.createElement("th");var s=this.base.generateId();const i=this.createSelectionCheckbox();i.id=s;var d=this.contents.execute().length;0e.propertyName===o);if(n){const c=document.createElement("span");c.innerHTML="asc"===n.direction?'':'',a.append(c)}t.append(a)}return e.append(t),e}addEvent(e,t,s){this.base.addEvent(e,t,s)}init(){this.createHtml(),this.base.render(this)}}class t extends HTMLElement{base;componentId;constructor(){super(),this.base=new r}connectedCallback(){var e=this.getAttribute("top"),t=this.getAttribute("left"),s=this.getAttribute("center"),n=this.getAttribute("zIndex");this.id||(this.id=this.base.generateId()),this.style.display="block",this.style.position="fixed","string"==typeof s?(this.style.top=e||"50%",this.style.left="50%",this.style.transform="translate(-50%, -50%)"):(this.style.top=e||this.clientTop+"px",this.style.left=t||this.clientLeft+"px"),n&&(this.style.zIndex=n),this.componentId=this.getAttribute("handle");const r=document.createElement("div");r.innerHTML=this.innerHTML,this.component=r;s="#"+(this.componentId||this.id);this.base.addEvent(s,"mousedown",this._dragElement),this.base.addEvent(s,"mouseup",this._reset),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this)}_dragElement(e){const s=h(e,"flk-draggable").target;let n,r;function t(e){n=e.clientX-s.offsetLeft,r=e.clientY-s.offsetTop}function i(e){var t=e.clientX-n,e=e.clientY-r;s.style.left=t+"px",s.style.top=e+"px"}function o(e){e.preventDefault()}function a(){s.removeAttribute("draggable"),s.removeEventListener("dragstart",t),s.removeEventListener("dragend",a),document.removeEventListener("dragover",o),document.removeEventListener("drop",i)}s.setAttribute("draggable",!0),s.addEventListener("dragstart",t),s.addEventListener("dragend",a),document.addEventListener("dragover",o),document.addEventListener("drop",i)}}class s extends HTMLElement{_id;base;_draggableId;constructor(){super(),this.base=new r}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}_closeModal(e){e.stopPropagation();const t=h(e,"flk-modal").target;t.classList.add("hidden")}closeModal(e){this.classList.add("hidden")}openModal(e=!0){const t=document.getElementById(this._draggableId);e&&(t.style.top="40%",t.style.left="50%"),this.classList.remove("hidden")}connectedCallback(){this.id||(this.id=this.base.generateId());const e=document.createElement("div");var t=this.base.generateId();const s=document.createElement("flk-draggable"),n=(this._draggableId=this.base.generateId(),s.id=this._draggableId,s.setAttribute("center",""),s.setAttribute("top","40%"),s.setAttribute("handle",t),s.setAttribute("zIndex","1080"),s.classList.add("border","shadow-lg","bg-white"),s.style.width="max-content",document.createElement("div"));var r=this.getAttribute("modal-title");if(r){const c=document.createElement("span");c.innerText=r,c.classList.add("ml-1","mr-auto"),n.append(c)}n.id=t;const i=this.getAttribute("header-class");let o=[];i?o=o.concat(i.split(" ")):o.push("bg-gray-light"),n.classList.add(...o,"border-bottom","row","justify-end","cursor-no-select");r=this.base.generateId();const a=document.createElement("button"),l=(a.classList.add("py-0","px-1","outline-hover","no-border","cursor-default",...o),a.innerText="X",a.id=r,n.append(a),s.append(n),document.createElement("div"));l.innerHTML=this.innerHTML,s.append(l),e.append(s),this.component=e,this.base.addEvent("#"+r,"click",this._closeModal),this.base.render(this),this.classList.add("hidden")}disconnectedCallback(){this.base.removeEvents(this)}}class n extends HTMLElement{base;_buttonId;_drawerId;_iconId;constructor(){super(),this.base=new r}connectedCallback(){this.style.position="relative",this.style.display="flex",this.style.width="fit-content",this._buttonId=this.base.generateId();const e=document.createElement("button"),t=(e.setAttribute("type","button"),e.classList.add("row"),e.id=this._buttonId,document.createElement("span")),s=(t.classList.add("self-align-center"),t.innerText=this.getAttribute("text"),this._iconId=this.base.generateId(),document.createElement("span"));s.classList.add("self-align-center");var n=l('');const r=l(''),i=(r.classList.add("hidden"),s.append(n,r),s.id=this._iconId,e.append(t,s),this._drawerId=this.base.generateId(),document.createElement("div"));i.id=this._drawerId,i.classList.add("shadow","inline-block","bg-white"),i.style.position="absolute",i.style.zIndex="1040";n=this.querySelector("template");n.innerHTML.length?i.innerHTML=n.innerHTML:i.append(n.firstChild),i.style.display="none",this.component=[e,i],this.base.addEvent("#"+this._buttonId,"click",this.toggleMenu);const o=document.querySelector("body");""!==o.getAttribute("flk-close-dropdown")&&(o.setAttribute("flk-close-dropdown",""),o.addEventListener("click",this.closeAllDropdownButtons)),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this);var e=document.querySelectorAll("flk-dropdown");if(!e||!e.length){const t=document.querySelector("body");t.removeAttribute("flk-close-dropdown"),t.removeEventListener("click",this.closeAllDropdownButtons)}}toggleMenu(e){const t=h(e).target;e=t._drawerId;const s=document.getElementById(e);var e="none"!==s.style.display,n=(s.style.display=e?"none":"block",t.getAttribute("drawer-width")),n=("string"==typeof t.getAttribute("right")&&(s.style.right="0px"),s.style.top=t.offsetHeight+"px",s.style.width=n||t.offsetWidth+"px",t._iconId);const r=document.getElementById(n);e?(r.childNodes[0].classList.remove("hidden"),r.childNodes[1].classList.add("hidden")):(r.childNodes[0].classList.add("hidden"),r.childNodes[1].classList.remove("hidden"))}_closeDropdown(){var e=this._drawerId;const t=document.getElementById(e);if("none"!==t.style.display){e=this._iconId;const s=document.getElementById(e);t.style.display="none",s.childNodes[0].classList.remove("hidden"),s.childNodes[1].classList.add("hidden")}}closeAllDropdownButtons(e){var t,s=h(e,"flk-dropdown").target,e=document.querySelectorAll("flk-dropdown");if(s)for(const n of e)s._buttonId!==n._buttonId&&(t=n._drawerId,"none"!==document.getElementById(t).style.display&&n._closeDropdown());else for(const r of e)r._closeDropdown()}}class o extends HTMLElement{base;contents;component;listType="ul";iconSet;filter={value:"",caseSensitive:!1};selectedElements=[];static get observedAttributes(){return["contents","icon-set","max-depth","filter"]}_jsonToValueArray(e){let t=JSON.stringify(e);t=t.replace(/[\[\]{}\"]/g,"");let s=[];for(const n of t.split(","))s=s.concat(n.split(":"));return[...new Set(s)]}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}constructor(){super(),this.base=new r,this.setContents(this.getAttribute("contents")),this.iconSet=this.getAttribute("icon-set")?this.getAttribute("icon-type"):"file",this.maxDepth=this.getAttribute("max-depth")?parseInt(this.getAttribute("max-depth")):-1,this.setFilter(this.getAttribute("filter")),this.style.display="block",this.style.maxWidth="fit-content",this.style.margin="0 1rem 0 0",this.base.addEvent(".flk-branch","click",this.emitNodeToggle)}deselectTree(){if(this.selectedElements.length)for(const e of this.selectedElements)e.classList.remove("font-weight-bold"),delete e.dataset.selected}emitNodeToggle(e){if(e.stopPropagation(),["LI","UL"].includes(e.target.tagName))return!1;const t=h(e,"flk-tree-nav").target,s=p(e,"branchKey");let n=t.contents;const r=s.split(".");for(const a of r)if(n[a])n=n[a];else if(null===n[a])n=null;else{let e=[];for(const l of n)l[a]&&e.push(l[a]);n=e}let i,o=e.target;for(;o.dataset&&o.dataset.leafKey?i=o.dataset.leafKey:o=o.parentNode||o.parentElement,!i;);t.selectedElements.length&&t.deselectTree(),t.selectedElements=[],"DETAILS"===o.tagName?(t.selectedElements.push(o.childNodes[0]),o.childNodes.length&&o.childNodes[0].childNodes.length&&"DIV"===o.childNodes[0].childNodes[0].tagName&&(console.log(o.childNodes[0].childNodes),t.selectedElements=o.childNodes[0].childNodes[0].childNodes)):t.selectedElements.push(o);for(const c of t.selectedElements)c.dataset.selected||(c.classList.add("font-weight-bold"),c.dataset.selected=!0);var e=s.substring(s.indexOf(".")+1),d=t.createLeafText(r.reverse()[0]);t._emit("tree-click",t,{path:e,data:n,key:i,label:(d.titleText+" "+d.commentText).trim(),branch:"object"==typeof n})}convertJsonKeyToTitle(e){if(!e)return"";const t=(e="string"!=typeof e?e.toString():e).replace(/([A-Z_])/g,e=>"_"===e?" ":" "+e).trim();return t.charAt(0).toUpperCase()+t.slice(1)}setContents(e){var t=e||this.contents||[];try{switch(typeof t){case"string":this.contents=JSON.parse(t);break;case"object":Array.isArray(t)?this.contents=t:this.contents=[t]}}catch(e){console.log(e)}}applyFilter(e){let t;var s="details"===e.tagName.toLowerCase();t=this.filter.caseSensitive?e.dataset.branchValues.includes(this.filter.value):e.dataset.branchValues.toLowerCase().includes(this.filter.value.toLowerCase()),t?e.parentElement.classList.remove("hidden"):e.parentElement.classList.add("hidden"),s&&t?e.setAttribute("open",""):e.removeAttribute("open")}resetTree(e){e.parentElement.classList.remove("hidden"),e.removeAttribute("open")}filterTree(){let t=setTimeout(()=>{for(const e of this.querySelectorAll("[data-branch-values]"))void 0===this.filter.value||0===this.filter.value.length?this.resetTree(e):this.applyFilter(e);clearTimeout(t)},10)}setFilter(e){const t=e||{};try{switch(typeof t){case"string":t.includes("{")?(this.filter=JSON.parse(t),!1===this.filter.caseSensitive&&(this.filter.value=this.filter.value.toLowerCase())):this.filter.value=e.toLowerCase();break;case"object":this.filter=t}}catch(e){console.log(e)}this.filterTree()}createLeafText(e){var t,s;let n="",r="";return"string"==typeof e&&(e.includes("(")||e.includes("["))?(s=e.indexOf("("),s=-1===(t=e.indexOf("["))?s:t,n=this.convertJsonKeyToTitle(e.substring(0,s)),r=e.substring(s)):n=this.convertJsonKeyToTitle(e),{titleText:n,commentText:r}}createTextTag(n,r){n=this.createLeafText(n);if(n.commentText){let e=document.createElement("div"),t=document.createElement("span"),s=(t.innerText=n.titleText,document.createElement("small"));s.innerText=n.commentText,s.style.marginLeft="1rem",e.append(t,s),e.style.display="inline-flex",e.style.alignItems="center",r.append(e)}else r.innerText=n.titleText}createLeaf(e,t,s,n=[]){let r=document.createElement("li");r.classList.add("cursor-no-select"),r.style.marginTop="0.4rem",r.dataset.branchKey=s;const i="file"===this.iconSet?'':'';r.style.listStyleImage=`url('data:image/svg+xml,${i}')`,r.style.position="relative",r.style.left="2px";let o=document.createElement("span");s=[e].concat(n);if(o.dataset.branchValues=[...new Set(s)].join(),o.dataset.leafKey=s[0],this.createTextTag(e,o),o.style.position="relative",o.style.top="-3px",r.append(o),t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);const i="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${i}')`,e.append(r),t.append(e)}else t.append(r)}createBranch(s,t,n,r){if(r===this.maxDepth&&"object"==typeof s)for(const o of Array.isArray(s)?s:Object.keys(s)){let e;s[o]&&(e=this._jsonToValueArray(s[o])),this.createLeaf(o,t,n+"."+o,e)}else if(Array.isArray(s))for(var e in s){var d=document.createElement(this.listType);t.append(this.createBranch(s[e],d,n+"."+e,r+1))}else if(null!==s&&"object"==typeof s){const a=[];for(const l of Object.keys(s)){let e=document.createElement("li"),t=(e.classList.add("cursor-no-select"),e.style.position="relative",e.style.left="2px",e.dataset.branchKey=n+"."+l,document.createElement("details"));t.classList.add("flk-branch"),t.dataset.branchValues=[l].concat(this._jsonToValueArray(s[l])),t.style.position="relative",t.style.top="-3px",t.classList.add("cursor-default");var i=document.createElement("summary");this.createTextTag(l,i),t.dataset.leafKey=l,t.append(i),e.append(this.createBranch(s[l],t,n+"."+l,r+1)),a.push(e)}if(t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);var h="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${h}')`;for(const c of a)e.append(c);t.append(e)}else for(const p of a)t.append(p)}else this.createLeaf(s,t,n);return t}createHtml(){let e=document.createElement(this.listType);var t="file"===this.iconSet?u:'';if(e.style.listStyleImage=`url('data:image/svg+xml,${t}')`,e.style.marginLeft="3rem",this.contents.length){for(const s in this.contents)e=this.createBranch(this.contents[s],e,s,0);this.component=e}else this.component=e}attributeChangedCallback(e,t,s){switch(e){case"contents":this.setContents(s);break;case"icon-set":this.iconSet=s;break;case"max-depth":this.maxDepth="string"==typeof s?parseInt(s):s;break;case"filter":this.setFilter(s)}this.init()}connectedCallback(){this.init()}disconnectedCallback(){this.base.removeEvents(this)}init(){this.createHtml(),this.base.render(this)}}customElements.define("flk-table",e),customElements.define("flk-draggable",t),customElements.define("flk-modal",s),customElements.define("flk-dropdown",n),customElements.define("flk-tree-nav",o)}(); \ No newline at end of file +!function(){"use strict";function i(e,t){if(!t||0===t.length)return e;const s=Object.assign([],e);if(Array.isArray(s[0])){e=s;var n=t;const r=[];for(const i of e)r.push(i.sort(E(n)));r}else s.sort(E(t));return s}function v(e){let t=e.toString();e=t.match(/^\d+|\d+$/);return e?parseInt(e[0]):null}function b(e){return"boolean"==typeof e||"string"==typeof e&&("true"===(e=e.toLocaleLowerCase())||"false"===e)}function w(e){return"boolean"==typeof e?e:"true"===e.toLocaleLowerCase()}function E(f,y=0){return function(e,t){var{propertyName:s,direction:d}=f[y];let n=null===e[s]||void 0===e[s]?"":e[s],r=null===t[s]||void 0===t[s]?"":t[s];const h=/^(\d{1,4}-\d{1,4}-\d{1,4}(T)?)/gim;var s=n instanceof Date&&r instanceof Date||h.test(n)&&h.test(r),p=(s&&(n=n instanceof Date?n.valueOf():new Date(Date.parse(n)),r=r instanceof Date?r.valueOf():new Date(Date.parse(r))),b(n)&&b(r)),u=!p&&!isNaN(n)&&!isNaN(r),i=v(n),o=v(r);u?(n=parseFloat(n).toPrecision(12),r=parseFloat(r).toPrecision(12)):null!==i&&null!==o&&(n=parseFloat(i).toPrecision(12),r=parseFloat(o).toPrecision(12)),p&&(n=w(n),r=w(r));let a,l;switch(d){case"descending":case"desc":a=r,l=n;break;default:a=n,l=r}let c=0;if(p||s||u)c=a-l;else{a=a.toString().trim().toLowerCase(),l=l.toString().trim().toLowerCase();const m=/\d/gim;i=m.test(n)&&m.test(r);c=i?a.localeCompare(l,void 0,{numeric:!0,sensitivity:"base"}):a.localeCompare(l)}o=y+1;if(0===c&&o(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)),s=t.split("-")[0];return window.$flightkitUUIDStore||(window.$flightkitUUIDStore=[]),window.$flightkitUUIDStore.some(e=>e===s)?e():(window.$flightkitUUIDStore.push(s),s)}()}render(t){if(!t.component)throw new Error("Component is not assigned! Can't render");t.id=t.id||this.generateId();var e=this._getAllEventAttributes(t);if(e){var s="#"+t.id;for(const i of e){var n="e-"+i;this.addEvent(s,i,t.getAttribute(n))}}var r=Object.keys(t.classList).length;if(r){for(let e=0;e{this._assignToDom(t,t.component),clearTimeout(this._renderTimer)},10)}addEvent(e,t,s){this._events.push({selector:e,eventType:t,callback:s})}_getExternalCallback(e){let t=void 0;for(const s of e.split("."))t=(t||window)[s];return t}_getAllEventAttributes(e){e=e.attributes;const t=Array.from(e).filter(e=>e.name.startsWith("e-"));return t.map(e=>e.name.slice(2))}_isFlightkitElement(e){return e.toUpperCase().includes("FLK-")}_outerEventHandler(e){const t=h(e),s=(t.contents=e.detail,t.target.getAttribute("e-"+t.type));let n=void 0;for(const r of s.split("."))n=(n||window)[r];return e.preventDefault(),e.stopPropagation(),n(t)}_addEvents(e){if(e.isConnected)for(const s of this._events)if(s.selector.startsWith("."))for(const n of document.querySelectorAll(s.selector))this._addEventToElement(s,n);else{var t=document.querySelector(s.selector);this._addEventToElement(s,t)}}_addEventToElement(e,t){t&&("function"==typeof e.callback?(t.removeEventListener(e.eventType,e.callback),t.addEventListener(e.eventType,e.callback)):(t.removeEventListener(e.eventType,this._outerEventHandler),t.addEventListener(e.eventType,this._outerEventHandler)))}removeEvents(){for(const t of this._events)if(t.selector.startsWith("."))for(const s of document.querySelectorAll(t.selector))this._addEventToElement(t,s);else{var e=document.querySelector(t.selector);this._addEventToElement(t,e)}this._events=[]}_removeEventToElement(e,t){t&&("function"==typeof e.callback?t.removeEventListener(e.eventType,e.callback):t.removeEventListener(e.eventType,this._outerEventHandler))}_assignToDom(e,t){e.innerHTML="";for(const n of Array.isArray(t)?t:[t])e.append(n);const s=setTimeout(()=>{this._addEvents(e),clearTimeout(s)},10)}}const u='',m='';function l(e){const t=new DOMParser;return t.parseFromString(e,"image/svg+xml").documentElement}class e extends HTMLElement{base;component=null;_contents=[];_orderBy=[];properties=new Set;_columnOrder=[];_filter="";_selectionProperty="";_selectedIds=new Set;uniqueEntriesByProperties={};propertyLabelDictionary={};_templates={};_templateClasses={};static get observedAttributes(){return["contents","columns","order","filter","selection-property","templates"]}get columnOrder(){return this._columnOrder.length?this._columnOrder:this.properties}set columnOrder(e){let t;"string"==typeof e&&(t=e.split(",")),t=e,this._columnOrder=t}get contents(){return this._contents}set contents(e){this.analyzeData(e),this._contents=e}get orderBy(){return this._orderBy}set orderBy(e){if(Array.isArray(e))this._orderBy=e;else{const n=[];for(const r of e.split(",")){var t=r.split("|"),s=t[0],t=1e[s._selectionProperty])):new Set;e=t?s.contents.execute():[];s._emit("select",s,{selection:e}),s._updateCheckboxes(s)}emitSelect(e){var t=e.target.checked,s=e.target.dataset.objectId;const n=h(e).target,r=(t?n._selectedIds.add(s):n._selectedIds.delete(s),n._selectionProperty);e=n.contents.execute().filter(e=>n._selectedIds.has(e[r]));n._emit("select",n,{selection:e}),n._updateCheckboxes(n)}sortData(e){const t=h(e).target,s=p(e,"column");s&&(-1<(e=t._orderBy.findIndex(e=>e.propertyName===s))?"asc"===t._orderBy[e].direction?t._orderBy[e].direction="desc":t._orderBy.splice(e,1):t._orderBy.push({propertyName:s,direction:"asc"}),t.createHtml(),t.base.render(t))}setColumnOrder(e){this._columnOrder=e?Array.isArray(e)?e:e.split(","):[]}analyzeData(t){this.properties=new Set;var s=t.length;for(let e=0;e"_"===e?" ":" "+e.toLowerCase()).trim();var s=t.charAt(0).toUpperCase()+t.slice(1);return this.propertyLabelDictionary[e]=s}parseTemplate(e,n){return e.replace(/\{\{([\s\S]+?)\}\}/gim,(e,t)=>{let s="";t=t.trim();t=n[t];return t&&(s=t),Array.isArray(s)?s.join(", "):s.toString().trim()})}createSelectionCheckbox(e){const t=document.createElement("input");return t.setAttribute("type","checkbox"),t.classList.add("flk-selection-checkbox"),e&&(t.dataset.selected=e[this._selectionProperty]),t}createRow(e){const t=document.createElement("tr");if(this._selectionProperty.length){const r=document.createElement("td");var s=this.base.generateId();const i=this.createSelectionCheckbox(e);i.id=s,i.dataset.objectId=e[this._selectionProperty];var n=e[this._selectionProperty];this._selectedIds.has(n)?i.checked=!0:i.checked=!1,this.base.addEvent("#"+s,"change",this.emitSelect),r.append(i),t.append(r)}for(const o of this.columnOrder){const a=document.createElement("td");this._templates[o]?(a.innerHTML=this.parseTemplate(this._templates[o],e),this._templateClasses[o]&&a.classList.add(...this._templateClasses[o])):a.innerText=e[o],t.append(a)}return t}createBody(e){const t=document.createElement("tbody");for(const n of e){var s=this.createRow(n,null);t.append(s)}return t}createHead(){const e=document.createElement("thead"),t=document.createElement("tr");if(t.classList.add("cursor-pointer"),this._selectionProperty.length){const r=document.createElement("th");var s=this.base.generateId();const i=this.createSelectionCheckbox();i.id=s;var d=this.contents.execute().length;0e.propertyName===o);const c=document.createElement("span");n?c.innerHTML="asc"===n.direction?'':'':(c.style.display="inline-block",c.style.width="24px"),a.append(c),t.append(a)}return e.append(t),e}addEvent(e,t,s){this.base.addEvent(e,t,s)}init(){this.createHtml(),this.base.render(this)}}class t extends HTMLElement{base;componentId;constructor(){super(),this.base=new r}connectedCallback(){var e=this.getAttribute("top"),t=this.getAttribute("left"),s=this.getAttribute("center"),n=this.getAttribute("zIndex");this.id||(this.id=this.base.generateId()),this.style.display="block",this.style.position="fixed","string"==typeof s?(this.style.top=e||"50%",this.style.left="50%",this.style.transform="translate(-50%, -50%)"):(this.style.top=e||this.clientTop+"px",this.style.left=t||this.clientLeft+"px"),n&&(this.style.zIndex=n),this.componentId=this.getAttribute("handle");const r=document.createElement("div");r.innerHTML=this.innerHTML,this.component=r;s="#"+(this.componentId||this.id);this.base.addEvent(s,"mousedown",this._dragElement),this.base.addEvent(s,"mouseup",this._reset),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this)}_dragElement(e){const s=h(e,"flk-draggable").target;let n,r;function t(e){n=e.clientX-s.offsetLeft,r=e.clientY-s.offsetTop}function i(e){var t=e.clientX-n,e=e.clientY-r;s.style.left=t+"px",s.style.top=e+"px"}function o(e){e.preventDefault()}function a(){s.removeAttribute("draggable"),s.removeEventListener("dragstart",t),s.removeEventListener("dragend",a),document.removeEventListener("dragover",o),document.removeEventListener("drop",i)}s.setAttribute("draggable",!0),s.addEventListener("dragstart",t),s.addEventListener("dragend",a),document.addEventListener("dragover",o),document.addEventListener("drop",i)}}class s extends HTMLElement{_id;base;_draggableId;constructor(){super(),this.base=new r}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}_closeModal(e){e.stopPropagation();const t=h(e,"flk-modal").target;t.classList.add("hidden")}closeModal(e){this.classList.add("hidden")}openModal(e=!0){const t=document.getElementById(this._draggableId);e&&(t.style.top="40%",t.style.left="50%"),this.classList.remove("hidden")}connectedCallback(){this.id||(this.id=this.base.generateId());const e=document.createElement("div");var t=this.base.generateId();const s=document.createElement("flk-draggable"),n=(this._draggableId=this.base.generateId(),s.id=this._draggableId,s.setAttribute("center",""),s.setAttribute("top","40%"),s.setAttribute("handle",t),s.setAttribute("zIndex","1080"),s.classList.add("border","shadow-lg","bg-white"),s.style.width="max-content",document.createElement("div"));var r=this.getAttribute("modal-title");if(r){const c=document.createElement("span");c.innerText=r,c.classList.add("ml-1","mr-auto"),n.append(c)}n.id=t;const i=this.getAttribute("header-class");let o=[];i?o=o.concat(i.split(" ")):o.push("bg-gray-light"),n.classList.add(...o,"border-bottom","row","justify-end","cursor-no-select");r=this.base.generateId();const a=document.createElement("button"),l=(a.classList.add("py-0","px-1","outline-hover","no-border","cursor-default",...o),a.innerText="X",a.id=r,n.append(a),s.append(n),document.createElement("div"));l.innerHTML=this.innerHTML,s.append(l),e.append(s),this.component=e,this.base.addEvent("#"+r,"click",this._closeModal),this.base.render(this),this.classList.add("hidden")}disconnectedCallback(){this.base.removeEvents(this)}}class n extends HTMLElement{base;_buttonId;_drawerId;_iconId;constructor(){super(),this.base=new r}connectedCallback(){this.style.position="relative",this.style.display="flex",this.style.width="fit-content",this._buttonId=this.base.generateId();const e=document.createElement("button"),t=(e.setAttribute("type","button"),e.classList.add("row"),e.id=this._buttonId,document.createElement("span")),s=(t.classList.add("self-align-center"),t.innerText=this.getAttribute("text"),this._iconId=this.base.generateId(),document.createElement("span"));s.classList.add("self-align-center");var n=l('');const r=l(''),i=(r.classList.add("hidden"),s.append(n,r),s.id=this._iconId,e.append(t,s),this._drawerId=this.base.generateId(),document.createElement("div"));i.id=this._drawerId,i.classList.add("shadow","inline-block","bg-white"),i.style.position="absolute",i.style.zIndex="1040";n=this.querySelector("template");n.innerHTML.length?i.innerHTML=n.innerHTML:i.append(n.firstChild),i.style.display="none",this.component=[e,i],this.base.addEvent("#"+this._buttonId,"click",this.toggleMenu);const o=document.querySelector("body");""!==o.getAttribute("flk-close-dropdown")&&(o.setAttribute("flk-close-dropdown",""),o.addEventListener("click",this.closeAllDropdownButtons)),this.base.render(this)}disconnectedCallback(){this.base.removeEvents(this);var e=document.querySelectorAll("flk-dropdown");if(!e||!e.length){const t=document.querySelector("body");t.removeAttribute("flk-close-dropdown"),t.removeEventListener("click",this.closeAllDropdownButtons)}}toggleMenu(e){const t=h(e).target;e=t._drawerId;const s=document.getElementById(e);var e="none"!==s.style.display,n=(s.style.display=e?"none":"block",t.getAttribute("drawer-width")),n=("string"==typeof t.getAttribute("right")&&(s.style.right="0px"),s.style.top=t.offsetHeight+"px",s.style.width=n||t.offsetWidth+"px",t._iconId);const r=document.getElementById(n);e?(r.childNodes[0].classList.remove("hidden"),r.childNodes[1].classList.add("hidden")):(r.childNodes[0].classList.add("hidden"),r.childNodes[1].classList.remove("hidden"))}_closeDropdown(){var e=this._drawerId;const t=document.getElementById(e);if("none"!==t.style.display){e=this._iconId;const s=document.getElementById(e);t.style.display="none",s.childNodes[0].classList.remove("hidden"),s.childNodes[1].classList.add("hidden")}}closeAllDropdownButtons(e){var t,s=h(e,"flk-dropdown").target,e=document.querySelectorAll("flk-dropdown");if(s)for(const n of e)s._buttonId!==n._buttonId&&(t=n._drawerId,"none"!==document.getElementById(t).style.display&&n._closeDropdown());else for(const r of e)r._closeDropdown()}}class o extends HTMLElement{base;contents;component;listType="ul";iconSet;filter={value:"",caseSensitive:!1};selectedElements=[];static get observedAttributes(){return["contents","icon-set","max-depth","filter"]}_jsonToValueArray(e){let t=JSON.stringify(e);t=t.replace(/[\[\]{}\"]/g,"");let s=[];for(const n of t.split(","))s=s.concat(n.split(":"));return[...new Set(s)]}_emit(e,t,s){e=new CustomEvent(e,{detail:s,bubbles:!0,cancelable:!0});t.dispatchEvent(e)}constructor(){super(),this.base=new r,this.setContents(this.getAttribute("contents")),this.iconSet=this.getAttribute("icon-set")?this.getAttribute("icon-type"):"file",this.maxDepth=this.getAttribute("max-depth")?parseInt(this.getAttribute("max-depth")):-1,this.setFilter(this.getAttribute("filter")),this.style.display="block",this.style.maxWidth="fit-content",this.style.margin="0 1rem 0 0",this.base.addEvent(".flk-branch","click",this.emitNodeToggle)}deselectTree(){if(this.selectedElements.length)for(const e of this.selectedElements)e.classList.remove("font-weight-bold"),delete e.dataset.selected}emitNodeToggle(e){if(e.stopPropagation(),["LI","UL"].includes(e.target.tagName))return!1;const t=h(e,"flk-tree-nav").target,s=p(e,"branchKey");let n=t.contents;const r=s.split(".");for(const a of r)if(n[a])n=n[a];else if(null===n[a])n=null;else{let e=[];for(const l of n)l[a]&&e.push(l[a]);n=e}let i,o=e.target;for(;o.dataset&&o.dataset.leafKey?i=o.dataset.leafKey:o=o.parentNode||o.parentElement,!i;);t.selectedElements.length&&t.deselectTree(),t.selectedElements=[],"DETAILS"===o.tagName?(t.selectedElements.push(o.childNodes[0]),o.childNodes.length&&o.childNodes[0].childNodes.length&&"DIV"===o.childNodes[0].childNodes[0].tagName&&(console.log(o.childNodes[0].childNodes),t.selectedElements=o.childNodes[0].childNodes[0].childNodes)):t.selectedElements.push(o);for(const c of t.selectedElements)c.dataset.selected||(c.classList.add("font-weight-bold"),c.dataset.selected=!0);var e=s.substring(s.indexOf(".")+1),d=t.createLeafText(r.reverse()[0]);t._emit("tree-click",t,{path:e,data:n,key:i,label:(d.titleText+" "+d.commentText).trim(),branch:"object"==typeof n})}convertJsonKeyToTitle(e){if(!e)return"";const t=(e="string"!=typeof e?e.toString():e).replace(/([A-Z_])/g,e=>"_"===e?" ":" "+e).trim();return t.charAt(0).toUpperCase()+t.slice(1)}setContents(e){var t=e||this.contents||[];try{switch(typeof t){case"string":this.contents=JSON.parse(t);break;case"object":Array.isArray(t)?this.contents=t:this.contents=[t]}}catch(e){console.log(e)}}applyFilter(e){let t;var s="details"===e.tagName.toLowerCase();t=this.filter.caseSensitive?e.dataset.branchValues.includes(this.filter.value):e.dataset.branchValues.toLowerCase().includes(this.filter.value.toLowerCase()),t?e.parentElement.classList.remove("hidden"):e.parentElement.classList.add("hidden"),s&&t?e.setAttribute("open",""):e.removeAttribute("open")}resetTree(e){e.parentElement.classList.remove("hidden"),e.removeAttribute("open")}filterTree(){let t=setTimeout(()=>{for(const e of this.querySelectorAll("[data-branch-values]"))void 0===this.filter.value||0===this.filter.value.length?this.resetTree(e):this.applyFilter(e);clearTimeout(t)},10)}setFilter(e){const t=e||{};try{switch(typeof t){case"string":t.includes("{")?(this.filter=JSON.parse(t),!1===this.filter.caseSensitive&&(this.filter.value=this.filter.value.toLowerCase())):this.filter.value=e.toLowerCase();break;case"object":this.filter=t}}catch(e){console.log(e)}this.filterTree()}createLeafText(e){var t,s;let n="",r="";return"string"==typeof e&&(e.includes("(")||e.includes("["))?(s=e.indexOf("("),s=-1===(t=e.indexOf("["))?s:t,n=this.convertJsonKeyToTitle(e.substring(0,s)),r=e.substring(s)):n=this.convertJsonKeyToTitle(e),{titleText:n,commentText:r}}createTextTag(n,r){n=this.createLeafText(n);if(n.commentText){let e=document.createElement("div"),t=document.createElement("span"),s=(t.innerText=n.titleText,document.createElement("small"));s.innerText=n.commentText,s.style.marginLeft="1rem",e.append(t,s),e.style.display="inline-flex",e.style.alignItems="center",r.append(e)}else r.innerText=n.titleText}createLeaf(e,t,s,n=[]){let r=document.createElement("li");r.classList.add("cursor-no-select"),r.style.marginTop="0.4rem",r.dataset.branchKey=s;const i="file"===this.iconSet?'':'';r.style.listStyleImage=`url('data:image/svg+xml,${i}')`,r.style.position="relative",r.style.left="2px";let o=document.createElement("span");s=[e].concat(n);if(o.dataset.branchValues=[...new Set(s)].join(),o.dataset.leafKey=s[0],this.createTextTag(e,o),o.style.position="relative",o.style.top="-3px",r.append(o),t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);const i="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${i}')`,e.append(r),t.append(e)}else t.append(r)}createBranch(s,t,n,r){if(r===this.maxDepth&&"object"==typeof s)for(const o of Array.isArray(s)?s:Object.keys(s)){let e;s[o]&&(e=this._jsonToValueArray(s[o])),this.createLeaf(o,t,n+"."+o,e)}else if(Array.isArray(s))for(var e in s){var d=document.createElement(this.listType);t.append(this.createBranch(s[e],d,n+"."+e,r+1))}else if(null!==s&&"object"==typeof s){const a=[];for(const l of Object.keys(s)){let e=document.createElement("li"),t=(e.classList.add("cursor-no-select"),e.style.position="relative",e.style.left="2px",e.dataset.branchKey=n+"."+l,document.createElement("details"));t.classList.add("flk-branch"),t.dataset.branchValues=[l].concat(this._jsonToValueArray(s[l])),t.style.position="relative",t.style.top="-3px",t.classList.add("cursor-default");var i=document.createElement("summary");this.createTextTag(l,i),t.dataset.leafKey=l,t.append(i),e.append(this.createBranch(s[l],t,n+"."+l,r+1)),a.push(e)}if(t.tagName.toLowerCase()!==this.listType){let e=document.createElement(this.listType);var h="file"===this.iconSet?u:m;e.style.listStyleImage=`url('data:image/svg+xml,${h}')`;for(const c of a)e.append(c);t.append(e)}else for(const p of a)t.append(p)}else this.createLeaf(s,t,n);return t}createHtml(){let e=document.createElement(this.listType);var t="file"===this.iconSet?u:'';if(e.style.listStyleImage=`url('data:image/svg+xml,${t}')`,e.style.marginLeft="3rem",this.contents.length){for(const s in this.contents)e=this.createBranch(this.contents[s],e,s,0);this.component=e}else this.component=e}attributeChangedCallback(e,t,s){switch(e){case"contents":this.setContents(s);break;case"icon-set":this.iconSet=s;break;case"max-depth":this.maxDepth="string"==typeof s?parseInt(s):s;break;case"filter":this.setFilter(s)}this.init()}connectedCallback(){this.init()}disconnectedCallback(){this.base.removeEvents(this)}init(){this.createHtml(),this.base.render(this)}}customElements.define("flk-table",e),customElements.define("flk-draggable",t),customElements.define("flk-modal",s),customElements.define("flk-dropdown",n),customElements.define("flk-tree-nav",o)}(); \ No newline at end of file diff --git a/flightkit/components/table.js b/flightkit/components/table.js index 86cb029..b3d059f 100644 --- a/flightkit/components/table.js +++ b/flightkit/components/table.js @@ -525,11 +525,17 @@ export class FlightkitTable extends HTMLElement { this.base.addEvent(`#${thId}`, 'click', this.sortData); const orderProperties = this.orderBy.find(obp => obp.propertyName === header); + const iconElement = document.createElement('span'); if (orderProperties) { - const iconElement = document.createElement('span'); iconElement.innerHTML = orderProperties.direction === 'asc' ? sortAscendingIcon : sortDescendingIcon; - thCell.append(iconElement); } + else { + iconElement.style.display = 'inline-block'; + iconElement.style.width = "24px"; + } + + thCell.append(iconElement); + headerRow.append(thCell); } tableHead.append(headerRow); diff --git a/package.json b/package.json index c84dc0e..5b48350 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "@pennions/ibiss", - "version": "0.0.8", + "version": "0.0.9", "avian_version": "0.0.2", - "flightkit_version": "0.0.8", + "flightkit_version": "0.0.9", "htmx_plugin_version": "0.0.1", "rocketjs_version": "0.0.1", "description": "Frontend library of Pennions",