@streamline-pulse/formkrafter-wc 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/fk-brick-actions_18.cjs.entry.js +41 -40
  3. package/dist/cjs/formkrafter-wc.cjs.js +2 -2
  4. package/dist/cjs/{index-By4GGW_q.js → index-Can2MpG5.js} +215 -23
  5. package/dist/cjs/{index-D_7eGIJ0.js → index-CbyFxLc_.js} +26 -2
  6. package/dist/cjs/index.cjs.js +3 -2
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/collection/components/fk-brick-render/fk-brick-render.js +31 -3
  9. package/dist/collection/components/fk-file-input/fk-file-input.css +26 -5
  10. package/dist/collection/components/fk-file-input/fk-file-input.js +45 -6
  11. package/dist/collection/components/fk-form-builder/fk-form-builder.css +30 -0
  12. package/dist/collection/components/fk-form-render/fk-form-render.js +1 -1
  13. package/dist/collection/i18n/i18n.js +12 -0
  14. package/dist/collection/index.js +1 -1
  15. package/dist/collection/registry/default-bricks.js +161 -23
  16. package/dist/components/fk-brick-actions.js +1 -1
  17. package/dist/components/fk-brick-list.js +1 -1
  18. package/dist/components/fk-brick-mold-item.js +1 -1
  19. package/dist/components/fk-brick-not-found.js +1 -1
  20. package/dist/components/fk-brick-render.js +1 -1
  21. package/dist/components/fk-code-editor.js +1 -1
  22. package/dist/components/fk-data-grid.js +1 -1
  23. package/dist/components/fk-drop-area.js +1 -1
  24. package/dist/components/fk-empty-form.js +1 -1
  25. package/dist/components/fk-file-input.js +1 -1
  26. package/dist/components/fk-form-builder.js +1 -1
  27. package/dist/components/fk-form-render.js +1 -1
  28. package/dist/components/fk-property-panel.js +1 -1
  29. package/dist/components/fk-rules-editor.js +1 -1
  30. package/dist/components/fk-select-input.js +1 -1
  31. package/dist/components/fk-signature-input.js +1 -1
  32. package/dist/components/fk-stepper.js +1 -1
  33. package/dist/components/fk-tabs.js +1 -1
  34. package/dist/components/index.js +1 -1
  35. package/dist/components/{p-B4vAN-UA.js → p-B0YjIsVn.js} +1 -1
  36. package/dist/components/{p-BIEpAM4V.js → p-B1t0M_hN.js} +1 -1
  37. package/dist/components/p-B21cOFRx.js +1 -0
  38. package/dist/components/{p-DWgjI3TW.js → p-B7ED8qMb.js} +1 -1
  39. package/dist/components/{p-ZEW2q-4b.js → p-BDvqHJih.js} +1 -1
  40. package/dist/components/{p-BXFug2Ql.js → p-BSPTuA1p.js} +1 -1
  41. package/dist/components/{p-BNREw7TY.js → p-BVBfbMl_.js} +1 -1
  42. package/dist/components/p-BrOXMyOG.js +1 -0
  43. package/dist/components/{p-DtzMNM4i.js → p-C85zhhpr.js} +1 -1
  44. package/dist/components/p-CMQ_4Zfv.js +1 -0
  45. package/dist/components/p-CWQX0sXS.js +1 -0
  46. package/dist/components/{p-DJDrDvoC.js → p-CXEvsomA.js} +1 -1
  47. package/dist/components/{p-BCQ-hj6j.js → p-Cq9HSEn8.js} +1 -1
  48. package/dist/components/{p-BQP1WryV.js → p-D7bf2ztq.js} +1 -1
  49. package/dist/components/{p-DKGyje7v.js → p-DIPoAaGe.js} +1 -1
  50. package/dist/components/p-DYBirEew.js +1 -0
  51. package/dist/components/p-DluDp8V5.js +1 -0
  52. package/dist/components/{p-BLKRn62s.js → p-Do6-yRva.js} +1 -1
  53. package/dist/components/{p-D318uFl-.js → p-GjmAhT2E.js} +1 -1
  54. package/dist/components/{p-dX7Lo8Fe.js → p-LXnm2ogM.js} +1 -1
  55. package/dist/components/{p-Ctt--jpe.js → p-y0xDvzJR.js} +1 -1
  56. package/dist/esm/fk-brick-actions_18.entry.js +37 -36
  57. package/dist/esm/formkrafter-wc.js +3 -3
  58. package/dist/esm/{index-BTmZ8XET.js → index-BB2OOj__.js} +214 -24
  59. package/dist/esm/{index-BQqrzKxo.js → index-DMDO6w5-.js} +26 -2
  60. package/dist/esm/index.js +2 -2
  61. package/dist/esm/loader.js +3 -3
  62. package/dist/formkrafter-wc/formkrafter-wc.css +1 -1
  63. package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
  64. package/dist/formkrafter-wc/index.esm.js +1 -1
  65. package/dist/formkrafter-wc/p-0de7cbe1.entry.js +1 -0
  66. package/dist/formkrafter-wc/{p-BXIsVlA6.js → p-Bp_A8oL5.js} +4 -4
  67. package/dist/formkrafter-wc/p-DMDO6w5-.js +2 -0
  68. package/dist/types/components/fk-brick-render/fk-brick-render.d.ts +1 -0
  69. package/dist/types/components/fk-file-input/fk-file-input.d.ts +3 -0
  70. package/dist/types/components.d.ts +5 -0
  71. package/dist/types/home/runner/work/formkrafter/formkrafter/packages/wc/.stencil/stencil.config.d.ts +2 -0
  72. package/dist/types/index.d.ts +1 -1
  73. package/dist/types/registry/default-bricks.d.ts +73 -54
  74. package/package.json +11 -2
  75. package/dist/components/p-BB3BQPr8.js +0 -1
  76. package/dist/components/p-BOvjVIvo.js +0 -1
  77. package/dist/components/p-DKoJovNt.js +0 -1
  78. package/dist/components/p-QC41Uj05.js +0 -1
  79. package/dist/components/p-TvmRksgg.js +0 -1
  80. package/dist/formkrafter-wc/p-BQqrzKxo.js +0 -2
  81. package/dist/formkrafter-wc/p-f6bc0be0.entry.js +0 -1
  82. package/dist/types/Users/datagnikan/Desktop/WorkSpace/streamline-pulse/formkrafter-js/formkrafter/packages/wc/.stencil/stencil.config.d.ts +0 -2
@@ -1 +0,0 @@
1
- import{t as o,p as c,H as d,h as r,a as e}from"./p-QC41Uj05.js";const n=c(class extends d{constructor(o){super(),!1!==o&&this.__registerHost()}render(){return r(e,{key:"558231ac77ac07f7b40bd08081a498dc5623442c"},r("p",{key:"f1ca1f59750c6ed2b1a3c2e22bd6f7f1dc721496",class:"fk-not-found"},"Brick ",r("slot",{key:"0003d9dcc23c52cb8d466d794eafd4dd6be4b708"})," not found"))}static get style(){return".fk-not-found.sc-fk-brick-not-found{margin:0;padding:calc(var(--fk-spacing) * 1.5);border:1px dashed var(--fk-color-danger);border-radius:var(--fk-radius);color:var(--fk-color-danger);font-size:0.875rem}"}},[262,"fk-brick-not-found"]);function t(){"undefined"!=typeof customElements&&["fk-brick-not-found"].forEach((c=>{"fk-brick-not-found"===c&&(customElements.get(o(c))||customElements.define(o(c),n))}))}t();export{n as F,t as d}
@@ -1 +0,0 @@
1
- import{t as e,p as i,H as s,c as t,h as r}from"./p-QC41Uj05.js";import{s as o}from"./p-dX7Lo8Fe.js";import{a}from"./p-BQP1WryV.js";const f=i(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.fileValueChange=t(this,"fileValueChange"),this.disabled=!1,this.uploading=!1,this.handleFile=async e=>{var i;const s=e.target,t=null===(i=s.files)||void 0===i?void 0:i[0];if(t){this.uploading=!0,this.uploadError=void 0;try{const e=await o.fileUploadService.upload(t);this.fileValueChange.emit(e)}catch(e){this.uploadError=e instanceof Error?e.message:String(e)}finally{this.uploading=!1,s.value=""}}}}formatSize(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}render(){return r("div",{key:"69749ee4f48878949fbda5a89478c14559bfba57",class:"fk-file"},this.value?r("div",{class:"fk-file__selected"},r("span",{class:"fk-file__name",title:this.value.name},this.value.name),r("span",{class:"fk-file__size"},this.formatSize(this.value.size)),r("button",{type:"button",class:"fk-file__remove",title:a("file.remove"),disabled:this.disabled,onClick:e=>{e.preventDefault(),this.fileValueChange.emit(void 0)}},"✕")):r("button",{type:"button",class:"fk-file__choose",disabled:this.disabled||this.uploading,onClick:e=>{var i;e.preventDefault(),null===(i=this.inputEl)||void 0===i||i.click()}},a(this.uploading?"file.uploading":"file.choose")),r("input",{key:"fa8e03377d64380d98a1b9f571fd6dfa6a6aa58f",class:"fk-file__native",type:"file",accept:this.accept,disabled:this.disabled,ref:e=>this.inputEl=e,onChange:this.handleFile}),this.uploadError?r("span",{class:"fk-field__error"},this.uploadError):null)}static get style(){return".sc-fk-file-input-h{display:block}.fk-file.sc-fk-file-input{display:flex;flex-direction:column;gap:calc(var(--fk-spacing) / 2);align-items:flex-start}.fk-file__native.sc-fk-file-input{display:none}.fk-file__choose.sc-fk-file-input{font:inherit;font-size:0.85rem;padding:calc(var(--fk-spacing) / 1.5) var(--fk-spacing);border:1px dashed var(--fk-color-border);border-radius:var(--fk-radius);background:transparent;color:var(--fk-color-muted);cursor:pointer}.fk-file__choose.sc-fk-file-input:hover:not(:disabled){border-color:var(--fk-color-primary);color:var(--fk-color-primary)}.fk-file__choose.sc-fk-file-input:disabled{opacity:0.55;cursor:not-allowed}.fk-file__selected.sc-fk-file-input{display:flex;align-items:center;gap:calc(var(--fk-spacing) / 2);max-width:100%;padding:calc(var(--fk-spacing) / 2) var(--fk-spacing);border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface)}.fk-file__name.sc-fk-file-input{font-size:0.85rem;font-weight:600;color:var(--fk-color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fk-file__size.sc-fk-file-input{font-size:0.72rem;color:var(--fk-color-muted);white-space:nowrap}.fk-file__remove.sc-fk-file-input{border:none;background:transparent;color:var(--fk-color-muted);font-size:0.75rem;cursor:pointer;padding:2px 4px}.fk-file__remove.sc-fk-file-input:hover:not(:disabled){color:var(--fk-color-danger)}"}},[2,"fk-file-input",{value:[16],disabled:[4],accept:[1],uploading:[32],uploadError:[32]}]);function l(){"undefined"!=typeof customElements&&["fk-file-input"].forEach((i=>{"fk-file-input"===i&&(customElements.get(e(i))||customElements.define(e(i),f))}))}l();export{f as F,l as d}
@@ -1 +0,0 @@
1
- import{t,p as i,H as s,c as e,h as r}from"./p-QC41Uj05.js";import{g as n,r as a}from"./p-dX7Lo8Fe.js";import{b as o}from"./p-gPc0o8Jb.js";import{d as l}from"./p-BNREw7TY.js";import{d as c}from"./p-BB3BQPr8.js";import{d as h}from"./p-Ctt--jpe.js";function d(t,i){var s;if((null===(s=t.configs)||void 0===s?void 0:s.key)&&i)return t.unWrapData?i:i[t.configs.key]}const u=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.brickDataChange=e(this,"brickDataChange"),this.brickConfigsChange=e(this,"brickConfigsChange"),this.brickStylesChange=e(this,"brickStylesChange"),this.brickValidationsChange=e(this,"brickValidationsChange"),this.brickRulesChange=e(this,"brickRulesChange"),this.brickRemove=e(this,"brickRemove"),this.brickDuplicate=e(this,"brickDuplicate"),this.path="0",this.editable=!1,this.errors={}}render(){var t,i,s,e,l;const c=this.brickSpec;if(!c)return null;const h=o(c.type,c.id);if(!h)return r("fk-brick-not-found",null,`${c.type}:${c.id}`);const u=this.editable&&(null===(t=c.editable)||void 0===t||t),k=n(c.rules,this.dataMap);if(!u&&!0===k.hidden)return null;const f="panel"===c.type||"collection"===c.type,p=null===(i=c.configs)||void 0===i?void 0:i.uid,b=(null!==(s=c.children)&&void 0!==s?s:[]).map(((t,i)=>r("fk-brick-render",{brickSpec:t,data:this.data,dataMap:this.dataMap,errors:this.errors,locale:this.locale,path:`${this.path}.${i}`,editable:this.editable,selectedUid:this.selectedUid,utils:this.utils})));u&&f&&b.push(r("fk-drop-area",{path:this.path}));const m={brickSpec:c,configsForm:c.configsForm,configs:a(c.configs,this.locale),locale:this.locale,styles:null!==(e=c.styles)&&void 0!==e?e:{},data:d(c,this.data),dataMap:this.dataMap,error:(null===(l=c.configs)||void 0===l?void 0:l.key)?this.errors[c.configs.key]:void 0,disabled:!u&&!0===k.disabled,path:this.path,editable:u,children:b,validations:c.validations,rules:c.rules,utils:this.utils,onDataChange:t=>{const i=function(t,i){var s;if(null===(s=t.configs)||void 0===s?void 0:s.key)return t.unWrapData?i:{[t.configs.key]:i}}(c,t);void 0!==i&&this.brickDataChange.emit(i)},onConfigsChange:(t,i)=>this.brickConfigsChange.emit({configs:t,uid:null!=i?i:p}),onStylesChange:(t,i)=>this.brickStylesChange.emit({styles:t,uid:null!=i?i:p}),onValidationsChange:(t,i)=>this.brickValidationsChange.emit({validations:t,uid:null!=i?i:p}),onRulesChange:(t,i)=>this.brickRulesChange.emit({rules:t,uid:null!=i?i:p}),onDelete:t=>this.brickRemove.emit({path:t}),onDuplicate:t=>this.brickDuplicate.emit({path:t})},v=u?h.renderBuilder(m):h.render(m);return u&&"0"!==this.path?r("fk-brick-actions",{path:this.path,selected:void 0!==p&&p===this.selectedUid},v):v}},[0,"fk-brick-render",{brickSpec:[16],data:[16],dataMap:[16],path:[1],editable:[4],selectedUid:[1,"selected-uid"],errors:[16],locale:[1],utils:[16]}]);function k(){"undefined"!=typeof customElements&&["fk-brick-render","fk-brick-actions","fk-brick-not-found","fk-brick-render","fk-drop-area"].forEach((i=>{switch(i){case"fk-brick-render":customElements.get(t(i))||customElements.define(t(i),u);break;case"fk-brick-actions":customElements.get(t(i))||l();break;case"fk-brick-not-found":customElements.get(t(i))||c();break;case"fk-brick-render":customElements.get(t(i))||k();break;case"fk-drop-area":customElements.get(t(i))||h()}}))}k();export{u as F,k as d}
@@ -1 +0,0 @@
1
- function t(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var n=(n,e)=>{var o;Object.entries(null!=(o=e.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=n[o],s=t(Object.getPrototypeOf(n),o,!0)||Object.getOwnPropertyDescriptor(n,o);s&&Object.defineProperty(n,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),e.l.has(o)?n[o]=e.l.get(o):void 0!==l&&(n[o]=l)}}))},e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>n in t,l=(t,n)=>(0,console.error)(t,n),s=new Map,i="undefined"!=typeof window?window:{},r=i.HTMLElement||class{},c={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},f=(()=>{var t;let n=!1;try{null==(t=i.document)||t.addEventListener("e",null,Object.defineProperty({},"passive",{get(){n=!0}}))}catch(t){}return n})(),u=(()=>{try{return!!i.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!u&&(()=>!!i.document&&Object.getOwnPropertyDescriptor(i.document.adoptedStyleSheets,"length").writable)(),d=!1,p=[],h=[],v=(t,n)=>e=>{t.push(e),d||(d=!0,n&&4&c.i?y(b):c.raf(b))},m=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){l(t)}t.length=0},b=()=>{m(p),m(h),(d=p.length>0)&&c.raf(b)},y=t=>Promise.resolve(undefined).then(t),$=v(h,!0),g=t=>{const n=new URL(t,c.u);return n.origin!==i.location.origin?n.href:n.pathname},w=t=>c.u=t,j=t=>{const n=M(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&O(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!S(t,N(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&M(t,"childNodes").length&&j(t)}};function O(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||N(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...O(o.childNodes,n,e)]}return s}var S=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)N(l)!==n||!e&&l["s-sr"]||o.push(l);return o},k=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,N=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function M(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var E,_,A,C=new WeakMap,L=t=>"sc-"+t.p,R=t=>"object"==(t=typeof t)||"function"===t,T=(t,n,...e)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],f=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!R(o))&&(o=String(o)),i&&r?c[c.length-1].h+=o:c.push(i?F(null,o):o),r=i)};if(f(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}const u=F(t,null);return u.v=n,c.length>0&&(u.m=c),u.$=l,u.j=s,u},F=(t,n)=>({i:0,O:t,h:null!=n?n:null,S:null,m:null,v:null,$:null,j:null}),x={},D=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const o of n){if(e)break;for(const n of t[o])if("string"==typeof n){e=!0;break}}if(!e)return t;const o={};for(const e of n)o[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return o},H=(t,n)=>null==t||R(t)?t:4&n?"false"!==t&&(""===t||!!t):1&n?String(t):t,P=(t,n)=>{const e=t;return{emit:t=>W(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},W=(t,n,e)=>{const o=c.ce(n,e);return t.dispatchEvent(o),o},U=(t,n,l,s,r,f)=>{if(l===s)return;let u=o(t,n),a=n.toLowerCase();if("class"===n){const n=t.classList,e=V(l);let o=V(s);n.remove(...e.filter((t=>t&&!o.includes(t)))),n.add(...o.filter((t=>t&&!e.includes(t))))}else if("style"===n){for(const n in l)s&&null!=s[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in s)l&&s[n]===l[n]||(n.includes("-")?t.style.setProperty(n,s[n]):t.style[n]=s[n])}else if("key"===n);else if("ref"===n)s&&at(s,t);else if(t.__lookupSetter__(n)||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const o=n.slice(5);let l;{const n=e(t);if(n&&n.o&&n.o.t){const t=n.o.t[o];t&&t[1]&&(l=t[1])}}return l||(l=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=s}catch(t){}return}{const e=R(s);if((u||e&&null!==s)&&!r)try{if(t.tagName.includes("-"))t[n]!==s&&(t[n]=s);else{const e=null==s?"":s;"list"===n?u=!1:null!=l&&t[n]===e||("function"==typeof t.__lookupSetter__(n)?t[n]=e:t.setAttribute(n,e))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(n)||t.removeAttribute(n):(!u||4&f||r)&&!e&&1===t.nodeType&&t.setAttribute(n,s=!0===s?"":s)}}else if(n="-"===n[2]?n.slice(3):o(i,a)?a.slice(2):a[2]+n.slice(3),l||s){const e=n.endsWith(q);n=n.replace(z,""),l&&c.rel(t,n,l,e),s&&c.ael(t,n,s,e)}},B=/\s/,V=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(B):[]),q="Capture",z=new RegExp(q+"$"),Y=(t,n,e)=>{const o=11===n.S.nodeType&&n.S.host?n.S.host:n.S,l=t&&t.v||{},s=n.v||{};for(const t of I(Object.keys(l)))t in s||U(o,t,l[t],void 0,e,n.i);for(const t of I(Object.keys(s)))U(o,t,l[t],s[t],e,n.i)};function I(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Z=!1,G=!1,J=!1,K=!1,Q=[],X=[],tt=(t,n,e)=>{var o;const l=n.m[e];let s,r,c,f=0;if(Z||(J=!0,"slot"===l.O&&(l.i|=l.m?2:1)),null!=l.h)s=l.S=i.document.createTextNode(l.h);else if(1&l.i)s=l.S=i.document.createTextNode(""),Y(null,l,K);else{if(!i.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.S=i.document.createElement(!Z&&2&l.i?"slot-fb":l.O),Y(null,l,K),null!=(u=E)&&void 0!==u&&s["s-si"]!==E&&s.classList.add(s["s-si"]=E),l.m){const n="template"===l.O?s.content:s;for(f=0;f<l.m.length;++f)r=tt(t,l,f),r&&n.appendChild(r)}}var u;return s["s-hn"]=A,3&l.i&&(s["s-sr"]=!0,s["s-cr"]=_,s["s-sn"]=l.j||"",s["s-rf"]=null==(o=l.v)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===N(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(s),c=t&&t.m&&t.m[e],c&&c.O===l.O&&t.S&&nt(t.S),pt(_,s,n.S,null==t?void 0:t.S)),s},nt=t=>{c.i|=1;const n=t.closest(A.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(dt(n,t,null!=e?e:null),t["s-sh"]=void 0,J=!0)}c.i&=-2},et=(t,n)=>{c.i|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===A&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==A&&o["s-ol"]&&(dt(it(o).parentNode,o,it(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,J=!0),n&&et(o,n)}c.i&=-2},ot=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=tt(null,e,l),i&&(o[l].S=i,dt(r,i,it(n))))},lt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.S;ut(n),t&&(G=!0,t["s-ol"]?t["s-ol"].remove():et(t,!0),t.remove())}}},st=(t,n,e=!1)=>t.O===n.O&&("slot"===t.O?t.j===n.j:e?(e&&!t.$&&n.$&&(t.$=n.$),!0):t.$===n.$),it=t=>t&&t["s-ol"]||t,rt=(t,n,e=!1)=>{const o=n.S=t.S,l=t.m,s=n.m,i=n.h;let r;null==i?("slot"!==n.O||Z||t.j!==n.j&&(n.S["s-sn"]=n.j||"",nt(n.S.parentElement)),Y(t,n,K),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=n.length-1,d=n[0],p=n[a],h=o.length-1,v=o[0],m=o[h];const b="template"===e.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==v)v=o[++c];else if(null==m)m=o[--h];else if(st(d,v,l))rt(d,v,l),d=n[++r],v=o[++c];else if(st(p,m,l))rt(p,m,l),p=n[--a],m=o[--h];else if(st(d,m,l))"slot"!==d.O&&"slot"!==m.O||et(d.S.parentNode,!1),rt(d,m,l),dt(b,d.S,p.S.nextSibling),d=n[++r],m=o[--h];else if(st(p,v,l))"slot"!==d.O&&"slot"!==m.O||et(p.S.parentNode,!1),rt(p,v,l),dt(b,p.S,d.S),p=n[--a],v=o[++c];else{for(f=-1,u=r;u<=a;++u)if(n[u]&&null!==n[u].$&&n[u].$===v.$){f=u;break}f>=0?(i=n[f],i.O!==v.O?s=tt(n&&n[c],e,f):(rt(i,v,l),n[f]=void 0,s=i.S),v=o[++c]):(s=tt(n&&n[c],e,c),v=o[++c]),s&&dt(it(d.S).parentNode,s,it(d.S))}r>a?ot(t,null==o[h+1]?null:o[h+1].S,e,o,c,h):c>h&&lt(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.h&&(o.textContent=""),ot(o,null,n,s,0,s.length-1)):!e&&null!==l&&lt(l,0,l.length-1)):(r=o["s-cr"])?r.parentNode.textContent=i:t.h!==i&&(o.data=i)},ct=[],ft=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(k(n,l)){let e=ct.find((t=>t.k===n));G=!0,n["s-sn"]=n["s-sn"]||l,e?(e.k["s-sh"]=t["s-hn"],e.N=t):(n["s-sh"]=t["s-hn"],ct.push({N:t,k:n})),n["s-sr"]&&ct.map((t=>{k(t.k,n["s-sn"])&&(e=ct.find((t=>t.k===n)),e&&!t.N&&(t.N=e.N))}))}else ct.some((t=>t.k===n))||ct.push({k:n})}1===t.nodeType&&ft(t)}},ut=t=>{t.v&&t.v.ref&&Q.push((()=>t.v.ref(null))),t.m&&t.m.map(ut)},at=(t,n)=>{X.push((()=>t(n)))},dt=(t,n,e,o)=>{if("string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])pt(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=N(t)||"";return{slotNode:O(M(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&l.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)};function pt(t,n,e,o){var l,s;let i;if(t&&"string"==typeof n["s-sn"]&&n["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=n["s-si"]||t.parentNode["s-sc"])){const t=n["s-sn"],r=n["s-hn"];if(null==(l=e.classList)||l.add(i+"-s"),o&&(null==(s=o.classList)?void 0:s.contains(i+"-s"))){let n=(o.__childNodes||o.childNodes)[0],e=!1;for(;n;){if(n["s-sn"]!==t&&n["s-hn"]===r&&n["s-sr"]){e=!0;break}n=n.nextSibling}e||o.classList.remove(i+"-s")}}}var ht=(t,n,e=!1)=>{var o,l,s,r,f;const u=t.$hostElement$,a=t.o,d=t.M||F(null,null);var p;const h=(p=n)&&p.O===x?n:T(null,null,n);if(A=u.tagName,e&&h.v)for(const t of Object.keys(h.v))u.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(h.v[t]=u[t]);if(h.O=null,h.i|=4,t.M=h,h.S=d.S=u,E=u["s-sc"],Z=false,_=u["s-cr"],G=!1,rt(d,h,e),c.i|=1,J){ft(h.S);for(const t of ct){const n=t.k;if(!n["s-ol"]&&i.document){const t=i.document.createTextNode("");t["s-nr"]=n,dt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of ct){const n=t.k,c=t.N;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),c){const t=c.parentNode;let o=c.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(dt(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=i.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,dt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(r=n["s-ih"])&&r)}n&&"function"==typeof c["s-rf"]&&c["s-rf"](c)}else 1===n.nodeType&&(n.hidden=!0)}}if(G&&j(h.S),c.i&=-2,ct.length=0,!Z&&!(1&a.i)&&u["s-cr"]){const t=h.S.__childNodes||h.S.childNodes;for(const n of t)if(n["s-hn"]!==A&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(f=n.hidden)&&f),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=i.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],dt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}_=void 0,Q.forEach((t=>t())),Q.length=0,X.forEach((t=>t())),X.length=0},vt=(t,n)=>{if(n&&!t._&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t._=()=>{n["s-p"].splice(e-1,1),o()})))}},mt=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);vt(t,t.A);const e=()=>bt(t,n);if(!n)return $(e);queueMicrotask((()=>{e()}))},bt=(t,n)=>{const e=t.$hostElement$,o=e;if(!o)throw new Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=St(o,n?"componentWillLoad":"componentWillUpdate",void 0,e),l=yt(l,(()=>St(o,"componentWillRender",void 0,e))),yt(l,(()=>gt(t,o,n)))},yt=(t,n)=>$t(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),$t=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,gt=async(t,n,e)=>{var o;const l=t.$hostElement$,r=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.i,l=((t,n)=>{var e,o,l;const r=L(n),f=s.get(r);if(!i.document)return r;if(t=11===t.nodeType?t:i.document,f)if("string"==typeof f){let l,s=C.get(t=t.head||t);if(s||C.set(t,s=new Set),!s.has(r)){l=i.document.createElement("style"),l.textContent=f;const d=null!=(e=c.C)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=i.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=d&&l.setAttribute("nonce",d),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(u){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(f),a?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=f+n.textContent:t.prepend(l)}else t.append(l);1&n.i&&t.insertBefore(l,null),4&n.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(r)}}else{let n=C.get(t);if(n||C.set(t,n=new Set),!n.has(r)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(f.constructor===e.CSSStyleSheet)o=f;else{o=new e.CSSStyleSheet;for(let t=0;t<f.cssRules.length;t++)o.insertRule(f.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(r)}}return r})(e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);wt(t,n,l,e),r&&(r.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>jt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.i|=4,n.length=0)}},wt=(t,n,e,o)=>{try{n=n.render(),t.i&=-17,t.i|=2,ht(t,n,o)}catch(n){l(n,t.$hostElement$)}return null},jt=t=>{const n=t.$hostElement$,e=n,o=t.A;St(e,"componentDidRender",void 0,n),64&t.i?St(e,"componentDidUpdate",void 0,n):(t.i|=64,kt(n),St(e,"componentDidLoad",void 0,n),t.L(n),o||Ot()),t._&&(t._(),t._=void 0),512&t.i&&y((()=>mt(t,!1))),t.i&=-517},Ot=()=>{y((()=>W(i,"appload",{detail:{namespace:"formkrafter-wc"}})))},St=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){l(t,o)}},kt=t=>t.classList.add("hydrated"),Nt=(t,n,o,s)=>{const i=e(t);if(!i)return;const r=t,c=i.l.get(n),f=i.i,u=r;o=H(o,s.t[n][0]);const a=Number.isNaN(c)&&Number.isNaN(o);if(o!==c&&!a){if(i.l.set(n,o),s.R){const t=s.R[n];t&&t.map((t=>{try{const[[e,l]]=Object.entries(t);(128&f||1&l)&&(u?u[e](o,c,n):i.T.push((()=>{i.F[e](o,c,n)})))}catch(t){l(t,r)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(o,c,n)&&!(16&f))return;16&f||mt(i,!1)}}},Mt=(n,o)=>{var l,s;const i=n.prototype;{n.watchers&&!o.R&&(o.R=D(n.watchers)),n.deserializers&&!o.D&&(o.D=n.deserializers),n.serializers&&!o.H&&(o.H=n.serializers);const r=Object.entries(null!=(l=o.t)?l:{});r.map((([n,[l]])=>{if(31&l||32&l){const{get:s,set:r}=t(i,n)||{};s&&(o.t[n][0]|=2048),r&&(o.t[n][0]|=4096),Object.defineProperty(i,n,{get(){return s?s.apply(this):(t=n,e(this).l.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(i,n,{set(t){const s=e(this);if(s){if(r)return void 0===(32&l?this[n]:s.$hostElement$[n])&&s.l.get(n)&&(t=s.l.get(n)),r.apply(this,[H(t,l)]),void Nt(this,n,t=32&l?this[n]:s.$hostElement$[n],o);Nt(this,n,t,o)}}})}}));{const t=new Map;i.attributeChangedCallback=function(n,l,s){c.jmp((()=>{var c;const f=t.get(n),u=e(this);if(this.hasOwnProperty(f),i.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==s)return;if(null==f){const t=null==u?void 0:u.i;if(u&&t&&!(8&t)&&s!==l){const e=this,i=null==(c=o.R)?void 0:c[n];null==i||i.forEach((o=>{const[[i,r]]=Object.entries(o);null!=e[i]&&(128&t||1&r)&&e[i].call(e,s,l,n)}))}return}const a=r.find((([t])=>t===f)),d=a&&4&a[1][0],p=d&&null===s&&void 0===this[f];d&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(i,f);p||s==this[f]||h.get&&!h.set||(this[f]=s)}))},n.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=o.R)?s:{}),...r.filter((([t,n])=>31&n[0])).map((([n,e])=>{const o=e[1]||n;return t.set(o,n),o}))]))}}return n},Et=(t,o)=>{const r={i:o[0],p:o[1]};try{r.t=o[2],r.P=o[3],r.R=D(t.R),r.D=t.D,r.H=t.H;const f=t.prototype.connectedCallback,a=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const o={i:0,$hostElement$:t,o:e,l:new Map,W:new Map};o.U=new Promise((t=>o.L=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&e.i&&n(t,o)})(this,r)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=e(this);if(!t)return;_t(this,t,r.P),this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.i)){const n=e(t);if(!n)return;const o=n.o,r=()=>{};if(1&n.i)_t(t,n,o.P),(null==n?void 0:n.F)||(null==n?void 0:n.U)&&n.U.then((()=>{}));else{n.i|=1,12&o.i&&(t=>{if(!i.document)return;const n=t["s-cr"]=i.document.createComment("");n["s-cn"]=!0,dt(t,n,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){vt(n,n.A=e);break}}o.t&&Object.entries(o.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.i)&&(n.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const n=L(e);if(!s.has(n)){const o=()=>{};((t,n,e)=>{let o=s.get(t);u&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,s.set(t,o)})(n,t,!!(1&e.i)),o()}}const l=n.A,i=()=>mt(n,!0);l&&l["s-rc"]?l["s-rc"].push(i):i()}catch(e){l(e,t),n._&&(n._(),n._=void 0),n.L&&n.L(t)}})(t,n,o)}r()}})(this),f&&f.call(this)},disconnectedCallback(){(async t=>{if(!(1&c.i)){const n=e(t);(null==n?void 0:n.B)&&(n.B.map((t=>t())),n.B=void 0)}C.has(t)&&C.delete(t),t.shadowRoot&&C.has(t.shadowRoot)&&C.delete(t.shadowRoot)})(this),a&&a.call(this)},__attachShadow(){this.shadowRoot=this}}),Object.defineProperty(t,"is",{value:r.p,configurable:!0}),Mt(t,r)}catch(n){return l(n),t}},_t=(t,n,e)=>{e&&i.document&&e.map((([e,o,l])=>{const s=Ct(i.document,t,e),r=At(n,l),f=Lt(e);c.ael(s,o,r,f),(n.B=n.B||[]).push((()=>c.rel(s,o,r,f)))}))},At=(t,n)=>e=>{try{t.$hostElement$[n](e)}catch(n){l(n,t.$hostElement$)}},Ct=(t,n,e)=>4&e?t:n,Lt=t=>f?{passive:!!(1&t),capture:!!(2&t)}:!!(2&t),Rt=t=>c.C=t,Tt=t=>Object.assign(c,t),Ft=new WeakMap;function xt(t,n){let e=Ft.get(n);e||(e={i:0,o:{i:0,p:n.tagName},$hostElement$:n},Ft.set(n,e)),ht(e,t)}function Dt(t){return t}export{r as H,x as a,Rt as b,P as c,Tt as d,g,T as h,Et as p,xt as r,w as s,Dt as t}
@@ -1 +0,0 @@
1
- import{t as e,p as t,H as s,c as i,h as o}from"./p-QC41Uj05.js";import{s as r,l as n}from"./p-dX7Lo8Fe.js";import{a as l}from"./p-BQP1WryV.js";function c(e,t="label",s="value"){return Array.isArray(e)?e.map((e=>{var i,o;if("object"==typeof e&&null!==e){const r=null!==(i=e[t])&&void 0!==i?i:e[s],n=null!==(o=e[s])&&void 0!==o?o:e[t];return{label:String(null!=r?r:""),value:String(null!=n?n:"")}}return{label:String(e),value:String(e)}})).filter((e=>""!==e.label)):String(null!=e?e:"").split("\n").map((e=>e.trim())).filter(Boolean).map((e=>({label:e,value:e})))}function a(e,t){return e.replace(/\{(\w+)\}/g,((e,s)=>{const i=null==t?void 0:t[s];return null==i?"":String(i)}))}const f=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.selectValueChange=i(this,"selectValueChange"),this.disabled=!1,this.multiple=!1,this.open=!1,this.query="",this.remoteOptions=[],this.outsideClick=e=>{this.host.contains(e.target)||this.close()}}componentWillLoad(){return this.resolveRemote()}disconnectedCallback(){this.unbindOutsideClick()}onConfigsChange(){this.resolveRemote()}onDataMapChange(){this.resolveRemote()}searchParam(){var e;return(null===(e=this.configs)||void 0===e?void 0:e.searchParam)||void 0}remoteUrl(){var e;const t=null===(e=this.configs)||void 0===e?void 0:e.optionsUrl;if(!t)return;let s=a(t,this.dataMap);const i=this.searchParam();return i&&(s=function(e,t,s){if(!s)return e;const i=e.includes("?")?"&":"?";return`${e}${i}${encodeURIComponent(t)}=${encodeURIComponent(s)}`}(s,i,this.query.trim())),s}bindOutsideClick(){document.addEventListener("mousedown",this.outsideClick)}unbindOutsideClick(){document.removeEventListener("mousedown",this.outsideClick)}toggleOpen(){this.disabled||(this.open?this.close():(this.open=!0,this.query="",this.bindOutsideClick()))}close(){this.open=!1,this.unbindOutsideClick()}source(){var e,t;return null!==(t=null===(e=this.configs)||void 0===e?void 0:e.optionsSource)&&void 0!==t?t:"static"}async resolveRemote(e=!1){var t;if("remote"!==this.source())return;const s=this.remoteUrl();if(!s)return void(this.remoteOptions=[]);const i=function(e,t){if("string"!=typeof e||!e.trim())return;const s={};for(const i of e.split("\n")){const e=i.indexOf(":");if(e<=0)continue;const o=i.slice(0,e).trim(),r=a(i.slice(e+1).trim(),t);o&&(s[o]=r)}return Object.keys(s).length?s:void 0}(null===(t=this.configs)||void 0===t?void 0:t.optionsHeaders,this.dataMap),o=`${s}|${JSON.stringify(null!=i?i:{})}`;if(e||o!==this.lastRemoteSignature){this.lastRemoteSignature=o;try{this.remoteError=void 0,this.remoteOptions=await r.dataSourceService.fetchOptions(s,i?{headers:i}:void 0)}catch(e){this.remoteOptions=[],this.remoteError=e instanceof Error?e.message:String(e)}}}onSearchInput(e){this.query=e,"remote"===this.source()&&this.searchParam()&&(this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>this.resolveRemote()),250))}resolve(){var e,t,s,i,o,r;const l=(null===(e=this.configs)||void 0===e?void 0:e.labelKey)||void 0,a=(null===(t=this.configs)||void 0===t?void 0:t.valueKey)||void 0;switch(this.source()){case"remote":return{options:c(this.remoteOptions,l,a),error:this.remoteError};case"dataMap":{const e=null===(s=this.configs)||void 0===s?void 0:s.optionsPath;return{options:c(e?null===(i=this.dataMap)||void 0===i?void 0:i[e]:[],l,a)}}case"js":{const e=null===(o=this.configs)||void 0===o?void 0:o.optionsCode;if(!e)return{options:[]};const t=n(e,this.dataMap);return t instanceof Error?{options:[],error:t.message}:{options:c(t,l,a)}}default:return{options:c(null===(r=this.configs)||void 0===r?void 0:r.options,l,a)}}}selectedValues(){return this.multiple?Array.isArray(this.value)?this.value:[]:"string"==typeof this.value&&""!==this.value?[this.value]:[]}labelOf(e,t){var s,i;return null!==(i=null===(s=t.find((t=>t.value===e)))||void 0===s?void 0:s.label)&&void 0!==i?i:e}pick(e){if(this.multiple){const t=this.selectedValues(),s=t.includes(e.value)?t.filter((t=>t!==e.value)):[...t,e.value];this.selectValueChange.emit(s.length?s:void 0)}else this.selectValueChange.emit(e.value),this.close()}unpick(e){const t=this.selectedValues().filter((t=>t!==e));this.selectValueChange.emit(t.length?t:void 0)}filteredOptions(e){if("remote"===this.source()&&this.searchParam())return e;const t=this.query.trim().toLowerCase();return t?e.filter((e=>e.label.toLowerCase().includes(t))):e}render(){var e,t;const{options:s,error:i}=this.resolve(),r=this.selectedValues(),n=this.filteredOptions(s);return o("div",{key:"85d53f13df0d06af139fd666e2c81c1cae51080a",class:{"fk-select":!0,"fk-select--disabled":this.disabled}},o("div",{key:"2b91528a8584a4437b4a4d873276feb8a5126b1e",class:{"fk-select__trigger":!0,"fk-select__trigger--open":this.open},onClick:e=>{e.preventDefault(),this.toggleOpen()}},o("div",{key:"bc0dafdb3b3aec4ad2f90fc57a59cae953dc5f16",class:"fk-select__values"},0===r.length?o("span",{class:"fk-select__placeholder"},String(null!==(t=null===(e=this.configs)||void 0===e?void 0:e.placeholder)&&void 0!==t?t:"")):this.multiple?r.map((e=>o("span",{class:"fk-select__chip",key:e},this.labelOf(e,s),o("button",{type:"button",class:"fk-select__chip-remove",disabled:this.disabled,onClick:t=>{t.preventDefault(),t.stopPropagation(),this.unpick(e)}},"✕")))):o("span",{class:"fk-select__value"},this.labelOf(r[0],s))),!this.multiple&&r.length>0&&!this.disabled?o("button",{type:"button",class:"fk-select__clear",title:l("select.clear"),onClick:e=>{e.preventDefault(),e.stopPropagation(),this.selectValueChange.emit(void 0)}},"✕"):null,o("span",{key:"4b254a05b0a0f92171fc4ead179f407f5dbe0fd1",class:"fk-select__caret"},"▾")),this.open?o("div",{class:"fk-select__dropdown"},o("input",{class:"fk-select__search",type:"text",placeholder:l("select.search"),value:this.query,ref:e=>setTimeout((()=>null==e?void 0:e.focus()),0),onInput:e=>this.onSearchInput(e.target.value),onKeyDown:e=>{"Escape"===e.key&&this.close(),"Enter"===e.key&&n.length>0&&(e.preventDefault(),this.pick(n[0]))}}),o("div",{class:"fk-select__options",role:"listbox"},n.map((e=>{const t=r.includes(e.value);return o("div",{key:e.value,role:"option","aria-selected":t?"true":"false",class:{"fk-select__option":!0,"fk-select__option--selected":t},onClick:t=>{t.preventDefault(),this.pick(e)}},o("span",{class:"fk-select__option-label"},e.label),t?o("span",{class:"fk-select__check"},"✓"):null)})),0===n.length?o("p",{class:"fk-select__empty"},l("select.empty")):null)):null,i?o("span",{class:"fk-field__error"},i):null)}get host(){return this}static get watchers(){return{configs:[{onConfigsChange:0}],dataMap:[{onDataMapChange:0}]}}static get style(){return".sc-fk-select-input-h{display:block}.fk-select.sc-fk-select-input{position:relative;font-family:var(--fk-font)}.fk-select__trigger.sc-fk-select-input{display:flex;align-items:center;gap:calc(var(--fk-spacing) / 2);min-height:38px;padding:calc(var(--fk-spacing) / 2) var(--fk-spacing);border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface);color:var(--fk-color-text);cursor:pointer}.fk-select--disabled.sc-fk-select-input .fk-select__trigger.sc-fk-select-input{cursor:not-allowed;opacity:0.6}.fk-select__trigger--open.sc-fk-select-input{border-color:var(--fk-color-primary)}.fk-select__values.sc-fk-select-input{display:flex;flex:1;flex-wrap:wrap;align-items:center;gap:4px;min-width:0;font-size:0.9rem}.fk-select__placeholder.sc-fk-select-input{color:var(--fk-color-muted)}.fk-select__chip.sc-fk-select-input{display:inline-flex;align-items:center;gap:4px;padding:1px 8px;border-radius:999px;background:color-mix(in srgb, var(--fk-color-primary) 14%, transparent);color:var(--fk-color-primary);font-size:0.8rem;font-weight:600}.fk-select__chip-remove.sc-fk-select-input,.fk-select__clear.sc-fk-select-input{border:none;background:transparent;color:inherit;font-size:0.7rem;cursor:pointer;padding:0 2px}.fk-select__clear.sc-fk-select-input{color:var(--fk-color-muted)}.fk-select__clear.sc-fk-select-input:hover{color:var(--fk-color-danger)}.fk-select__caret.sc-fk-select-input{color:var(--fk-color-muted);font-size:0.8rem}.fk-select__dropdown.sc-fk-select-input{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:20;display:flex;flex-direction:column;border:1px solid var(--fk-color-border);border-radius:var(--fk-radius);background:var(--fk-color-surface);box-shadow:0 8px 24px var(--fk-color-shadow);overflow:hidden}.fk-select__search.sc-fk-select-input{font:inherit;font-size:0.85rem;padding:calc(var(--fk-spacing) / 1.5) var(--fk-spacing);border:none;border-bottom:1px solid var(--fk-color-border);background:transparent;color:var(--fk-color-text)}.fk-select__search.sc-fk-select-input:focus{outline:none}.fk-select__options.sc-fk-select-input{max-height:220px;overflow-y:auto}.fk-select__option.sc-fk-select-input{display:flex;align-items:center;justify-content:space-between;gap:var(--fk-spacing);padding:calc(var(--fk-spacing) / 1.5) var(--fk-spacing);font-size:0.9rem;color:var(--fk-color-text);cursor:pointer}.fk-select__option.sc-fk-select-input:hover{background:color-mix(in srgb, var(--fk-color-primary) 8%, transparent)}.fk-select__option--selected.sc-fk-select-input{color:var(--fk-color-primary);font-weight:600}.fk-select__check.sc-fk-select-input{font-size:0.8rem}.fk-select__empty.sc-fk-select-input{margin:0;padding:var(--fk-spacing);font-size:0.85rem;color:var(--fk-color-muted)}"}},[2,"fk-select-input",{configs:[16],value:[1],disabled:[4],multiple:[4],dataMap:[16],open:[32],query:[32],remoteOptions:[32],remoteError:[32]},void 0,{configs:[{onConfigsChange:0}],dataMap:[{onDataMapChange:0}]}]);function d(){"undefined"!=typeof customElements&&["fk-select-input"].forEach((t=>{"fk-select-input"===t&&(customElements.get(e(t))||customElements.define(e(t),f))}))}d();export{f as F,d}
@@ -1,2 +0,0 @@
1
- function t(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var n=(n,e)=>{var o;Object.entries(null!=(o=e.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=n[o],s=t(Object.getPrototypeOf(n),o,!0)||Object.getOwnPropertyDescriptor(n,o);s&&Object.defineProperty(n,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),e.l.has(o)?n[o]=e.l.get(o):void 0!==l&&(n[o]=l)}}))},e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},l=(t,n)=>n in t,s=(t,n)=>(0,console.error)(t,n),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},f={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},a=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),h=!1,v=[],m=[],y=(t,n)=>e=>{t.push(e),h||(h=!0,n&&4&f.u?w($):f.raf($))},b=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){s(t)}t.length=0},$=()=>{b(v),b(m),(h=v.length>0)&&f.raf($)},w=t=>a().then(t),g=y(m,!0),j=t=>{const n=C(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&S(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!O(t,N(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&C(t,"childNodes").length&&j(t)}};function S(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||N(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...S(o.childNodes,n,e)]}return s}var O=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)N(l)!==n||!e&&l["s-sr"]||o.push(l);return o},k=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,N=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function C(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function E(t){var n,e,o;return null!=(o=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?o:void 0}var M,T,L,R=new WeakMap,A=t=>"sc-"+t.h,P=t=>"object"==(t=typeof t)||"function"===t,x=(t,n,...e)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!P(o))&&(o+=""),i&&r?c[c.length-1].v+=o:c.push(i?D(null,o):o),r=i)};if(u(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}const f=D(t,null);return f.m=n,c.length>0&&(f.$=c),f.j=l,f.S=s,f},D=(t,n)=>({u:0,O:t,v:null!=n?n:null,k:null,$:null,m:null,j:null,S:null}),F={},H=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const o of n){if(e)break;for(const n of t[o])if("string"==typeof n){e=!0;break}}if(!e)return t;const o={};for(const e of n)o[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return o},_=(t,n)=>null==t||P(t)?t:4&n?"false"!==t&&(""===t||!!t):1&n?t+"":t,U=t=>{var n;return null==(n=e(t))?void 0:n.$hostElement$},W=(t,n)=>{const e=U(t);return{emit:t=>z(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},z=(t,n,e)=>{const o=f.ce(n,e);return t.dispatchEvent(o),o},B=(t,n,o,s,i,r)=>{if(o===s)return;let c=l(t,n),a=n.toLowerCase();if("class"===n){const n=t.classList,e=q(o);let l=q(s);n.remove(...e.filter((t=>t&&!l.includes(t)))),n.add(...l.filter((t=>t&&!e.includes(t))))}else if("style"===n){for(const n in o)s&&null!=s[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in s)o&&s[n]===o[n]||(n.includes("-")?t.style.setProperty(n,s[n]):t.style[n]=s[n])}else if("key"===n);else if("ref"===n)s&&pt(s,t);else if(c||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const o=n.slice(5);let l;{const n=e(t);if(n&&n.o&&n.o.t){const t=n.o.t[o];t&&t[1]&&(l=t[1])}}return l||(l=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=s}catch(t){}return}{const e=P(s);if((c||e&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[n]!==s&&(t[n]=s);else{const e=null==s?"":s;"list"===n?c=!1:null!=o&&t[n]===e||("function"==typeof t.__lookupSetter__(n)?t[n]=e:t.setAttribute(n,e))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(n)||t.removeAttribute(n):(!c||4&r||i)&&!e&&1===t.nodeType&&t.setAttribute(n,s=!0===s?"":s)}}else if(n="-"===n[2]?n.slice(3):l(u,a)?a.slice(2):a[2]+n.slice(3),o||s){const e=n.endsWith(Y);n=n.replace(G,""),o&&f.rel(t,n,o,e),s&&f.ael(t,n,s,e)}},V=/\s/,q=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(V):[]),Y="Capture",G=RegExp(Y+"$"),I=(t,n,e)=>{const o=11===n.k.nodeType&&n.k.host?n.k.host:n.k,l=t&&t.m||{},s=n.m||{};for(const t of Z(Object.keys(l)))t in s||B(o,t,l[t],void 0,e,n.u);for(const t of Z(Object.keys(s)))B(o,t,l[t],s[t],e,n.u)};function Z(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var J=!1,K=!1,Q=!1,X=!1,tt=[],nt=[],et=(t,n,e)=>{var o;const l=n.$[e];let s,i,r,c=0;if(J||(Q=!0,"slot"===l.O&&(l.u|=l.$?2:1)),null!=l.v)s=l.k=u.document.createTextNode(l.v);else if(1&l.u)s=l.k=u.document.createTextNode(""),I(null,l,X);else{if(!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.k=u.document.createElement(!J&&2&l.u?"slot-fb":l.O),I(null,l,X),null!=M&&void 0!==M&&s["s-si"]!==M&&s.classList.add(s["s-si"]=M),l.$){const n="template"===l.O?s.content:s;for(c=0;c<l.$.length;++c)i=et(t,l,c),i&&n.appendChild(i)}}return s["s-hn"]=L,3&l.u&&(s["s-sr"]=!0,s["s-cr"]=T,s["s-sn"]=l.S||"",s["s-rf"]=null==(o=l.m)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===N(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(s),r=t&&t.$&&t.$[e],r&&r.O===l.O&&t.k&&ot(t.k),vt(T,s,n.k,null==t?void 0:t.k)),s},ot=t=>{f.u|=1;const n=t.closest(L.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(ht(n,t,null!=e?e:null),t["s-sh"]=void 0,Q=!0)}f.u&=-2},lt=(t,n)=>{f.u|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===L&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==L&&o["s-ol"]&&(ht(ct(o).parentNode,o,ct(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,Q=!0),n&&lt(o,n)}f.u&=-2},st=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for("template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=et(null,e,l),i&&(o[l].k=i,ht(r,i,ct(n))))},it=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;dt(n),t&&(K=!0,t["s-ol"]?t["s-ol"].remove():lt(t,!0),t.remove())}}},rt=(t,n,e=!1)=>t.O===n.O&&("slot"===t.O?t.S===n.S:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),ct=t=>t&&t["s-ol"]||t,ut=(t,n,e=!1)=>{const o=n.k=t.k,l=t.$,s=n.$,i=n.v;let r;null==i?("slot"!==n.O||J||t.S!==n.S&&(n.k["s-sn"]=n.S||"",ot(n.k.parentElement)),I(t,n,X),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],p=n[a],h=o.length-1,v=o[0],m=o[h];const y="template"===e.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==v)v=o[++c];else if(null==m)m=o[--h];else if(rt(d,v,l))ut(d,v,l),d=n[++r],v=o[++c];else if(rt(p,m,l))ut(p,m,l),p=n[--a],m=o[--h];else if(rt(d,m,l))"slot"!==d.O&&"slot"!==m.O||lt(d.k.parentNode,!1),ut(d,m,l),ht(y,d.k,p.k.nextSibling),d=n[++r],m=o[--h];else if(rt(p,v,l))"slot"!==d.O&&"slot"!==m.O||lt(p.k.parentNode,!1),ut(p,v,l),ht(y,p.k,d.k),p=n[--a],v=o[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===v.j){u=f;break}u>=0?(i=n[u],i.O!==v.O?s=et(n&&n[c],e,u):(ut(i,v,l),n[u]=void 0,s=i.k),v=o[++c]):(s=et(n&&n[c],e,c),v=o[++c]),s&&ht(ct(d.k).parentNode,s,ct(d.k))}r>a?st(t,null==o[h+1]?null:o[h+1].k,e,o,c,h):c>h&&it(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.v&&(o.textContent=""),st(o,null,n,s,0,s.length-1)):!e&&null!==l&&it(l,0,l.length-1)):(r=o["s-cr"])?r.parentNode.textContent=i:t.v!==i&&(o.data=i)},ft=[],at=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(k(n,l)){let e=ft.find((t=>t.N===n));K=!0,n["s-sn"]=n["s-sn"]||l,e?(e.N["s-sh"]=t["s-hn"],e.C=t):(n["s-sh"]=t["s-hn"],ft.push({C:t,N:n})),n["s-sr"]&&ft.map((t=>{k(t.N,n["s-sn"])&&(e=ft.find((t=>t.N===n)),e&&!t.C&&(t.C=e.C))}))}else ft.some((t=>t.N===n))||ft.push({N:n})}1===t.nodeType&&at(t)}},dt=t=>{t.m&&t.m.ref&&tt.push((()=>t.m.ref(null))),t.$&&t.$.map(dt)},pt=(t,n)=>{nt.push((()=>t(n)))},ht=(t,n,e,o)=>{if("string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])vt(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=N(t)||"";return{slotNode:S(C(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(l),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)};function vt(t,n,e,o){var l,s;let i;if(t&&"string"==typeof n["s-sn"]&&n["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=n["s-si"]||t.parentNode["s-sc"])){const t=n["s-sn"],r=n["s-hn"];if(null==(l=e.classList)||l.add(i+"-s"),o&&(null==(s=o.classList)?void 0:s.contains(i+"-s"))){let n=(o.__childNodes||o.childNodes)[0],e=!1;for(;n;){if(n["s-sn"]!==t&&n["s-hn"]===r&&n["s-sr"]){e=!0;break}n=n.nextSibling}e||o.classList.remove(i+"-s")}}}var mt=(t,n)=>{if(n&&!t.M&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.M=()=>{n["s-p"].splice(e-1,1),o()})))}},yt=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);mt(t,t.T);const e=()=>bt(t,n);if(!n)return g(e);queueMicrotask((()=>{e()}))},bt=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return n?(t.L&&(t.L=!1,kt(o,"connectedCallback",void 0,e)),t.u|=256,t.R&&(t.R.map((([t,n])=>kt(o,t,n,e))),t.R=void 0),t.A.length&&t.A.forEach((t=>t(e))),l=kt(o,"componentWillLoad",void 0,e)):l=kt(o,"componentWillUpdate",void 0,e),l=$t(l,(()=>kt(o,"componentWillRender",void 0,e))),$t(l,(()=>gt(t,o,n)))},$t=(t,n)=>wt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),wt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,gt=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.u,l=((t,n)=>{var e,o,l;const s=A(n),i=r.get(s);if(!u.document)return s;if(t=11===t.nodeType?t:u.document,i)if("string"==typeof i){let l,r=R.get(t=t.head||t);if(r||R.set(t,r=new Set),!r.has(s)){l=u.document.createElement("style"),l.textContent=i;const a=null!=(e=f.P)?e:E(u.document);if(null!=a&&l.setAttribute("nonce",a),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(d){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),p?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.u&&t.insertBefore(l,null),4&n.u&&(l.textContent+=c),r&&r.add(s)}}else{let n=R.get(t);if(n||R.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s)}}return s})(e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);jt(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>St(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.u|=4,n.length=0)}},jt=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{var o,l,s,i,r;const c=t.$hostElement$,a=t.o,d=t.D||D(null,null),p=(t=>t&&t.O===F)(n)?n:x(null,null,n);if(L=c.tagName,e&&p.m)for(const t of Object.keys(p.m))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(p.m[t]=c[t]);if(p.O=null,p.u|=4,t.D=p,p.k=d.k=c,M=c["s-sc"],J=!1,T=c["s-cr"],K=!1,ut(d,p,e),f.u|=1,Q){at(p.k);for(const t of ft){const n=t.N;if(!n["s-ol"]&&u.document){const t=u.document.createTextNode("");t["s-nr"]=n,ht(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of ft){const n=t.N,r=t.C;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),r){const t=r.parentNode;let o=r.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(ht(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=u.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,ht(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(i=n["s-ih"])&&i)}n&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===n.nodeType&&(n.hidden=!0)}}if(K&&j(p.k),f.u&=-2,ft.length=0,!J&&!(1&a.u)&&c["s-cr"]){const t=p.k.__childNodes||p.k.childNodes;for(const n of t)if(n["s-hn"]!==L&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(r=n.hidden)&&r),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=u.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],ht(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}T=void 0,tt.forEach((t=>t())),tt.length=0,nt.forEach((t=>t())),nt.length=0})(t,n,o)}catch(n){s(n,t.$hostElement$)}return null},St=t=>{const n=t.$hostElement$,e=t.i,o=t.T;kt(e,"componentDidRender",void 0,n),64&t.u?kt(e,"componentDidUpdate",void 0,n):(t.u|=64,Nt(n),kt(e,"componentDidLoad",void 0,n),t.F(n),o||Ot()),t.H(n),t.M&&(t.M(),t.M=void 0),512&t.u&&w((()=>yt(t,!1))),t.u&=-517},Ot=()=>{w((()=>z(u,"appload",{detail:{namespace:"formkrafter-wc"}})))},kt=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){s(t,o)}},Nt=t=>t.classList.add("hydrated"),Ct=(t,n,o,l)=>{const i=e(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(n),u=i.u,f=i.i;if(o=_(o,l.t[n][0]),!(8&u&&void 0!==c||o===c||Number.isNaN(c)&&Number.isNaN(o))){if(i.l.set(n,o),l._){const t=l._[n];t&&t.map((t=>{try{const[[e,l]]=Object.entries(t);(128&u||1&l)&&(f?f[e](o,c,n):i.A.push((()=>{i.i[e](o,c,n)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(o,c,n)&&!(16&u))return;16&u||yt(i,!1)}}},Et=(n,o,l)=>{var s,i;const r=n.prototype;{n.watchers&&!o._&&(o._=H(n.watchers)),n.deserializers&&!o.U&&(o.U=n.deserializers),n.serializers&&!o.W&&(o.W=n.serializers);const c=Object.entries(null!=(s=o.t)?s:{});if(c.map((([n,[s]])=>{if(31&s||2&l&&32&s){const{get:i,set:c}=t(r,n)||{};i&&(o.t[n][0]|=2048),c&&(o.t[n][0]|=4096),(1&l||!i)&&Object.defineProperty(r,n,{get(){{if(!(2048&o.t[n][0]))return((t,n)=>e(this).l.get(n))(0,n);const t=e(this),l=t?t.i:r;if(!l)return;return l[n]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,n,{set(t){const i=e(this);if(i){if(c)return void 0===(32&s?this[n]:i.$hostElement$[n])&&i.l.get(n)&&(t=i.l.get(n)),c.call(this,_(t,s)),void Ct(this,n,t=32&s?this[n]:i.$hostElement$[n],o);{if(!(1&l&&4096&o.t[n][0]))return Ct(this,n,t,o),void(1&l&&!i.i&&i.A.push((()=>{4096&o.t[n][0]&&i.i[n]!==i.l.get(n)&&(i.i[n]=t)})));const e=()=>{const e=i.i[n];!i.l.get(n)&&e&&i.l.set(n,e),i.i[n]=_(t,s),Ct(this,n,i.i[n],o)};i.i?e():i.A.push((()=>{e()}))}}}})}else 1&l&&64&s&&Object.defineProperty(r,n,{value(...t){var o;const l=e(this);return null==(o=null==l?void 0:l.B)?void 0:o.then((()=>{var e;return null==(e=l.i)?void 0:e[n](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(n,l,s){f.jmp((()=>{var i;const u=t.get(n),f=e(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&s!==l){const e=f.i,r=null==(i=o._)?void 0:i[n];null==r||r.forEach((o=>{const[[i,r]]=Object.entries(o);null!=e[i]&&(128&t||1&r)&&e[i].call(e,s,l,n)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===s&&void 0===this[u];d&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(r,u);p||s==this[u]||h.get&&!h.set||(this[u]=s)}))},n.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=o._)?i:{}),...c.filter((([t,n])=>31&n[0])).map((([n,e])=>{const o=e[1]||n;return t.set(o,n),o}))]))}}return n},Mt=(t,n)=>{kt(t,"connectedCallback",void 0,n)},Tt=(t,n)=>{kt(t,"disconnectedCallback",void 0,n||t)},Lt=(t,n={})=>{var o;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],a=n.exclude||[],p=u.customElements,h=u.document.head,v=h.querySelector("meta[charset]"),m=u.document.createElement("style"),y=[];let b,$=!0;Object.assign(f,n),f.p=new URL(n.resourcesUrl||"./",u.document.baseURI).href;let w=!1;if(t.map((t=>{t[1].map((n=>{var o,c;const h={u:n[0],h:n[1],t:n[2],V:n[3]};4&h.u&&(w=!0),h.t=n[2],h.V=n[3],h._=H(n[4]),h.W=null!=(o=n[5])?o:{},h.U=null!=(c=n[6])?c:{};const v=h.h,m=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,q:new Map};e.B=new Promise((t=>e.H=t)),e.Y=new Promise((t=>e.F=t)),t["s-p"]=[],t["s-rc"]=[],e.A=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,h)}connectedCallback(){const t=e(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Rt(this,t,h.V)),b&&(clearTimeout(b),b=null),$?y.push(this):f.jmp((()=>(t=>{if(!(1&f.u)){const n=e(t);if(!n)return;const o=n.o,l=()=>{};if(1&n.u)Rt(t,n,o.V),(null==n?void 0:n.i)?Mt(n.i,t):(null==n?void 0:n.Y)&&n.Y.then((()=>Mt(n.i,t)));else{n.u|=1,12&o.u&&(t=>{if(!u.document)return;const n=t["s-cr"]=u.document.createComment("");n["s-cn"]=!0,ht(t,n,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){mt(n,n.T=e);break}}o.t&&Object.entries(o.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.u)){if(n.u|=32,e.G){const l=((t,n)=>{const e=t.h.replace(/-/g,"_"),o=t.G;if(!o)return;const l=i.get(o);return l?l[e]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[e])),(t=>{s(t,n.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${e.h}#${n.I}" was not found`);o.isProxied||(e._=H(o.watchers),e.W=o.serializers,e.U=o.deserializers,Et(o,e,2),o.isProxied=!0);const r=()=>{};n.u|=8;try{new o(n)}catch(n){s(n,t)}n.u&=-9,n.u|=128,r(),4&e.u?n.L=!0:Mt(n.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const n=A(e);if(!r.has(n)){const o=()=>{};((t,n,e)=>{let o=r.get(t);d&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,r.set(t,o)})(n,t,!!(1&e.u)),o()}}}const l=n.T,c=()=>yt(n,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()}catch(e){s(e,t),n.M&&(n.M(),n.M=void 0),n.F&&n.F(t)}})(t,n,o)}l()}})(this))))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.u)){const n=e(t);(null==n?void 0:n.Z)&&(n.Z.map((t=>t())),n.Z=void 0),(null==n?void 0:n.i)?Tt(n.i,t):(null==n?void 0:n.Y)&&n.Y.then((()=>Tt(n.i,t)))}R.has(t)&&R.delete(t),t.shadowRoot&&R.has(t.shadowRoot)&&R.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const n=e(this);if(!n)return;const o=y.findIndex((t=>t===this));o>-1&&y.splice(o,1),(null==(t=null==n?void 0:n.D)?void 0:t.k)instanceof Node&&!n.D.k.isConnected&&delete n.D.k}))}componentOnReady(){var t;return null==(t=e(this))?void 0:t.Y}};h.G=t[0],a.includes(v)||p.get(v)||(l.push(v),p.define(v,Et(m,h,1)))}))})),l.length>0&&(w&&(m.textContent+=c),m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=f.P)?o:E(u.document);null!=t&&m.setAttribute("nonce",t),h.insertBefore(m,v?v.nextSibling:h.firstChild)}$=!1,y.length?y.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(Ot,30)))},Rt=(t,n,e)=>{e&&u.document&&e.map((([e,o,l])=>{const s=Pt(u.document,t,e),i=At(n,l),r=xt(e);f.ael(s,o,i,r),(n.Z=n.Z||[]).push((()=>f.rel(s,o,i,r)))}))},At=(t,n)=>e=>{var o;try{256&t.u?null==(o=t.i)||o[n](e):(t.R=t.R||[]).push([n,e])}catch(n){s(n,t.$hostElement$)}},Pt=(t,n,e)=>4&e?t:n,xt=t=>({passive:!!(1&t),capture:!!(2&t)}),Dt=t=>f.P=t;export{F as H,Lt as b,W as c,U as g,x as h,a as p,o as r,Dt as s}