@telia-ace/knowledge-widget-adapters 1.1.1-rc.2 → 1.1.1-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index-ef2f6a78.js DELETED
@@ -1,1821 +0,0 @@
1
- "use strict";var hr=Object.defineProperty;var fr=(t,e,n)=>e in t?hr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var w=(t,e,n)=>(fr(t,typeof e!="symbol"?e+"":e,n),n);const a=require("react/jsx-runtime"),y=require("@emotion/styled"),$=require("@emotion/react"),f=require("react"),mr=require("react-transition-group"),pr=require("react-dom"),Qe=require("react-router-dom");function gr(t){const e=[];return t.forEach(n=>{e.indexOf(n)===-1&&e.push(n)}),e}function dt(t="",e=""){const n=t.split(" ").concat(e.split(" "));return gr(n).join(" ").trim()}function yr(t,e){if(t){if(typeof e=="string")return e;if(Array.isArray(e)){let n="";return e.forEach(r=>n=dt(n,r)),n}}}function j(...t){let e="";return t.length&&t.forEach(n=>{typeof n=="string"?e=dt(e,n):Array.isArray(n)?e=dt(e,yr(...n)):typeof n<"u"&&n!==null&&process.env.NODE_ENV!=="production"&&H.warn("appendClassNames: arguments either haveto be a string or [boolean, ...string[]]. Passed args:",...t)}),e}function Fe(t){const e={};if(typeof t=="number"||typeof t=="string")return t;for(const n in t)if(t.hasOwnProperty(n)){const r=t[n],s=n.substring(0,1).toLowerCase()+n.substring(1);if(Object.prototype.toString.call(r)==="[object Array]"){e[s]=[];for(let o=0,i=r.length;o<i;o++)e[s].push(Fe(r[o]))}else r!==null&&typeof r=="object"?e[s]=Fe(r):e[s]=r}return e}function Se(t={}){const{phrase:e="",category:n,guideCategory:r,contactCategory:s,take:o,connectionKey:i,accordion:l,id:c,uriName:d,sorting:u,tag:h,tagId:p,tagTitle:g,...x}=t,m={};return Object.keys(x).forEach(v=>{typeof t[v]=="string"&&(m[v]=t[v])}),typeof e=="string"&&e.length&&(m.phrase=e),e===null&&(m.phrase=e),typeof r=="string"&&r!=="0"&&(m.guideCategory=r),typeof r=="number"&&r!==0&&(m.guideCategory=r),typeof r=="object"&&r!==null&&(typeof r.id=="string"&&r.id!=="0"&&(m.guideCategory=r.id),typeof r.id=="number"&&r.id!==0&&(m.guideCategory=r.id)),typeof s=="string"&&s!=="0"&&(m.contactCategory=s),typeof s=="number"&&s!==0&&(m.contactCategory=s),typeof s=="object"&&s!==null&&(typeof s.id=="string"&&s.id!=="0"&&(m.contactCategory=s.id),typeof s.id=="number"&&s.id!==0&&(m.contactCategory=s.id)),typeof n=="string"&&n!=="0"&&(m.category=n),typeof n=="number"&&n!==0&&(m.category=n),typeof n=="object"&&n!==null&&(typeof n.id=="string"&&n.id!=="0"&&(m.category=n.id),typeof n.id=="number"&&n.id!==0&&(m.category=n.id)),c&&(m.id=c),d&&(+m.category||+m.guideCategory||+m.guide||+m.contactCategory||+m.contactMethod)&&(m.uriName=d),i&&(m.connectionKey=i),o&&(m.take=o),u&&(m.sorting=u),typeof l=="string"&&l.length>0&&(m.accordion=l),typeof h=="string"&&h!=="0"&&(m.tag=h),typeof h=="number"&&h!==0&&(m.tag=h),Array.isArray(h)&&h.length&&(m.tag=h),(typeof p=="string"||typeof p=="number")&&(m.tagId=p),typeof g=="string"&&(m.tagTitle=g),typeof m.tag=="string"&&(m.tag=m.tag.split(",")),m}const ht=t=>{if(!t)return"";const e=[{from:/[äæǽ]+/gi,to:"ae"},{from:/[öœ]+/gi,to:"oe"},{from:/[ü]+/gi,to:"ue"},{from:/[Ä]+/gi,to:"Ae"},{from:/[Ü]+/gi,to:"Ue"},{from:/[Ö]+/gi,to:"Oe"},{from:/[ÀÁÂÃÄÅǺĀĂĄǍΑΆẢẠẦẪẨẬẰẮẴẲẶА]+/gi,to:"A"},{from:/[àáâãåǻāăąǎªαάảạầấẫẩậằắẵẳặа]+/gi,to:"a"},{from:/[Б]+/gi,to:"B"},{from:/[б]+/gi,to:"b"},{from:/[ÇĆĈĊČ]+/gi,to:"C"},{from:/[çćĉċč]+/gi,to:"c"},{from:/[Д]+/gi,to:"D"},{from:/[д]+/gi,to:"d"},{from:/[ÐĎĐΔ]+/gi,to:"Dj"},{from:/[ðďđδ]+/gi,to:"dj"},{from:/[ÈÉÊËĒĔĖĘĚΕΈẼẺẸỀẾỄỂỆЕЭ]+/gi,to:"E"},{from:/[èéêëēĕėęěέεẽẻẹềếễểệеэ]+/gi,to:"e"},{from:/[Ф]+/gi,to:"F"},{from:/[ф]+/gi,to:"f"},{from:/[ĜĞĠĢΓГҐ]+/gi,to:"G"},{from:/[ĝğġģγгґ]+/gi,to:"g"},{from:/[ĤĦ]+/gi,to:"H"},{from:/[ĥħ]+/gi,to:"h"},{from:/[ÌÍÎÏĨĪĬǏĮİΗΉΊΙΪỈỊИЫ]+/gi,to:"I"},{from:/[ìíîïĩīĭǐįıηήίιϊỉịиыї]+/gi,to:"i"},{from:/[Ĵ]+/gi,to:"J"},{from:/[ĵ]+/gi,to:"j"},{from:/[ĶΚК]+/gi,to:"K"},{from:/[ķκк]+/gi,to:"k"},{from:/[ĹĻĽĿŁΛЛ]+/gi,to:"L"},{from:/[ĺļľŀłλл]+/gi,to:"l"},{from:/[М]+/gi,to:"M"},{from:/[м]+/gi,to:"m"},{from:/[ÑŃŅŇΝН]+/gi,to:"N"},{from:/[ñńņňʼnνн]+/gi,to:"n"},{from:/[ÒÓÔÕŌŎǑŐƠØǾΟΌΩΏỎỌỒỐỖỔỘỜỚỠỞỢО]+/gi,to:"O"},{from:/[òóôõōŏǒőơøǿºοόωώỏọồốỗổộờớỡởợо]+/gi,to:"o"},{from:/[П]+/gi,to:"P"},{from:/[п]+/gi,to:"p"},{from:/[ŔŖŘΡР]+/gi,to:"R"},{from:/[ŕŗřρр]+/gi,to:"r"},{from:/[ŚŜŞȘŠΣС]+/gi,to:"S"},{from:/[śŝşșšſσςс]+/gi,to:"s"},{from:/[ȚŢŤŦτТ]+/gi,to:"T"},{from:/[țţťŧт]+/gi,to:"t"},{from:/[ÙÚÛŨŪŬŮŰŲƯǓǕǗǙǛŨỦỤỪỨỮỬỰУ]+/gi,to:"U"},{from:/[ùúûũūŭůűųưǔǖǘǚǜυύϋủụừứữửựу]+/gi,to:"u"},{from:/[ÝŸŶΥΎΫỲỸỶỴЙ]+/gi,to:"Y"},{from:/[ýÿŷỳỹỷỵй]+/gi,to:"y"},{from:/[В]+/gi,to:"V"},{from:/[в]+/gi,to:"v"},{from:/[Ŵ]+/gi,to:"W"},{from:/[ŵ]+/gi,to:"w"},{from:/[ŹŻŽΖЗ]+/gi,to:"Z"},{from:/[źżžζз]+/gi,to:"z"},{from:/[ÆǼ]+/gi,to:"AE"},{from:/[ß]+/gi,to:"ss"},{from:/[IJ]+/gi,to:"IJ"},{from:/[ij]+/gi,to:"ij"},{from:/[Œ]+/gi,to:"OE"},{from:/[ƒ]+/gi,to:"f"},{from:/[ξ]+/gi,to:"ks"},{from:/[π]+/gi,to:"p"},{from:/[β]+/gi,to:"v"},{from:/[μ]+/gi,to:"m"},{from:/[ψ]+/gi,to:"ps"},{from:/[Ё]+/gi,to:"Yo"},{from:/[ё]+/gi,to:"yo"},{from:/[Є]+/gi,to:"Ye"},{from:/[є]+/gi,to:"ye"},{from:/[Ї]+/gi,to:"Yi"},{from:/[Ж]+/gi,to:"Zh"},{from:/[ж]+/gi,to:"zh"},{from:/[Х]+/gi,to:"Kh"},{from:/[х]+/gi,to:"kh"},{from:/[Ц]+/gi,to:"Ts"},{from:/[ц]+/gi,to:"ts"},{from:/[Ч]+/gi,to:"Ch"},{from:/[ч]+/gi,to:"ch"},{from:/[Ш]+/gi,to:"Sh"},{from:/[ш]+/gi,to:"sh"},{from:/[Щ]+/gi,to:"Shch"},{from:/[щ]+/gi,to:"shch"},{from:/[ЪъЬь]+/gi,to:""},{from:/[Ю]+/gi,to:"Yu"},{from:/[ю]+/gi,to:"yu"},{from:/[Я]+/gi,to:"Ya"},{from:/[я]+/gi,to:"ya"}],n=/[^a-zA-Z0-9]+/g,r=/[-]$/;let s=t;for(const o in e)e.hasOwnProperty(o)&&e[o].from.test(t)&&(s=s.replace(e[o].from,e[o].to));return s=s.replace(n,"-"),s=s.replace(r,""),s=s.toLowerCase(),s||"humany"},xr=t=>{let e;t.split(",")[0].indexOf("base64")!==-1?e=atob(t.split(",")[1]):e=decodeURI(t.split(",")[1]);const n=t.split(",")[0].split(":")[1].split(";")[0],r=[];for(let s=0;s<e.length;s++)r[s]=e.charCodeAt(s);return new Blob([new Uint8Array(r)],{type:n})},Pe=(t,e,...n)=>typeof e=="string"?t(`[humany] ${e}`,...n):t(e,...n),ye=class{constructor(){w(this,"keys",[]);w(this,"log",(e,...n)=>this.lookup(e,()=>ye.log(...n)));w(this,"warn",(e,...n)=>this.lookup(e,()=>ye.warn(...n)));w(this,"error",(e,...n)=>this.lookup(e,()=>ye.error(...n)));w(this,"info",(e,...n)=>this.lookup(e,()=>ye.info(...n)))}lookup(e,n){this.keys.indexOf(e)===-1&&(this.keys.push(e),n())}};let H=ye;w(H,"log",(...e)=>Pe(console.log,...e)),w(H,"warn",(...e)=>Pe(console.warn,...e)),w(H,"error",(...e)=>Pe(console.error,...e)),w(H,"info",(...e)=>Pe(console.info,...e));const un=t=>{let e={},n,r;if(typeof t!="object"||t===null)return t;e=Array.isArray(t)?[]:{};for(r in t)n=t[r],e[r]=typeof n=="object"&&n!==null?un(n):n;return e};function Wt(t){let e=0;if(t.length===0)return e.toString();for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return e.toString()}const vr=(t,e)=>{if(!t||!e)return!0;let n=e.parentNode,r=!1;for(;n!==null;)n===t&&(r=!0),n=n.parentNode;return r};function dn(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}class br{constructor(e,n){w(this,"tasks",[]);w(this,"current",Promise.resolve());this.lockWarningTime=e,this.lockErrorTime=n,this.next=this.next.bind(this)}add(e,n,r,s){this.tasks.push({task:e,resolve:n,reject:r,done:s}),this.next()}next(){this.current=this.current.then(()=>{const e=this.tasks.shift();if(e){let n;const r=setTimeout(()=>{process.env.NODE_ENV!=="production"&&H.warn(`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,e),n=setTimeout(()=>{e.reject("lock timeout exceeded")},this.lockErrorTime)},this.lockWarningTime),s=Promise.resolve(e.task()).then(o=>(clearTimeout(r),clearTimeout(n),o));return Promise.resolve(s).then(this.next).then(()=>s.then(o=>{e.done(),e.resolve(o)})).catch(o=>(e.done(),e.reject(o),this.next()))}return Promise.resolve()})}}const Ae=new WeakMap;function Ee(t,e=5e3,n=1e3){return Ae.has(t)||Ae.set(t,new br(e,n)),r=>new Promise((s,o)=>{const i=Ae.get(t);i.add(r,s,o,()=>{i.tasks.length||Ae.delete(t)})})}const _t=(t={})=>(Object.keys(t).forEach(e=>{(t[e]===null||typeof t[e]>"u")&&delete t[e]}),t),ce=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);function Ze(){return ce()+ce()+"-"+ce()+"-"+ce()+"-"+ce()+"-"+ce()+ce()+ce()}function J(t,e){return t.hints&&t.hints.indexOf(e)>-1}function wr(t){return t.constraints&&t.constraints.verifyValue}function Cr(t){return t.constraints&&t.constraints.required}function $r(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="linkText")[0]||null;return e?e.split("=")[1]:null}function kr(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="url")[0]||null;return e?e.split("=")[1]:null}function jr(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="availableHours")[0]||null;return e?e.split("=")[1]||[]:[]}function Sr(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="minuteInterval")[0]||null;return e?e.split("=")[1]||[]:[]}function Zt(t){return t.components?"Fieldset":J(t,"fullname")?"Name":J(t,"address")?"Address":J(t,"dropdown")?"DropDownList":J(t,"checkbox")?"CheckboxList":J(t,"radio")?"RadioButtonList":J(t,"email")?"Email":J(t,"agreement")?"Agreement":J(t,"phonenumber")?"PhoneNumber":J(t,"date")?"Date":t.type==="text/paragraph"?"Textarea":t.type==="text/number"?"Number":t.type==="text/password"?"Password":t.type==="hidden"?"Hidden":t.type==="file"?"File":t.type==="hwebsite"?"AntiSpam":"Text"}function Er(t){if(t.hints)for(let e=0;e<t.hints.length;e++){const n=t.hints[e];if(n.substr(0,12)==="placeholder=")return n.substr(12)}}function Nr(t){return t.children||t.components||t.groups?"object":"string"}let Lr=class hn{constructor(e,n,r,s=r.getErrorMessage,o=r.getGeneralErrors){w(this,"children",[]);w(this,"isValid");w(this,"schema");w(this,"id");if(this.name=e,this.source=n,this.parent=r,this.getErrorMessage=s,this.getGeneralErrors=o,this.isValid=!this.getGeneralErrors(this.source)&&!this.getErrorMessage(this.source),!this.isValid){let i=this.parent;for(;i;)i.isValid=!1,i=i.parent}n.dataPath=r&&r.source?`${r.source.dataPath}.${e}`:e,this.schema={type:"object",actionKey:r?`${r.createSchema().actionKey}.${e}`:e,required:[]}}createChild(e,n){const r=new hn(e,n,this);return this.children.push(r),r}createSchema(){const e=Object.assign({},this.schema);return this.id&&(e.id=this.id),this.source&&(e.type=Nr(this.source),e.title=this.source.title,e.evaluate=this.source.hasDependants,e.isValid=this.isValid,this.source.options&&(J(this.source,"multiple")?(e.type="array",e.items={type:"string",enum:this.source.options.map(n=>n.value)}):e.enum=this.source.options.map(n=>n.value))),this.children&&this.children.length&&(e.properties={},this.children.forEach(n=>{e.properties[n.name]=n.createSchema(),Cr(n.source)&&e.required.push(n.name)})),e}createLayout(){const e={};if(this.source){const r=Zt(this.source)==="Fieldset";e["ui:component"]=Zt(this.source),e["ui:placeholder"]=Er(this.source),e["ui:description"]=this.source.description,e["ui:tags"]=this.source.hints?this.source.hints.filter(s=>s.indexOf("=")===-1):[],e["ui:hidden"]=!this.source.visible,e["ui:error"]=this.getErrorMessage(this.source)||r&&this.getGeneralErrors(this.source),this.source.options&&(e["ui:enumNames"]=this.source.options.map(s=>s.title)),r&&this.schema.required.length&&(e["ui:hasRequiredChildren"]=!0),e["ui:component"]==="Agreement"&&(e["ui:linkText"]=$r(this.source),e["ui:link"]=kr(this.source)),e["ui:component"]==="PhoneNumber"&&(e["ui:options"]=this.source.options),e["ui:component"]==="Date"&&(e["ui:availableHours"]=jr(this.source),e["ui:minuteInterval"]=Sr(this.source))}return this.children&&(e["ui:order"]=[],this.children.forEach(n=>{e["ui:order"].push(n.name),e[n.name]=n.createLayout()})),e}createData(){if(this.children.length>0){const e={};return this.children.forEach(n=>{e[n.name]=n.createData()}),e}return this.source.type==="choice"?J(this.source,"multiple")?this.source.options.filter(e=>e.selected).map(e=>e.value):this.source.options.filter(e=>e.selected).map(e=>e.value).join(","):this.source.value}};function Mr(t,e,n,r){const s=new Lr(t,{title:"",groups:e.groups},null,n,r);return s.id=t,s}let Rr=class{constructor(e,n,r){w(this,"root");this.validationSource=r,this.getErrorMessage=this.getErrorMessage.bind(this),this.getGeneralErrors=this.getGeneralErrors.bind(this),this.validationSource=r,this.root=Mr(e,{title:"",groups:n.groups},this.getErrorMessage,this.getGeneralErrors)}create(){return{schema:this.root.createSchema(),layout:this.root.createLayout(),data:this.root.createData()}}getGeneralErrors(e){if(this.validationSource&&this.validationSource.generalErrors&&this.validationSource.generalErrors.length>0)return this.validationSource.generalErrors[0]}getErrorMessage(e){if(this.validationSource&&e.name&&this.validationSource.errors&&this.validationSource.errors[e.name])return this.validationSource.errors[e.name]}};const zr=(t,e)=>{const n=t.hints.find(r=>r.startsWith(e+"="));if(n)return n.substr(e.length+1)};function Or(t,e,n,r){const s=Fe(e),o=n?Fe(n):void 0,i=new Rr(t,s,o),l=i.root;return(s.Groups||s.groups).forEach((c,d)=>{const u=c.title||"group",h=c.name||`${u}[${d}]`,p=l.createChild(h,c),g=c.components;g&&g.forEach((x,m)=>{const v=x.name||`${x.title}[${m}]`,b=p.createChild(v,x);if(wr(x)){const C=zr(x,"verifyLabel")||`Confirm ${x.title}`;p.createChild(`${v}$VerifyValue`,{...x,name:`${x.name}$VerifyValue`,title:C,value:s.extra&&s.extra[`${x.name}$VerifyValue`]||""})}x.children&&x.children.forEach((C,N)=>{const S=C.name||`${C.title}[${N}]`;b.createChild(S,C)})})}),i.create()}class Pr{constructor(e,n){w(this,"name");w(this,"id");w(this,"type");w(this,"component");w(this,"title");w(this,"evaluate");w(this,"value");w(this,"description");w(this,"placeholder");w(this,"required");w(this,"actionKey");this.part=n;const{schema:r,layout:s,data:o}=n;this.name=e,this.value=o,this.type=r.type,this.title=r.title,this.evaluate=r.evaluate,this.actionKey=r.actionKey,this.component=s["ui:component"],this.description=s["ui:description"],this.placeholder=s["ui:placeholder"],this.required=r.required.indexOf(e)>-1}setData(e){this.part.data=e,this.value=e}}const De=(t,e)=>typeof t>"u"?e:t,Ar=(t,e)=>{let n=t["ui:order"];n||(n=[],t["ui:order"]=n),n.push(e)},Dr=(t,e)=>`${t.schema.id}$${e}`,Tr=(t,e)=>(t.schema.properties=De(t.schema.properties,{}),t.schema.properties[e.name]={id:e.id||Dr(t,e.name),type:e.type,title:e.title,isValid:!0,required:[],evaluate:De(e.evaluate,!1),actionKey:e.actionKey,items:e.items?{type:"string",enum:e.items.map(n=>n.value)}:void 0},e.required===!0&&t.schema.required.push(e.name),Ar(t.layout,e.name),t.layout=De(t.layout,{}),t.layout[e.name]={"ui:component":e.component,"ui:description":e.description,"ui:placeholder":e.placeholder,"ui:onClick":e.onClick||void 0,"ui:enumNames":e.items?e.items.map(n=>n.label):void 0},t.data=De(t.data,{}),t.data[e.name]=e.type==="object"?{}:e.value,t),Hr=(t,e)=>Object.assign({},{schema:t.schema.properties[e],layout:t.layout[e],data:t.data[e]}),Vr=(t,e,n)=>{const r=Hr(t,e),s=new le(r);return n(s),s},fn=(t,e,n,r,s=[])=>{Object.keys(t).forEach(o=>{o===e&&s.indexOf(o)===-1&&(t[o]=n,s.push(o),r&&(t["data:options"]=t["data:options"]||{},t["data:options"][o]=r)),typeof t[o]=="object"&&fn(t[o],e,n,r,s)})},mn=(t,e,n,r)=>{t&&t["ui:component"]===e&&(t[`ui:${n}`]=r),t&&Object.keys(t).forEach(s=>{typeof t[s]=="object"&&mn(t[s],e,n,r)})},He=(t,e,n)=>{t!==null&&typeof t=="object"&&e===null&&n(t),t!==null&&typeof t=="object"&&typeof t[e]=="object"?n(t[e]):t!==null&&typeof t=="object"&&Object.keys(t).forEach(r=>{He(t[r],e,n)})},Ve=(t,e,n)=>{t&&t.properties&&e&&typeof t.properties[e]=="object"?n(t.properties[e]):t&&t.properties&&Object.keys(t.properties).forEach(r=>{t.properties&&Ve(t.properties[r],e,n)}),e===null&&n(t)};class le{constructor(e){this.form=e}createComponent(e,n){return this.form=Tr(this.form,e),n&&Vr(this.form,e.name,n),new le(this.form)}setData(e,n,r){fn(this.form.data,e,n,r)}setLayout(e,n,r){mn(this.form.layout,e,n,r)}setMeta(e){return this.form.meta=e,this.form}setValidationErrors(e){if(e){const{general:n,...r}=e;He(this.form.layout,null,s=>s["ui:error"]=!1),Ve(this.form.schema,null,s=>s.isValid=!0),this.form.schema.isValid=!1,n&&this.form.layout["group[0]"]&&(this.form.layout["group[0]"]["ui:error"]=n),Object.keys(r).forEach(s=>{He(this.form.layout,s,o=>o["ui:error"]=r[s]),Ve(this.form.schema,s,o=>o.isValid=!1)})}else He(this.form.layout,null,n=>n["ui:error"]=!1),Ve(this.form.schema,null,n=>n.isValid=!0);return new le(this.form)}get(){return this.form}static create(e){const n={schema:{id:e,type:"object",title:"",isValid:!0,required:[]},layout:{},data:{}};return new le(n)}static fromLegacyForm(e,n,r,s){const o=Or(e,n,r);return new le(o)}}const pn=(t,e={},n={},r=()=>{})=>{t.properties&&Object.keys(t.properties).forEach(s=>{const o={schema:t.properties[s],layout:e[s],data:n[s]},l={data:{options:(n["data:options"]||{})[s]}};r(new Pr(s,o),l),typeof o.schema=="object"&&pn(o.schema,o.layout,o.data,r)})};class wt{constructor(e){this.form=e}findValue(e){}traverse(e){const{schema:n,layout:r,data:s}=this.form;pn(n,r,s,e)}export(e=!1){const n=new FormData,r={},s={};return this.traverse((o,i)=>{switch(o.component){case"Name":case"Address":case"Fieldset":case"Submit":break;case"File":const{data:l}=i,{options:c}=l;if(c){const{fileName:d}=c;r[o.name]=d}if(e)s[o.name]={component:o,extra:i};else if(o.value){const d=i.data.options.fileName||o.name,u=xr(o.value);n.append(o.name,u,d)}break;default:r[o.name]=o.value;break}}),n.append("components",JSON.stringify(r)),{formData:n,values:r,excluded:s}}}var ft=(t=>(t.Opera="opera",t.Chrome="chrome",t.Firefox="firefox",t.Safari="safari",t.Edge="edge",t.EdgeChromium="edge-chromium",t.Blink="blink",t.IE="internet-explorer",t))(ft||{});const qt=()=>{const{opr:t,opera:e,InstallTrigger:n,HTMLElement:r,safari:s,documentMode:o,StyleMedia:i,chrome:l,CSS:c}=window,d=!!t&&!!t.addons||!!e||navigator.userAgent.indexOf(" OPR/")>=0;if(d)return"opera";if(n)return"firefox";const u=(g=>g.toString()==="[object SafariRemoteNotification]")(!s||typeof s<"u"&&s.pushNotification);if(/constructor/i.test(r)||u)return"safari";const h=!!o;if(h)return"internet-explorer";if(!h&&i)return"edge";const p=!!l&&(!!l.webstore||!!l.runtime);if(p)return"chrome";if(p&&navigator.userAgent.indexOf("Edg")!==-1)return"edge-chromium";if((p||d)&&c)return"blink"},Ir=["string","number"],W=t=>Object.keys(t).reduce((e,n)=>{const r=typeof t[n]>"u"?"":t[n],s=typeof r;if(Ir.indexOf(s)>-1){const o=n.substring(0,5);o==="data-"||o==="aria-"?e[dn(n)]=r.toString():n.substring(0,4)!=="css-"&&(e[n]=r.toString())}else e[n]=r;return e},{}),Fr=t=>new RegExp("^#","i").test(t),Br=t=>({children:e,...n})=>{const{implementation:r,name:s}=t.get("$widget"),{href:o=""}=n;if(Fr(o))return a.jsx(Gr,{smooth:!0,to:o,children:e});const i=r.bindings.map(d=>d.replace(/\./g,"\\.")).join("|"),c=new RegExp(`^((http[s]?:)?//)?(${i})/([^\\s]+)`).exec(o);if(c&&c.length>=4){const d=c[4];if(r.widgets.get(d)&&!d.startsWith("blob?")&&!d.startsWith(s))return a.jsx(Wo,{widgetName:d,children:e})}return a.jsx("a",{...n,children:e})},gn=t=>{const e={};return Object.keys(t).forEach(n=>{n.indexOf("css-")>-1&&(e[n]=t[n])}),e},Wr=t=>{let e="";return Object.keys(gn(t)).forEach(n=>{n.indexOf("css-")>-1&&(e+=`${n.replace("css-","")}:${t[n]};`)}),$.css`
2
- ${e}
3
- `},_r=(t,e)=>{let n="";const r=()=>{n=""},s=u=>{const h=document.getElementById(n);return h!==null?(u(h),r(),!0):!1},o=u=>(u.preventDefault(),r(),t.onClick&&t.onClick(u),typeof t.to=="string"&&(n=t.to.split("#").slice(1).join("#")),n!==""&&s(t.scroll||(h=>t.smooth?h.scrollIntoView({behavior:"smooth"}):h.scrollIntoView())),!1),{scroll:i,smooth:l,to:c,...d}=t;return e==="a"&&(d.href="javascript:;"),a.jsx(e,{...d,onClick:o,children:t.children})},X=t=>(e,n)=>{let r=e,s="";if(["h1","h2","h3","h4","h5","h6"].includes(e))r=e;else{const l=e.match(/h1|h2|h3|h4|h5|h6/);if(l!=null&&l[0]){r=l[0];const[c]=e.split(r);s=c}}const i=((l,c,d)=>d[l]?`${c}${d[l]}`:`${c}${l}`)(r,s,t.theme.typographyVariantMapping||{});return $.css`
4
- ${i} {
5
- ${n}
6
- }
7
- `};var Zr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function yn(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){if(this instanceof r){var s=[null];s.push.apply(s,arguments);var o=Function.bind.apply(e,s);return new o}return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var xn={exports:{}};(function(t,e){(function(n,r){t.exports=r(f)})(Zr,function(n){function r(h,p,g,x){return p===void 0&&(p={}),Object.keys(p).reduce(function(m,v){if(/^on.*/.test(v))return m;var b=v;/^(data|aria)-/.test(v)||g.filter(function(I){return I instanceof RegExp?I.test(v):I===v}).length===0&&(b=s(v));var C,N,S=x(h,b);if(S.name==="style")m[S.name]=(C=p.style,N={},C.split(";").filter(function(I){return I.trim()!==""}).forEach(function(I){var T,E=I.split(":");if(E.length>1){var L=function(P){return/^-ms-/.test(P)&&(P=P.substr(1)),P.startsWith("--")?P:s(P)}(E[0].trim()),z=(T=E.slice(1).join(":").trim(),/^\d+$/.test(T)?Number(T):T.replace(/'/g,'"'));N[L]=z}}),N);else{var R=p[v],O=R===""||String(R).toLowerCase()===b.toLowerCase();m[S.name]=S.isBoolean?O:R}return m},{})}function s(h){return h.replace(/(-|:)(.)/g,function(p,g,x){return x.toUpperCase()})}n=n&&n.hasOwnProperty("default")?n.default:n;var o=["table","tbody","thead","tfoot","tr"],i={for:"htmlFor",class:"className",allowfullscreen:["allowFullScreen","allowFullscreen"],autocomplete:"autoComplete",autofocus:["autoFocus"],contenteditable:"contentEditable",spellcheck:"spellCheck",srcdoc:"srcDoc",srcset:"srcSet",itemscope:"itemScope",itemprop:"itemProp",itemtype:"itemType"};function l(h,p){var g=i[p],x=document.createElement(h);if(g)return{name:Array.isArray(g)?g[0]:g,isBoolean:c(x,Array.isArray(g)?g[1]||p:g)};for(var m in x)if(m.toLowerCase()===p.toLowerCase())return{name:m,isBoolean:c(x,m)};return{name:p,isBoolean:c(x,p)}}function c(h,p){return h.setAttribute(p,""),h[p]===!0||d.indexOf(p)>-1}var d=["itemScope"];function u(h,p,g,x){x===void 0&&(x=null);var m=g[h],v=g._;return m?n.createElement(m,p,x):v?v(h,p,x):n.createElement(h,p,x)}return function(h,p){if(p===void 0&&(p={}),typeof h!="string")throw new TypeError("Expected HTML string");var g=document.createElement("div");g.innerHTML=h.trim();var x=Array.from(g.childNodes).map(function(m,v){return function b(C,N,S){var R=S.transform||{},O=S.preserveAttributes||[],I=S.dangerouslySetChildren||["style"],T=R._;if(C.nodeType===8)return null;if(C.nodeType===3){var E=C.textContent;return T?T(E):E}for(var L={},z=C.attributes,P=0;P<z.length;P++)L[z[P].name]=z[P].value;L.key=N.toString();var B=C.tagName.toLowerCase(),Q=r(B,L,O,l),ee=Array.from(C.childNodes).map(function(q,ie){return o.indexOf(B)>-1&&q.nodeType===3&&(q.textContent=q.textContent.trim(),q.textContent==="")?null:b(q,N+"."+ie,S)}).filter(Boolean);if(I.indexOf(B)>-1){var oe=C.innerHTML;return oe&&(B!=="style"&&B!=="script"&&(oe=oe.replace(/"/g,"&quot;")),Q.dangerouslySetInnerHTML={__html:oe.trim()}),u(B,Q,R)}var fe=ee.length===0?null:ee;return u(B,Q,R,fe)}(m,String(v),p)}).filter(Boolean);return x.length===1?x[0]:x}})})(xn);var Kr=xn.exports;const Kt=qr(Kr);function Yr(t,e){return e?Kt(t,e):Kt(t)}const Ur=t=>e=>a.jsx($o,{attrs:e,htmlBody:t}),Jr=(t,e)=>({transform:{a:Br(t),img:Ur(e)}}),Gr=t=>_r(t,"a"),Y=f.forwardRef(({className:t,children:e,...n},r)=>a.jsx(Xr,{type:"button",className:j(t,"humany-button"),...W(n),ref:r,children:e})),Xr=y.button`
8
- -webkit-appearance: button;
9
- text-transform: none;
10
- overflow: visible;
11
- outline: none;
12
- border: none;
13
- background-color: transparent;
14
- cursor: pointer;
15
- font-family: inherit;
16
- font-size: inherit;
17
- line-height: normal;
18
- margin: 0;
19
- padding: 0;
20
- `,vn=({onChange:t=()=>{},onEnter:e=()=>{},className:n,...r})=>a.jsx("input",{className:j(n,"humany-checkbox"),onKeyDown:s=>{s.key==="Enter"&&e(s)},onChange:s=>t(s.target.value,s.currentTarget.checked),...W(r)}),et=new WeakMap;function Qr(){return t=>(et.has(t)||et.set(t,{}),et.get(t))}const tt=(t,e,n,...r)=>{const s=`[${t.get("$environment").name||"webprovisions"}] ${n}`;switch(e){case"info":console.info(s,...r);break;case"warning":console.warn(s,...r);break;case"error":console.error(s,...r);break}},ge=t=>{const e=t.container||t;return{info:(n,...r)=>tt(e,"info",n,...r),warn:(n,...r)=>tt(e,"warning",n,...r),error:(n,...r)=>tt(e,"error",n,...r)}},D=Qr(),Ct=(()=>{let t=0;return()=>++t})(),$t=(t,e,n)=>{const r=D(t).touchQueue.get(e);r&&r.forEach(s=>{s(n,t)})};class es{constructor(e,n,r,s){this.key=e,this.factory=n,this.parent=r,this.container=s,this.id=Ct(),this.resolved=!1,this.constructed=!1,this.async=!0}resolve(){if(!this.constructed){const e=this.factory(this.parent,this.container);return this.constructed=!0,this.value=Promise.resolve(e).then(n=>(this.resolved=!0,$t(this.container,this.key,n),n))}return this.value}}class ts{constructor(e,n,r,s){this.key=e,this.value=n,this.parent=r,this.container=s,this.id=Ct(),this.async=!1,this.resolved=!1,this.constructed=!0,this.resolve=()=>(this.resolved=!0,$t(this.container,this.key,this.value),this.value)}}class ns{constructor(e,n,r,s){this.key=e,this.value=n,this.parent=r,this.container=s,this.id=Ct(),this.async=!1,this.resolved=!1,this.constructed=!1,this.resolve=()=>{this.resolved=!0,this.constructed=!0;const o=this.value(this.parent,this.container);return $t(this.container,this.key,this.value),o}}}class kt{constructor(e,n,r){this.owner=e,this.name=n,this.parent=r,D(this).resolvers=new Map,D(this).touchQueue=new Map,D(this).children=[]}delete(e){const n=D(this).resolvers,r=Array.from(n.values()).find(s=>s.id===e);return r?(D(this).touchQueue.delete(r.key),Promise.resolve(n.delete(r.key))):this.parent?this.parent.delete(e):Promise.resolve(!1)}clear(){const e=D(this).resolvers,n=Array.from(e.values());return Promise.all(n.map(r=>{if(r.constructed)return Promise.resolve(r.resolve()).then(s=>{if(s!==null&&typeof s=="object"&&typeof s.dispose=="function")return s.dispose.call(s,this,r)})})).then(()=>{n.forEach(r=>this.delete(r.id)),D(this).children.forEach(r=>r.clear())})}detach(){if(this.parent){const e=D(this.parent).children,n=e.indexOf(this);n>-1&&(e.splice(n,1),delete this.parent)}}touch(e,n){const r=D(this).resolvers.get(e);if(r&&r.constructed)Promise.resolve(r.resolve()).then(s=>{n(s,this)});else{const s=D(this).touchQueue;let o=s.get(e);o||(o=[],s.set(e,o)),o.push(n)}return this.parent&&!r?this.parent.touch(e,n):Promise.resolve()}registerAsync(e,n){const r=D(this).resolvers.get(e);r&&!r.async&&process.env.NODE_ENV!=="production"&&ge(this).warn(`Mismatching resolver type. You are registering an async resolver with a key ('${e}') previously used by a non-async resolver.`);const s=new es(e,n,r,this);return D(this).resolvers.set(e,s),s.id}registerFactory(e,n){const r=D(this).resolvers.get(e);r&&r.async&&process.env.NODE_ENV!=="production"&&ge(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${e}') previously used by an async resolver.`);const s=new ns(e,n,r,this);return D(this).resolvers.set(e,s),s.id}register(e,n){const r=D(this).resolvers.get(e);r&&r.async&&process.env.NODE_ENV!=="production"&&ge(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${e}') previously used by an async resolver.`);const s=new ts(e,n,r,this);return D(this).resolvers.set(e,s),s.id}get(e){const n=D(this).resolvers.get(e);if(n)return n.async&&process.env.NODE_ENV!=="production"&&ge(this).warn(`You are retrieving an async value (with key '${e}') by the non-async function 'container.get(key)'. This will not be supported in future versions. Use 'container.getAsync(key) instead.'`),n.resolve();if(this.parent)return this.parent.get(e)}getAsync(e){const n=D(this).resolvers.get(e);if(n){if(!n.async)throw process.env.NODE_ENV!=="production"&&ge(this).warn(`You are retrieving a non-async value (with key '${e}') by the async function 'container.getAsync(key)'.Use 'container.get(key) instead.'`),"Mismatching resolver type";return n.resolve()}return this.parent?this.parent.getAsync(e):Promise.resolve(void 0)}getMany(...e){const n={};return e.forEach(r=>n[r]=this.get(r)),n}getManyAsync(...e){const n={};return Promise.all(e.map(r=>this.getAsync(r).then(s=>n[r]=s))).then(()=>n)}createChild(e,n){const r=new kt(e,n,this);return D(this).children.push(r),r}}var Be=(t=>(t.Implementation="implementation",t.Widget="widget",t))(Be||{}),ue=(t=>(t.Pre="pre",t.Post="post",t))(ue||{});class rs{constructor(e,n){this.container=e,this.settings=n,this.widget=e.get("$widget"),this.events=this.widget.events}}const ss=(t,e,n,r)=>{try{const s=new e(n,r);return{name:t,invoke:(o,i)=>{let l;return s[o]&&(l=s[o].call(s,i)),Promise.resolve(l)},getInstance:()=>s}}catch(s){if(s.message&&s.message.indexOf("is not a constructor")>=0)return{name:t,invoke:o=>{let i;return o==="initialize"&&(i=e(n,r)),Promise.resolve(i)},getInstance:()=>e};throw s}};function Yt(t,e){return typeof t>"u"?e:t}class os{constructor(e={}){this.part=e}createCommand(e,n,r){let s;typeof n=="function"?s={scope:Be.Widget,stage:ue.Post,defaultArgs:void 0,handlerResolver:n}:s={scope:Yt(n.scope,Be.Widget),stage:Yt(n.stage,ue.Post),defaultArgs:n.defaultArgs,handlerResolver:r};let o=this.part;const i=e.split(".");return i.forEach((l,c)=>{c===i.length-1?o[l]||(o[l]=()=>s):o=this.part[l]=this.part[l]||{}}),this}get(){return this.part}}const qe=t=>{const e=new os({});return t(e),e.get()};qe(t=>{t.createCommand("types.register",{scope:Be.Implementation,stage:ue.Pre},e=>(n,r)=>{e.container.get("$types")[n]=r}).createCommand("type",{stage:ue.Pre},e=>n=>{e.container.register("$type",n)}).createCommand("settings",{stage:ue.Pre,defaultArgs:[null]},e=>n=>{e.events.dispatch("settings:change",n,{bubbles:!0}),e.container.register("$settings",n)}).createCommand("plugin",{stage:ue.Pre},e=>(n,r,s)=>{const{container:o}=e;let i=null,l=n,c=r;typeof n=="string"&&(i=n,l=r,c=s);const d=u=>{const{transformPluginSettings:h}=e.container.get("$environmentOptions"),p=h?h(c||{},i,e.container,l):r;try{const g=ss(i,l,o,p);o.get("$plugins").push(g),u&&g.invoke("initialize",null)}catch(g){ge(e).warn("Error when initializing plugin",g)}};e.container.get("$instance")?d(!0):e.events.subscribeOnce("widget:instance-created",()=>d(!1))}).createCommand("container.register",e=>(n,r)=>{e.container.register(n,r)}).createCommand("container.registerAsync",e=>(n,r)=>{e.container.registerAsync(n,r)}).createCommand("container.registerFactory",e=>(n,r)=>{e.container.registerFactory(n,r)}).createCommand("container.touch",e=>(n,r)=>{e.container.touch(n,r)}).createCommand("csp",{},e=>n=>{e.container.register("csp",n)})});var bn=(t=>(t.Activating="activating",t.Loading="loading",t.Activated="activated",t.Deactivating="deactivating",t.Deactivated="deactivated",t))(bn||{});const is=f.createContext(new kt);f.createContext(1);const wn=f.createContext({id:"",type:"",name:"",branch:""}),as=f.createContext({}),cs=f.createContext(null);f.createContext(null);const ls=()=>f.useContext(wn),U=()=>f.useContext(is),us=t=>{const e=[];return[(r,s)=>{e.push(t.subscribe(r,s))},()=>{e.forEach(r=>{r()})}]};class Cn{constructor(e,n=[]){this.platform=e,this.rules=n}match(e){return this.rules.every(n=>!(n.id&&n.id!==e.id||n.type&&n.type!==e.type))}ofType(e){return this.rules.push({type:e}),this}withId(e){return this.rules.push({id:e}),this}select(){return new hs(this.platform,this)}}class ds{constructor(e,n,r){w(this,"actions");w(this,"subscribe");w(this,"unsubscribe");this.platform=e,this.node=n,this.actions=new jt(e,new Cn(e).withId(n.id),r);const[s,o]=us(this.platform.events);this.subscribe=s,this.unsubscribe=o}properties(e){return e&&this.node.touchProperties(n=>e(n)),this.node.attributes.properties}context(e){return e&&this.subscribe("components:context-changed",(n,{node:r})=>{r===this.node&&e(this.node.attributes.context)}),this.node.attributes.context}layout(e){return e&&this.subscribe("components:layout-changed",(n,{node:r})=>{r===this.node&&e(this.node.attributes.layout)}),this.node.attributes.layout}writeProperties(e,n){this.node.writeProperties(e,n)}writeContext(e,n){this.node.writeProperties(e,n)}writeLayout(e,n){this.node.writeLayout(e,n)}dispose(){this.unsubscribe(),this.actions.dispose()}}class hs{constructor(e,n,r=!0){w(this,"actions");w(this,"removes",[]);this.platform=e,this.target=n,this.clearOnDispose=r,this.actions=new jt(this.platform,this.target)}writeProperties(e,n){this.removes.push(this.platform.write({options:n,attributes:{properties:e},target:this.target,removable:this.clearOnDispose}))}writeContext(e,n){this.removes.push(this.platform.write({options:n,attributes:{context:e},target:this.target,removable:this.clearOnDispose}))}writeLayout(e,n){this.removes.push(this.platform.write({options:n,attributes:{layout:e},target:this.target,removable:this.clearOnDispose}))}dispose(){this.removes.forEach(e=>{e()}),this.actions.dispose()}}const fs=(t,e,n)=>{const r=t.concat(),s=(o,i,l)=>{let c=!0;if(r.length){const d=r.shift(),u=(h,p)=>(c=!1,s(h,Object.assign({},i,p),l));return Promise.resolve(d(o,u,l)).then(h=>({...h,cancelled:c}))}return Promise.resolve({data:o,cancelled:!1,options:i})};return s(e,{},n)};class jt{constructor(e,n,r){w(this,"subscriptions",[]);this.platform=e,this.target=n,this.ns=r,this.create=this.create.bind(this)}create(e,n=()=>{}){const r={key:e,fn:n,target:this.target,ns:this.ns};this.platform.actionsState.handlers.push(r);const s=()=>{const o=this.platform.actionsState.handlers.indexOf(r);o>-1&&this.platform.actionsState.handlers.splice(o,1)};return this.subscriptions.push(s),s}dispatch(e,n){const r=this.platform.nodes.all.concat(this.platform.nodes.detached),s={},o=this.platform.actionsState.handlers.filter(i=>i.key===e&&(!i.ns||!this.ns||i.ns===this.ns));return Promise.all(o.map(i=>{const l=r.filter(d=>i.target.match(d)&&this.target.match(d)),c=this.platform.actionsState.watchers.filter(d=>d.key===e&&(!d.ns||!this.ns||d.ns===this.ns)&&l.some(u=>d.target.match(u))).map(d=>d.fn);return Promise.all(l.map(d=>{const u=new ds(this.platform,d,this.ns);return fs(c,n,u).then(h=>{const{data:p={},options:g,cancelled:x}=h;return Promise.resolve(x?{}:i.fn(p,g,u)).then(m=>{s[d.id]=m})})}))})).then(()=>s)}watch(e,n){let r=e,s=this.ns;const o=e.split(".");o.length>1&&(s=o[0],r=o.splice(1).join("."));const i={fn:n,target:this.target,key:r,ns:s};this.platform.actionsState.watchers.push(i);const l=()=>{const c=this.platform.actionsState.watchers.indexOf(i);c>-1&&this.platform.actionsState.watchers.splice(c,1)};return this.subscriptions.push(l),l}dispose(){this.subscriptions.forEach(e=>e())}}qe(t=>{t.createCommand("components",e=>n=>{e.events.subscribeOnce("components:platform-created",(r,{platform:s})=>{n.handlers&&n.handlers.forEach(([o,i])=>{s.addComponentHandler(o,i)})})})});class Ut{constructor(e,n){w(this,"id");w(this,"type");w(this,"name");w(this,"parent");w(this,"tags",[]);w(this,"children",{});w(this,"changesets",[]);w(this,"attributes");w(this,"mountCount",0);this.events=e,this.id=Ze(),this.type=n,this.attributes={context:{},properties:{},layout:{},tags:[]},this.writeLayout({size:"full",indent:0})}mount(e,n){let r=e.get("mounted-nodes");return r||(r=new Map,e.register("mounted-nodes",r)),r.has(this)?(process.env.NODE_ENV!=="production"&&H.error("Trying to mount an already mounted component node.",this),()=>{}):(this.events.dispatch("components:node-mounted",{node:this}),this.mountCount===0&&(this.mountCount=this.mountCount+1,this.events.dispatch("components:node-enter",{node:this})),()=>{r.delete(this),this.events.dispatch("components:node-unmounted",{node:this}),this.mountCount=this.mountCount-1,this.mountCount===0&&this.events.dispatch("components:node-exit",{node:this})})}appendChild(e,n="default"){if(e.parent){if(e.parent===this)return;e.parent.removeChild(e)}e.parent=this,this.children[n]||(this.children[n]=[]),this.children[n].push(e),this.events.dispatch("components:node-appended",{node:e})}prependChild(e,n="default"){if(e.parent){if(e.parent===this)return;e.parent.removeChild(e)}e.parent=this,this.children[n]||(this.children[n]=[]),this.children[n].unshift(e),this.events.dispatch("components:node-appended",{node:e})}touchProperties(e,n={},r){const o=[{properties:e},n];return this.changesets.push(o),this.events.dispatch("components:set-properties",{node:this}),()=>{if(r){const i=this.changesets.indexOf(o);i>-1&&(this.changesets.splice(i,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeProperties(e,n={},r){const o=[{properties:e},n];return this.changesets.push(o),this.events.dispatch("components:set-properties",{node:this}),()=>{if(r){const i=this.changesets.indexOf(o);i>-1&&(this.changesets.splice(i,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeLayout(e,n={},r){const o=[{layout:e},n];return this.changesets.push(o),this.events.dispatch("components:set-layout",{node:this}),()=>{if(!r)return;const i=this.changesets.indexOf(o);i>-1&&(this.changesets.splice(i,1),this.events.dispatch("components:set-layout",{node:this}))}}writeContext(e,n={},r){const o=[{context:e},n];return this.changesets.push(o),this.events.dispatch("components:set-context",{node:this}),()=>{if(!r)return;const i=this.changesets.indexOf(o);i>-1&&(this.changesets.splice(i,1),this.events.dispatch("components:set-context",{node:this}))}}getChildren(e="default"){const n=this.children[e]||[];return n.reduce((r,s,o)=>{const{order:i=o}=s.attributes.layout;return r[i]?r.splice(i,0,s):r[i]=s,r},Array(n.length))}remove(){this.parent&&this.parent.removeChild(this)}removeChild(e){Object.keys(this.children).forEach(n=>{const r=this.children[n],s=r.indexOf(e);s>-1&&(r.splice(s,1),this.events.dispatch("components:node-removed",{node:e,parentNode:this}))}),delete e.parent}}const $n=(t,e,n)=>{for(let r=0,s=t.length;r<s&&n(t[r])!==!0;r++){const o=e[t[r].id]||"default",i=t[r].getChildren(o);$n(i,e,n)}},St=(t,e,n)=>{if(n(t)!==!0){const r=e[t.id]||"default",s=t.children[r];$n(s,e,n)}},nt=(t,e)=>{const n=[];return St(t,e,r=>{n.push(r)}),n},ms=(t,e,n)=>{let r;return St(t,e,s=>{if(n(s))return r=s,!0}),r};class ps{constructor(e,n,r){w(this,"all",[]);w(this,"visible",[]);w(this,"detached",[]);this.root=e,this.switches=n,r.subscribe("components:node-appended",(s,o)=>{this.all.push(o.node),this.visible=nt(e,n)}),r.subscribe("components:node-removed",(s,o)=>{let i=this.all.indexOf(o.node);i>-1&&this.all.splice(i,1),i=this.visible.indexOf(o.node),i>-1&&this.visible.splice(i,1),this.visible=nt(e,n)}),r.subscribe("components:node-switched",(s,o)=>{this.visible=nt(e,n)})}query(e={}){const n=[];return St(this.root,this.switches,r=>{Object.keys(e).every(o=>e[o]===r[o])&&n.push(r)}),n}get(e){return ms(this.root,this.switches,n=>n.id===e)||this.detached.find(n=>n.id===e)}}class gs{constructor(){w(this,"handlers",new Map)}add(e,n){this.handlers.set(e,n)}get(e){return this.handlers.get(e)}}const ys=t=>{let e=t,n=0;for(;e.parent;)n=n+1,e=e.parent;return n},xs=t=>t.map(([n,r])=>[ys(n),n,r]).sort(([n],[r])=>n-r).map(([,n,r])=>[n,r]),rt=t=>t instanceof Date?!1:t&&typeof t=="object"&&!Array.isArray(t),ne=(t,...e)=>{if(!e.length)return t;const n=e.shift();if(rt(t)&&rt(n))for(const r in n)rt(n[r])?(t[r]||Object.assign(t,{[r]:{}}),ne(t[r],n[r])):Object.assign(t,{[r]:n[r]});return ne(t,...e)},vs=(t,e)=>!t||t==="all"?!0:t.some(n=>e.indexOf(n)>-1),bs=(t,e)=>{let n=[],r=[],s;const o=()=>{process.env.NODE_ENV!=="production"&&console.time("state-processor.flush");const l=new Map,c=xs(n.map((u,h)=>[u,r[h]])),d=(u,h)=>{var N;const p=l.get(u)||{},g=h.context&&!p.context,x=h.properties&&!p.properties,m=h.layout&&!p.layout;l.set(u,{context:p.context||g,properties:p.properties||x,layout:p.layout||m}),x&&(u.attributes.properties={}),m&&(u.attributes.layout={}),g&&(u.attributes.context=ne({},(N=u.parent)==null?void 0:N.attributes.context));const v=[],b=[],C=[];if(u.changesets.forEach(S=>{const[R,O]=S;vs(O.breakpoints,t.breakpoints)&&(x&&(typeof R.properties=="function"?v.push(R.properties):ne(u.attributes.properties,R.properties)),m&&(typeof R.layout=="function"?b.push(R.layout):ne(u.attributes.layout,R.layout)),g&&(typeof R.context=="function"?C.push(R.context):ne(u.attributes.context,R.context)))}),v.forEach(S=>{ne(u.attributes.properties,S(u.attributes.properties))}),b.forEach(S=>{ne(u.attributes.layout,S(u.attributes.layout))}),C.forEach(S=>{ne(u.attributes.context,S(u.attributes.context))}),g||h.recursive){const S=t.getBranch(u),R=h.recursive?h:{context:!!g};u.getChildren(S).forEach(O=>{d(O,R)})}};process.env.NODE_ENV!=="production"&&console.timeEnd("state-processor.flush"),c.forEach(([u,h])=>{d(u,h)}),n=[],r=[],e(l)},i=()=>{clearTimeout(s),s=setTimeout(o,0)};return(l,c)=>{const d=n.indexOf(l);if(d>-1){const u=r[d];return c.context&&(u.context=!0),c.properties&&(u.properties=!0),c.layout&&(u.layout=!0),c.recursive&&(u.recursive=!0),i()}return n.push(l),r.push(c),i()}};class mt{constructor(e,n={}){w(this,"events");w(this,"breakpoints",[]);w(this,"nodes");w(this,"actionsState",{handlers:[],watchers:[]});w(this,"switches",{});w(this,"changesets",[]);w(this,"subscriptions",[]);w(this,"processNode");w(this,"customComponentHandler",new gs);this.providers=n,this.events=e.events.createChild(this);const r=new Ut(this.events,"root");r.name=`root-${e.name}`,this.nodes=new ps(r,this.switches,this.events);const s=this.processNode=bs(this,o=>{const i=Array.from(o.keys());process.env.NODE_ENV!=="production"&&console.info(`STATE PROCESSOR: ${i.length} node(s) processed:
21
- ${i.map(l=>`${l.name||"<no name>"} (${l.id})
22
- `)}`),i.forEach(l=>{const c=o.get(l);l.parent&&l.parent.type==="root"&&this.events.dispatch("components:root-children-changed",{node:l}),c!=null&&c.context&&this.events.dispatch("components:context-changed",{node:l}),c!=null&&c.properties&&this.events.dispatch("components:properties-changed",{node:l}),c!=null&&c.layout&&this.events.dispatch("components:layout-changed",{node:l})}),this.events.dispatch("components:component-model-initialized",{},{bubbles:!0})});Promise.all(Object.keys(n).map(o=>n[o].load(this))),this.subscriptions.push(this.events.subscribe("components:node-appended",(o,i)=>{const{node:l}=i;this.changesets.forEach(c=>{const{changeset:d,target:u,removes:h}=c,[p,g]=d;u.match(i.node)&&(p.properties&&h.push(l.writeProperties(p.properties,g)),p.context&&h.push(l.writeContext(p.context,g)),p.layout&&h.push(l.writeLayout(p.layout,g)))})})),this.subscriptions.push(this.events.subscribe("components:node-appended",(o,i)=>{s(i.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-properties",(o,i)=>{s(i.node,{properties:!0})})),this.subscriptions.push(this.events.subscribe("components:set-context",(o,i)=>{s(i.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-indent",(o,i)=>{s(i.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:set-layout",(o,i)=>{s(i.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:node-switched",(o,{node:i,branch:l})=>{s(i,{layout:!0,recursive:!0,properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:node-removed",(o,{parentNode:i})=>{s(i,{properties:!0})})),this.events.parent&&this.events.parent.dispatch("components:platform-created",{platform:this})}static getInstance(e){return e.getAsync("components")}addBreakpoint(e){this.breakpoints.indexOf(e)===-1&&(this.breakpoints.push(e),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}removeBreakpoint(e){const n=this.breakpoints.indexOf(e);n>-1&&(this.breakpoints.splice(n,1),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}setSwitch(e,n){this.switches[e.id]=n,this.events.dispatch("components:node-switched",{node:e,branch:n})}getBranch(e){return this.switches[e.id]}createNode(e,n={}){const r=new Ut(this.events,e);return n.detached&&this.nodes.detached.push(r),r}components(){return new Cn(this)}actions(e,n){return new jt(this,e,n)}write(e){const{provider:n,target:r,attributes:s,options:o={},removable:i}=e,l=e.key||Ze(),d={changeset:[s,o],target:r,removes:[]};if(n){const u=this.providers[n];u.write(l,r,s,o),d.removes.push(()=>{u.remove(l)})}return this.changesets.push(d),this.nodes.all.forEach(u=>{if(r.match(u)){let h=()=>{};s.properties&&(h=u.writeProperties(s.properties,o,i)),s.context&&(h=u.writeContext(s.context,o,i)),s.layout&&(h=u.writeContext(s.layout,o,i)),d.removes.push(h)}}),()=>{if(i){d.removes.forEach(h=>h());const u=this.changesets.indexOf(d);u>-1&&this.changesets.splice(u,1)}}}addComponentHandler(e,n){this.customComponentHandler.add(e,n)}getComponentHandler(e){return this.customComponentHandler.get(e)}dispose(){this.subscriptions.forEach(e=>e())}}class ws extends rs{constructor(e,n){super(e,n)}}var kn=(t=>(t.open="open",t.closed="closed",t.hidden="hidden",t))(kn||{});const Cs=t=>{const e=f.useContext(wn),n=jn(),[r,s]=f.useState();return f.useEffect(()=>{if((t||e.id)&&n){const o=n.nodes.get(t||e.id);s(o)}},[t,e.id,n]),r},Ke=()=>{const t=f.useRef(!1);return f.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t},jn=t=>{const e=U(),[n,r]=f.useState(null),s=Ke();return f.useEffect(()=>{mt.getInstance(t||e).then(o=>{s.current&&r(o)})},[s]),n},$s=(t,e)=>{const n=ls(),r=U(),[s,o]=f.useState(void 0),i=Ke(),l=t||n.type||"";return f.useEffect(()=>{if(l){let c;return(e||r).getAsync("componentResolver").then(d=>{if(i.current){const u=d.getComponent(l);o(u)}c=d.registerResolver(l,u=>{i.current&&o(u)})}),()=>{c&&c()}}},[i,l,e,r]),s},ks=t=>{const e=Cs(t),n=jn(),[r,s]=f.useState({}),o=Ke();return f.useEffect(()=>{e&&o.current&&s(e.attributes.context)},[o,e]),f.useEffect(()=>{if(n){const i=n.events.subscribe("components:context-changed",(l,c)=>{e===c.node&&o.current&&s(c.node.attributes.context)});return()=>{i()}}},[o,n,e]),r},xe=(t,e,n=window,r=()=>!0)=>{const s=f.useRef(()=>{});f.useEffect(()=>{s.current=e},[e]),f.useEffect(()=>{if(!(n&&r()))return;const i=l=>s.current(l);return n.addEventListener(t,i),()=>{n.removeEventListener(t,i)}},[t,n])},js=t=>{const e=U(),{events:n}=(t||e).get("$widget");return n},Ss=()=>{const[t,e]=f.useState(!1);return f.useEffect(()=>{const n=()=>{e(!1)},r=s=>{s.keyCode===9&&e(!0)};return window.addEventListener("keydown",r),window.addEventListener("click",n),()=>{window.removeEventListener("keydown",r),window.removeEventListener("click",n)}},[]),t},je=(t,e)=>{const[n,r]=f.useState(!1),s=f.useCallback(i=>{const{key:l}=i;l===t&&(r(!0),e&&e(i))},[r,e]),o=f.useCallback(({key:i})=>{i===t&&r(!1)},[r]);return xe("keydown",s,window),xe("keyup",o,window),n},Sn=t=>{const e=f.useRef();return f.useEffect(()=>{e.current=t}),e.current},Ne=()=>f.useContext(as),En=()=>f.useContext(cs),Et=t=>{const e=U(),n=En(),[r,s]=f.useState({name:"",params:{}}),o=Ke();return f.useEffect(()=>{const i=(t||e).get("$widget");if(!i)return;const{events:l}=i;return l.subscribe("router:change",(d,{next:{routeData:u}})=>{if(o.current){const{name:h,params:p}=u;_t(p),s({name:h,params:p})}})},[o,t,e]),f.useEffect(()=>{if(n&&n.history&&o.current){const i=n.getRouteData(),{name:l,params:c}=i;_t(c),s({name:l,params:c})}},[n,o]),r},Es=t=>{const e=f.useRef(),n=f.useRef(0);let r;const s=f.useCallback(()=>{var d;(d=e.current)==null||d.classList.add("humany-scrolling"),clearTimeout(r),r=setTimeout(()=>{var u;(u=e.current)==null||u.classList.remove("humany-scrolling")},500)},[e]),o=f.useCallback(d=>{n.current=d.touches[0].clientY},[e]),i=d=>l(d)?d===e.current?d:null:d.parentElement?i(d.parentElement):null,l=d=>d.scrollWidth>d.clientWidth||d.scrollHeight>d.clientHeight,c=f.useCallback(d=>{if(!d.cancelable)return;const u=d.touches[0].clientY,h=i(d.target);if(!h)return;const p=h.scrollTop,g=n.current-u<0?"up":"down",x=p<=0&&g==="up",m=p>=h.scrollHeight-h.offsetHeight&&g==="down";(x||m)&&d.preventDefault(),n.current=u},[e,n]);return xe("scroll",s,e.current,()=>e.current&&t),xe("touchstart",o,e.current,()=>e.current&&t),xe("touchmove",c,e.current,()=>e.current&&t),t?[Ns,e]:["",e]},Ns=`
23
- overflow-y: ${qt()===ft.Chrome||qt()===ft.EdgeChromium?"overlay":"auto"};
24
- overflow-x: hidden;
25
- -ms-overflow-style: none; /* IE 10+ */
26
- scrollbar-width: thin; /* Firefox */
27
- scrollbar-color: transparent transparent; /* Firefox */
28
-
29
- ::-webkit-scrollbar {
30
- width: 3px !important;
31
- background-color: transparent;
32
- border-left: none;
33
- }
34
- ::-webkit-scrollbar-thumb {
35
- background-color: transparent;
36
- }
37
- ::-webkit-scrollbar-track {
38
- -webkit-box-shadow: none !important;
39
- background-color: transparent;
40
- }
41
- &.humany-scrolling {
42
- scrollbar-color: #7F7F7F transparent;
43
- scrollbar-width: thin; /* Firefox */
44
- -ms-overflow-style: none; /* IE 10+ */
45
-
46
- ::-webkit-scrollbar-thumb {
47
- background-color: #7F7F7F;
48
- }
49
- }
50
- `,Ls=(t=!1)=>{const[e,n]=f.useState(t),r=f.useCallback(s=>{n(typeof s=="boolean"?s:o=>!o)},[]);return[e,r]},Nt=(t,e,n=[],r)=>{const s=js(r);return f.useEffect(()=>{if(s){const o=s.subscribe(t,e);return()=>{o()}}},[s].concat(n)),o=>s==null?void 0:s.dispatch(t,o)},Nn=(t,e)=>{const n=Nt("widget:menu-toggled",(r,s)=>{s!==t&&e()});return()=>n(t)},de=f.forwardRef(({className:t,children:e,...n},r)=>a.jsx("span",{ref:r,className:j(t,"humany-text"),...W(n),children:e})),Ln=t=>$.css`
51
- display: flex;
52
- justify-content: center;
53
- flex-direction: column;
54
- background: #ffffff;
55
- border-radius: ${t.theme.borderRadius};
56
- border: ${t.theme.border};
57
- box-shadow: ${t.theme.boxShadow||"none"};
58
- ${t["data-loading"]&&"min-height: 150px;"}
59
- `,Lt=t=>{var e,n,r;return $.css`
60
- cursor: pointer;
61
- text-align: center;
62
- border: none;
63
- font-weight: 300;
64
- padding: ${(e=t.theme.sizes)==null?void 0:e.normal};
65
- border-radius: ${t.theme.borderRadius};
66
- font-family: ${(n=t.theme.fonts)==null?void 0:n.type};
67
- font-size: ${(r=t.theme.fonts)==null?void 0:r.normal};
68
- `},Mn=t=>{var i;const{primaryColor:e,secondaryColor:n,active:r,theme:s,disabled:o}=t;return $.css`
69
- ${Lt(t)}
70
- border: 1px solid ${r?n:e};
71
- background-color: ${r?e:n};
72
-
73
- color: ${r?n:e};
74
- transition: background-color 200ms ease-out, color 200ms ease-out;
75
-
76
- span,
77
- i,
78
- p,
79
- a {
80
- transition: color 200ms ease-out;
81
- color: ${r?n:e};
82
- font-size: ${(i=s.fonts)==null?void 0:i.normal};
83
- }
84
-
85
- ${!o&&$.css`
86
- &:hover {
87
- background-color: ${e};
88
- color: ${n};
89
-
90
- span,
91
- i,
92
- p,
93
- a {
94
- color: ${n};
95
- }
96
- }
97
-
98
- &:focus-visible {
99
- ${V(t)};
100
- }
101
- `}
102
- `},V=t=>{var e,n,r;return $.css`
103
- outline: ${(e=t.theme.accessibility)==null?void 0:e.border};
104
- color: ${(r=(n=t.theme.accessibility)==null?void 0:n.colors)==null?void 0:r.inactiveText};
105
- border-color: transparent;
106
- `},Rn=t=>$.css`
107
- ${V(t)}
108
- text-decoration: underline;
109
- `,Jt=t=>{var e;return $.css`
110
- ${V(t)}
111
- outline-offset: ${(e=t.theme.sizes)==null?void 0:e.small};
112
- `},zn=y(Y)`
113
- position: absolute;
114
- top: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
115
- right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
116
- z-index: 1;
117
-
118
- svg {
119
- stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
120
- }
121
-
122
- &:focus-visible {
123
- ${V}
124
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
125
- height: 15px;
126
- box-sizing: content-box;
127
- }
128
- `,re=y(de)`
129
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
130
- font-weight: normal;
131
- line-height: 1.2em;
132
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
133
- `,Le=t=>{var e;return $.css`
134
- padding: 0;
135
- margin: 0;
136
- list-style: none;
137
- > li {
138
- margin: 0 0 ${(e=t.theme.sizes)==null?void 0:e.normal};
139
- white-space: nowrap;
140
- text-overflow: ellipsis;
141
- min-width: 0;
142
- &:focus {
143
- outline-offset: -2px;
144
- }
145
- > a {
146
- text-decoration: none;
147
- }
148
- }
149
- > li:last-of-type {
150
- margin: 0;
151
- }
152
- `},Me=t=>{var e,n,r,s;return $.css`
153
- > div {
154
- ${X(t)("> h1",$.css`
155
- margin: 0 0 ${(e=t.theme.sizes)==null?void 0:e.normal};
156
- font-size: ${(n=t.theme.fonts)==null?void 0:n.medium};
157
- font-weight: normal;
158
- line-height: 1.8em;
159
- color: ${(r=t.theme.colors)==null?void 0:r.text};
160
- `)}
161
- }
162
- > ul {
163
- ${Le(t)}
164
- }
165
- ${X(t)("h1",$.css`
166
- display: flex;
167
- align-items: center;
168
- i {
169
- margin: 7px ${(s=t.theme.sizes)==null?void 0:s.normal} 0 0;
170
- width: 24px;
171
- display: inline-block;
172
- vertical-align: text-bottom;
173
- align-self: flex-start;
174
- min-width: 24px;
175
- min-height: 24px;
176
- text-align: center;
177
- }
178
- `)}
179
- `},Mt=t=>{var e,n,r,s,o,i;return $.css`
180
- font-size: ${(e=t.theme.fonts)==null?void 0:e.normal};
181
- font-weight: 300;
182
- line-height: 1.5em;
183
- color: ${(n=t.theme.colors)==null?void 0:n.text};
184
-
185
- h1,
186
- h2,
187
- h3,
188
- h4,
189
- h5,
190
- h6 {
191
- word-break: break-word;
192
- &:first-child {
193
- margin-top: 0;
194
- }
195
- &:only-child {
196
- margin: 0;
197
- }
198
- &:last-child {
199
- margin-bottom: 0;
200
- }
201
- }
202
-
203
- a {
204
- color: ${(r=t.theme.colors)==null?void 0:r.link};
205
- &:focus-visible {
206
- ${Rn(t)};
207
- }
208
- }
209
-
210
- img {
211
- max-width: 100% !important;
212
- height: auto !important;
213
- }
214
-
215
- p {
216
- word-break: break-word;
217
- margin: ${(s=t.theme.sizes)==null?void 0:s.normal} 0;
218
- }
219
-
220
- p:first-child {
221
- margin: 0 0 ${(o=t.theme.sizes)==null?void 0:o.normal};
222
- }
223
-
224
- p:last-child {
225
- margin: ${(i=t.theme.sizes)==null?void 0:i.normal} 0 0;
226
- }
227
-
228
- p:only-child {
229
- margin: 0;
230
- }
231
- `},Rt=({elementId:t="humany-portal-elements",parent:e=document.body,children:n})=>{const[r]=f.useState(()=>{const s=document.getElementById(t)||document.createElement("div");return s.id=t,s});return f.useEffect(()=>(e.appendChild(r),()=>{r.childElementCount<=1&&r.remove()}),[r]),pr.createPortal(n,r)},_=({text:t="",backgroundSize:e="contain",size:n=12,symbol:r={content:"",type:""},elementStyle:s={},className:o,...i})=>{const{type:l,content:c}=r,d={"aria-label":t,role:"presentation"};switch(l){case"Uri":{const u={backgroundSize:e,backgroundImage:`url('${c}')`,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundAttachment:"center"};return a.jsx("i",{className:j(o,"humany-icon","humany-custom-icon"),title:t,style:{...u,...s},...d,...i})}case"Svg":{const u={className:j(o,"humany-icon"),width:`${n}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,ref:null},h={minWidth:`${n}`};switch(c){case"search":return a.jsxs("svg",{viewBox:"0 0 32 30",...u,children:[a.jsx("circle",{cx:"14.8457",cy:"14.5175",r:"8.14359",transform:"rotate(45 14.8457 14.5175)"}),a.jsx("line",{x1:"21.1001",y1:"20.4865",x2:"26.5798",y2:"25.9661"})]});case"clear":return a.jsxs("svg",{viewBox:"0 0 27 27",...u,children:[a.jsx("circle",{cx:"13.4351",cy:"13.435",r:"9",transform:"rotate(45 13.4351 13.435)",stroke:"black"}),a.jsx("line",{x1:"16.6172",y1:"10.2531",x2:"10.2533",y2:"16.6171",stroke:"black"}),a.jsx("line",{x1:"16.6171",y1:"16.617",x2:"10.2532",y2:"10.2531",stroke:"black"})]});case"close":return a.jsxs("svg",{viewBox:"0 0 13 13",...u,children:[a.jsx("path",{d:"M12.3068 0.50647L1.27246 11.7273",stroke:"black"}),a.jsx("path",{d:"M12.2812 11.9473L1.24686 0.726451",stroke:"black"})]});case"caret-right":return a.jsxs("svg",{viewBox:"0 0 14 14",style:h,...u,children:[a.jsx("line",{x1:"4.13",y1:"1.05",x2:"10.13",y2:"7.05",stroke:"black"}),a.jsx("line",{x1:"10.13",y1:"6.95",x2:"4.13",y2:"12.95",stroke:"black"})]});case"caret-left":return a.jsxs("svg",{viewBox:"0 0 14 14",style:h,...u,children:[a.jsx("line",{x1:"10.13",y1:"12.95",x2:"4.13",y2:"6.95",stroke:"black"}),a.jsx("line",{x1:"4.13",y1:"7.05",x2:"10.13",y2:"1.05",stroke:"black"})]});case"caret-up":return a.jsxs(Ms,{viewBox:"0 0 14 14",style:h,...u,children:[a.jsx("line",{x1:"13.09",y1:"3.99",x2:"7.1",y2:"9.99",stroke:"black"}),a.jsx("line",{x1:"7.19",y1:"9.99",x2:"1.19",y2:"3.99",stroke:"black"})]});case"caret-down":return a.jsxs("svg",{viewBox:"0 0 14 14",style:h,...u,children:[a.jsx("line",{x1:"13.09",y1:"3.99",x2:"7.1",y2:"9.99",stroke:"black"}),a.jsx("line",{x1:"7.19",y1:"9.99",x2:"1.19",y2:"3.99",stroke:"black"})]});case"back":return a.jsxs("svg",{viewBox:"0 0 18 18",...u,children:[a.jsx("line",{y1:"-0.5",x2:"11.724",y2:"-0.5",transform:"matrix(-0.682355 -0.731021 0.682355 -0.731021 13 16.9999)",stroke:"white"}),a.jsx("line",{y1:"-0.5",x2:"11.724",y2:"-0.5",transform:"matrix(0.682355 -0.731021 0.682355 0.731021 5 9.5705)",stroke:"white"})]});case"alert":return a.jsxs("svg",{viewBox:"0 0 19 19",...u,children:[a.jsx("circle",{cx:"9.5",cy:"9.5",r:"9.5",fill:"#CA0813"}),a.jsx("path",{d:"M10.36 4.878V8.882C10.36 9.30667 10.339 9.72433 10.297 10.135C10.255 10.541 10.199 10.9727 10.129 11.43H8.96C8.89 10.9727 8.834 10.541 8.792 10.135C8.75 9.72433 8.729 9.30667 8.729 8.882V4.878H10.36ZM8.463 14.048C8.463 13.9033 8.48867 13.7657 8.54 13.635C8.596 13.5043 8.67067 13.3923 8.764 13.299C8.862 13.2057 8.97633 13.131 9.107 13.075C9.23767 13.019 9.37767 12.991 9.527 12.991C9.67167 12.991 9.80933 13.019 9.94 13.075C10.0707 13.131 10.1827 13.2057 10.276 13.299C10.3693 13.3923 10.444 13.5043 10.5 13.635C10.556 13.7657 10.584 13.9033 10.584 14.048C10.584 14.1973 10.556 14.3373 10.5 14.468C10.444 14.594 10.3693 14.7037 10.276 14.797C10.1827 14.8903 10.0707 14.9627 9.94 15.014C9.80933 15.07 9.67167 15.098 9.527 15.098C9.37767 15.098 9.23767 15.07 9.107 15.014C8.97633 14.9627 8.862 14.8903 8.764 14.797C8.67067 14.7037 8.596 14.594 8.54 14.468C8.48867 14.3373 8.463 14.1973 8.463 14.048Z",fill:"white"})]});case"send":return a.jsx("svg",{viewBox:"0 0 20 17",...u,children:a.jsx("path",{d:"M18.95 8.56428L0.949951 0.941406V7.02531L13.6351 8.47059L0.950001 9.92276L0.949951 15.9414L18.95 8.56428Z",fill:"#A6A6A6",stroke:"#A6A6A6",strokeWidth:"0.1"})});case"chat":return a.jsxs("svg",{viewBox:"-2 -3 40 40",...u,children:[a.jsx("path",{strokeWidth:"0",fillRule:"evenodd",clipRule:"evenodd",d:"M16.9799 34C21.2676 34 25.1841 32.4256 28.1725 29.8285L34.9534 32.1994C35.7991 32.4951 36.553 31.5778 36.0892 30.8173L32.2559 24.5317C33.3474 22.3103 33.9598 19.8153 33.9598 17.1786C33.9598 7.88838 26.3576 0.357178 16.9799 0.357178C7.60216 0.357178 0 7.88838 0 17.1786C0 26.4688 7.60216 34 16.9799 34ZM30.7031 24.565C31.9094 22.3701 32.5948 19.8536 32.5948 17.1786C32.5948 8.6352 25.6038 1.70942 16.9799 1.70942C8.35601 1.70942 1.36498 8.6352 1.36498 17.1786C1.36498 25.722 8.35601 32.6478 16.9799 32.6478C21.1946 32.6478 25.0193 30.9935 27.8285 28.3047L34.3975 30.5798L30.7031 24.565Z",fill:"currentColor"}),a.jsx("path",{strokeWidth:"0",d:"M12.9395 17.1786C12.9395 18.6079 11.7809 19.7665 10.3516 19.7665C8.92237 19.7665 7.76373 18.6079 7.76373 17.1786C7.76373 15.7493 8.92237 14.5907 10.3516 14.5907C11.7809 14.5907 12.9395 15.7493 12.9395 17.1786Z",fill:"currentColor"}),a.jsx("path",{strokeWidth:"0",d:"M19.4093 17.1786C19.4093 18.6079 18.2507 19.7665 16.8214 19.7665C15.3921 19.7665 14.2335 18.6079 14.2335 17.1786C14.2335 15.7493 15.3921 14.5907 16.8214 14.5907C18.2507 14.5907 19.4093 15.7493 19.4093 17.1786Z",fill:"currentColor"}),a.jsx("path",{strokeWidth:"0",d:"M25.8791 17.1786C25.8791 18.6079 24.7204 19.7665 23.2912 19.7665C21.8619 19.7665 20.7033 18.6079 20.7033 17.1786C20.7033 15.7493 21.8619 14.5907 23.2912 14.5907C24.7204 14.5907 25.8791 15.7493 25.8791 17.1786Z",fill:"currentColor"})]});case"chat-new":return a.jsxs("svg",{viewBox:"0 0 26 24",...u,children:[a.jsx("path",{d:"M22.1109 10.3813C22.3941 10.2876 22.6674 10.1722 22.9288 10.0371C23.1902 10.9797 23.33 11.9734 23.33 13C23.33 19.0751 18.4348 24 12.3962 24C9.6352 24 7.11325 22.9705 5.18893 21.2721L0.82251 22.8226C0.277922 23.0159 -0.207515 22.4161 0.0911259 21.9188L2.55952 17.8084C1.85665 16.3558 1.46233 14.7242 1.46233 13C1.46233 6.92487 6.35758 2 12.3962 2C13.4013 2 14.3747 2.13645 15.2992 2.39193C15.1628 2.65458 15.0464 2.92925 14.9519 3.21394C14.1358 2.99881 13.2793 2.88427 12.3962 2.88427C6.84301 2.88427 2.34128 7.41324 2.34128 13C2.34128 14.7493 2.78263 16.3949 3.5594 17.8302L1.18047 21.7634L5.41046 20.2757C7.21939 22.034 9.68221 23.1157 12.3962 23.1157C17.9493 23.1157 22.451 18.5868 22.451 13C22.451 12.0944 22.3328 11.2165 22.1109 10.3813Z",fill:"currentColor"}),a.jsx("path",{d:"M25.6633 4C25.6633 6.20914 23.8724 8 21.6633 8C19.4541 8 17.6633 6.20914 17.6633 4C17.6633 1.79086 19.4541 0 21.6633 0C23.8724 0 25.6633 1.79086 25.6633 4Z",fill:"currentColor"})]});case"agent":return a.jsxs("svg",{viewBox:"0 0 36 30",...u,children:[a.jsx("path",{d:"M0.900024 15.3887C0.900024 12.9034 2.91474 10.8887 5.40002 10.8887H6.28179V20.0995H5.40002C2.91474 20.0995 0.900024 18.0848 0.900024 15.5995V15.3887Z",stroke:"white"}),a.jsx("path",{d:"M34.65 15.5996C34.65 18.0849 32.6353 20.0996 30.15 20.0996L29.2683 20.0996L29.2683 10.8888L30.15 10.8888C32.6353 10.8888 34.65 12.9035 34.65 15.3888L34.65 15.5996Z",stroke:"white"}),a.jsx("path",{d:"M29.2565 20.5974C29.2565 26.341 22.8747 26.9792 19.6838 26.9792",stroke:"white"}),a.jsx("circle",{cx:"17.4074",cy:"26.9795",r:"2.05271",stroke:"white"}),a.jsx("path",{d:"M6.28467 12.9396C6.28467 11.195 6.28686 18.0452 6.28467 8.47234C6.28248 -1.10049 29.2591 -1.10047 29.259 8.47234C29.259 18.0452 29.2569 11.6631 29.259 12.9396",stroke:"white"})]});case"minimize":return a.jsx("svg",{viewBox:"0 -10 22 22",...u,children:a.jsx("path",{d:"M0 1H22",stroke:"white"})});case"sorting":return a.jsx("svg",{viewBox:"0 0 18 14",...u,children:a.jsx("path",{d:"M18 1H0M8 13H0M13 7H0"})});case"copy":return a.jsxs("svg",{viewBox:"0 0 19 17",...u,children:[a.jsx("rect",{x:"0.5",y:"0.5",width:"11.6667",height:"11.6014",rx:"1.5",fill:"white"}),a.jsx("rect",{x:"6.83301",y:"4.89868",width:"11.6667",height:"11.6014",rx:"1.5",fill:"white"})]});case"print":return a.jsxs("svg",{viewBox:"0 0 16 17",...u,children:[a.jsx("path",{d:"M4.31592 0.999999C4.31592 0.723857 4.53977 0.5 4.81592 0.5H11.1845C11.4606 0.5 11.6845 0.723858 11.6845 1V4.53323H4.31592V0.999999Z",fill:"white",stroke:"black"}),a.jsx("path",{d:"M0.5 4.84595C0.5 4.56981 0.723858 4.34595 1 4.34595H15C15.2761 4.34595 15.5 4.5698 15.5 4.84595V10.8399C15.5 11.116 15.2761 11.3399 15 11.3399H1C0.723858 11.3399 0.5 11.116 0.5 10.8399V4.84595Z",fill:"white",stroke:"black"}),a.jsx("path",{d:"M4.31592 10.0061C4.31592 9.72996 4.53978 9.5061 4.81592 9.5061H11.1845C11.4606 9.5061 11.6845 9.72996 11.6845 10.0061V16.0001C11.6845 16.2762 11.4606 16.5001 11.1845 16.5001H4.81592C4.53978 16.5001 4.31592 16.2762 4.31592 16.0001V10.0061Z",fill:"white",stroke:"black"}),a.jsx("line",{x1:"5.29004",y1:"10.8323",x2:"10.7101",y2:"10.8323",stroke:"black"}),a.jsx("line",{x1:"5.29004",y1:"12.5242",x2:"10.7101",y2:"12.5242",stroke:"black"}),a.jsx("line",{x1:"5.29004",y1:"14.2161",x2:"10.7101",y2:"14.2161",stroke:"black"})]});case"language":return a.jsx("svg",{viewBox:"0 0 19 19",...u,children:a.jsx("path",{d:"M9.5 18C14.1944 18 18 14.1944 18 9.5C18 4.80558 14.1944 1 9.5 1M9.5 18C4.80558 18 1 14.1944 1 9.5C1 4.80558 4.80558 1 9.5 1M9.5 18C11.823 18 13.7062 14.1944 13.7062 9.5C13.7062 4.80558 11.823 1 9.5 1M9.5 18C7.17699 18 5.29381 14.1944 5.29381 9.5C5.29381 4.80558 7.17699 1 9.5 1M1.44333 6.78351H17.4742M1.3088 11.7784H17.6912",stroke:"black"})});case"information":return a.jsxs("svg",{viewBox:"0 0 17 17",...u,children:[a.jsx("path",{d:"M9.72182 5.99993C10.0524 5.99993 10.3203 5.73198 10.3203 5.40145C10.3203 5.07092 10.0524 4.80297 9.72182 4.80297C9.39129 4.80297 9.12335 5.07092 9.12335 5.40145C9.12335 5.73198 9.39129 5.99993 9.72182 5.99993Z",fill:"black"}),a.jsx("path",{d:"M7.21887 6.67639C6.89117 6.71981 6.66072 7.02066 6.70414 7.34836C6.74756 7.67605 7.04841 7.9065 7.3761 7.86308L8.353 7.73364L7.17405 11.3945C7.11289 11.5844 7.15164 11.7825 7.26117 11.932C7.38068 12.1287 7.60875 12.2469 7.85155 12.2147L9.40669 12.0087C9.73436 11.9653 9.96479 11.6645 9.92137 11.3368C9.87795 11.0091 9.57713 10.7787 9.24947 10.8221L8.58762 10.9098L9.76774 7.24534C9.83038 7.05084 9.78821 6.84771 9.67254 6.69702C9.55085 6.50877 9.32791 6.39694 9.09093 6.42834L7.21887 6.67639Z",fill:"black"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 8.5C17 13.1944 13.1944 17 8.5 17C3.80558 17 0 13.1944 0 8.5C0 3.80558 3.80558 0 8.5 0C13.1944 0 17 3.80558 17 8.5ZM16 8.5C16 12.8454 12.8454 16 8.5 16C4.15461 16 1 12.8454 1 8.5C1 4.15461 4.15461 1 8.5 1C12.8454 1 16 4.15461 16 8.5Z",fill:"black"})]});case"options":return a.jsxs("svg",{viewBox:"0 0 16 2",...u,children:[a.jsx("circle",{cx:"15",cy:"1",r:"1",transform:"rotate(90 15 1)",fill:"black"}),a.jsx("circle",{cx:"1",cy:"1",r:"1",transform:"rotate(90 1 1)",fill:"black"}),a.jsx("circle",{cx:"8",cy:"1",r:"1",transform:"rotate(90 8 1)",fill:"black"})]});case"browse":return a.jsxs("svg",{viewBox:"0 0 24 24",...u,children:[a.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"currentColor"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16663 7.33334C6.16663 6.68901 6.68896 6.16667 7.33329 6.16667H10.25C10.8943 6.16667 11.4166 6.68901 11.4166 7.33334V10.25C11.4166 10.8943 10.8943 11.4167 10.25 11.4167H7.33329C6.68896 11.4167 6.16663 10.8943 6.16663 10.25V7.33334ZM7.33329 7.04167H10.25C10.411 7.04167 10.5416 7.17226 10.5416 7.33334V10.25C10.5416 10.4111 10.411 10.5417 10.25 10.5417H7.33329C7.17221 10.5417 7.04163 10.4111 7.04163 10.25V7.33334C7.04163 7.17226 7.17221 7.04167 7.33329 7.04167Z",fill:"white"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16663 13.75C6.16663 13.1057 6.68896 12.5833 7.33329 12.5833H10.25C10.8943 12.5833 11.4166 13.1057 11.4166 13.75V16.6667C11.4166 17.311 10.8943 17.8333 10.25 17.8333H7.33329C6.68896 17.8333 6.16663 17.311 6.16663 16.6667V13.75ZM7.33329 13.4583H10.25C10.411 13.4583 10.5416 13.5889 10.5416 13.75V16.6667C10.5416 16.8278 10.411 16.9583 10.25 16.9583H7.33329C7.17221 16.9583 7.04163 16.8278 7.04163 16.6667V13.75C7.04163 13.5889 7.17221 13.4583 7.33329 13.4583Z",fill:"white"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.75 6.16667C13.1056 6.16667 12.5833 6.68901 12.5833 7.33334V10.25C12.5833 10.8943 13.1056 11.4167 13.75 11.4167H16.6666C17.311 11.4167 17.8333 10.8943 17.8333 10.25V7.33334C17.8333 6.68901 17.311 6.16667 16.6666 6.16667H13.75ZM16.6666 7.04167H13.75C13.5889 7.04167 13.4583 7.17226 13.4583 7.33334V10.25C13.4583 10.4111 13.5889 10.5417 13.75 10.5417H16.6666C16.8277 10.5417 16.9583 10.4111 16.9583 10.25V7.33334C16.9583 7.17226 16.8277 7.04167 16.6666 7.04167Z",fill:"white"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.8333 15.2083C17.8333 16.6581 16.658 17.8333 15.2083 17.8333C13.7585 17.8333 12.5833 16.6581 12.5833 15.2083C12.5833 13.7586 13.7585 12.5833 15.2083 12.5833C16.658 12.5833 17.8333 13.7586 17.8333 15.2083ZM16.9583 15.2083C16.9583 16.1748 16.1748 16.9583 15.2083 16.9583C14.2418 16.9583 13.4583 16.1748 13.4583 15.2083C13.4583 14.2418 14.2418 13.4583 15.2083 13.4583C16.1748 13.4583 16.9583 14.2418 16.9583 15.2083Z",fill:"white"})]});case"video":return h.minWidth&&typeof h.minWidth=="number"&&(h.minWidth=`${h.minWidth}px`),a.jsxs("svg",{viewBox:"0 0 25 25",...u,style:h,children:[a.jsx("path",{d:"M16.8245 10.0758C18.7392 8.55799 21.3085 7.08973 21.7947 7.61552C22.5982 8.47863 22.5288 16.6929 21.7947 17.4766C21.3482 17.9627 18.7589 16.4945 16.8245 14.9866",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.61914 12.5385C2.61914 7.12973 4.41578 5.32715 9.80764 5.32715C15.1985 5.32715 16.9952 7.12973 16.9952 12.5385C16.9952 17.9462 15.1985 19.7497 9.80764 19.7497C4.41578 19.7497 2.61914 17.9462 2.61914 12.5385Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});case"star-empty":return a.jsx("svg",{viewBox:"0 0 13 12",...u,children:a.jsx("path",{d:"M2 5.2767L5.11944 4.81796L6.70023 2L7.96487 4.81796L11 5.51699L8.75527 7.64684L9.18735 11L6.42623 9.40534L3.62295 10.7925L4.21311 7.64684L2 5.2767Z",stroke:"black"})});case"star-filled":return a.jsx("svg",{viewBox:"0 0 13 12",...u,children:a.jsx("path",{d:"M2 5.2767L5.11944 4.81796L6.70023 2L7.96487 4.81796L11 5.51699L8.75527 7.64684L9.18735 11L6.42623 9.40534L3.62295 10.7925L4.21311 7.64684L2 5.2767Z",fill:"black",stroke:"black"})});case"cog-wheel":return a.jsx("svg",{viewBox:"0 0 24 24",...u,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.273 2.68498V1C15.273 0.447715 14.8253 0 14.273 0H9.72754C9.17525 0 8.72754 0.447715 8.72754 1V2.6852C8.72754 3.20708 8.09656 3.46843 7.72754 3.09941L6.53588 1.90775C6.14536 1.51723 5.51219 1.51723 5.12167 1.90775L1.90755 5.12187C1.51702 5.5124 1.51702 6.14556 1.90755 6.53609L3.09865 7.72719C3.46767 8.09621 3.20632 8.72719 2.68444 8.72719H1C0.447715 8.72719 0 9.1749 0 9.72719V14.2726C0 14.8249 0.447715 15.2726 1 15.2726H2.68534C3.20722 15.2726 3.46857 15.9036 3.09955 16.2726L1.90793 17.4643C1.51741 17.8548 1.51741 18.488 1.90793 18.8785L5.12205 22.0926C5.51258 22.4831 6.14574 22.4831 6.53627 22.0926L7.72754 20.9013C8.09656 20.5323 8.72754 20.7937 8.72754 21.3155V23C8.72754 23.5523 9.17525 24 9.72754 24H14.273C14.8253 24 15.273 23.5523 15.273 23V21.3158C15.273 20.7939 15.904 20.5325 16.273 20.9015L17.4639 22.0924C17.8544 22.483 18.4876 22.483 18.8781 22.0924L22.0922 18.8783C22.4828 18.4878 22.4828 17.8546 22.0922 17.4641L20.9008 16.2726C20.5317 15.9036 20.7931 15.2726 21.315 15.2726H23C23.5523 15.2726 24 14.8249 24 14.2726V9.72719C24 9.1749 23.5523 8.72719 23 8.72719H21.3159C20.794 8.72719 20.5326 8.09621 20.9017 7.72719L22.0926 6.53625C22.4831 6.14572 22.4831 5.51256 22.0926 5.12203L18.8785 1.90791C18.488 1.51739 17.8548 1.51739 17.4643 1.90791L16.273 3.0992C15.904 3.46822 15.273 3.20686 15.273 2.68498ZM16.5792 4.20716C16.263 4.52345 15.7775 4.58532 15.3687 4.40375C15.2439 4.34832 15.1174 4.29587 14.9895 4.2465C14.5723 4.08555 14.273 3.69861 14.273 3.25149V2C14.273 1.44771 13.8253 1 13.273 1H10.7275C10.1753 1 9.72754 1.44772 9.72754 2V3.25116C9.72754 3.69832 9.42816 4.08528 9.01096 4.2462C8.88288 4.29561 8.75633 4.34809 8.6314 4.40357C8.22262 4.58511 7.73715 4.52323 7.42087 4.20695L6.53588 3.32196C6.14536 2.93144 5.51219 2.93144 5.12167 3.32196L3.32176 5.12187C2.93124 5.5124 2.93124 6.14556 3.32176 6.53609L4.20676 7.42109C4.52303 7.73736 4.58491 8.22283 4.40338 8.63161C4.34797 8.75638 4.29555 8.88276 4.2462 9.01067C4.08526 9.42784 3.69831 9.72719 3.25118 9.72719H2C1.44772 9.72719 1 10.1749 1 10.7272V13.2726C1 13.8249 1.44772 14.2726 2 14.2726H3.2511C3.69825 14.2726 4.0852 14.572 4.24614 14.9892C4.29556 15.1173 4.34807 15.2439 4.40357 15.3688C4.58513 15.7776 4.52327 16.2631 4.20698 16.5794L3.32215 17.4643C2.93162 17.8548 2.93162 18.488 3.32215 18.8785L5.12205 20.6784C5.51258 21.0689 6.14574 21.0689 6.53627 20.6784L7.42136 19.7933C7.73762 19.477 8.22305 19.4151 8.63183 19.5966C8.75662 19.6521 8.88302 19.7045 9.01096 19.7538C9.42816 19.9147 9.72754 20.3017 9.72754 20.7489V22C9.72754 22.5523 10.1753 23 10.7275 23H13.273C13.8253 23 14.273 22.5523 14.273 22V20.7485C14.273 20.3014 14.5723 19.9145 14.9895 19.7535C15.1173 19.7042 15.2436 19.6518 15.3682 19.5965C15.777 19.4149 16.2625 19.4768 16.5788 19.7931L17.4639 20.6782C17.8544 21.0687 18.4876 21.0687 18.8781 20.6782L20.678 18.8783C21.0685 18.4878 21.0685 17.8546 20.678 17.4641L19.7929 16.579C19.4766 16.2627 19.4147 15.7772 19.5963 15.3684C19.6517 15.2436 19.7042 15.1172 19.7535 14.9892C19.9145 14.572 20.3014 14.2726 20.7486 14.2726H22C22.5523 14.2726 23 13.8249 23 13.2726V10.7272C23 10.1749 22.5523 9.72719 22 9.72719H20.7485C20.3013 9.72719 19.9144 9.42784 19.7535 9.01067C19.7042 8.8829 19.6518 8.75665 19.5965 8.63201C19.415 8.22324 19.4768 7.7378 19.7931 7.42154L20.6784 6.53625C21.0689 6.14572 21.0689 5.51256 20.6784 5.12203L18.8785 3.32213C18.488 2.9316 17.8548 2.9316 17.4643 3.32213L16.5792 4.20716ZM16.5999 12.0001C16.5999 14.5406 14.5404 16.6001 11.9999 16.6001C9.45939 16.6001 7.3999 14.5406 7.3999 12.0001C7.3999 9.45958 9.45939 7.40009 11.9999 7.40009C14.5404 7.40009 16.5999 9.45958 16.5999 12.0001ZM17.5999 12.0001C17.5999 15.0929 15.0927 17.6001 11.9999 17.6001C8.90711 17.6001 6.3999 15.0929 6.3999 12.0001C6.3999 8.90729 8.90711 6.40009 11.9999 6.40009C15.0927 6.40009 17.5999 8.90729 17.5999 12.0001Z",fill:"black"})});case"zoom-in":return a.jsxs("svg",{viewBox:"0 0 24 24",...u,children:[a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.9774 20.8287L17.9149 16.7662C17.8437 16.6957 17.76 16.639 17.668 16.5992C20.7612 12.9331 20.415 7.48045 16.883 4.23507C13.3509 0.989694 7.88848 1.10517 4.49673 4.49691C1.10499 7.88866 0.98951 13.3511 4.23489 16.8831C7.48027 20.4152 12.9329 20.7614 16.599 17.6682C16.6388 17.7601 16.6955 17.8439 16.766 17.9151L20.8285 21.9776C21.1457 22.2948 21.6601 22.2948 21.9774 21.9776C22.2947 21.6603 22.2947 21.1459 21.9774 20.8287ZM10.8404 18.1531C6.80186 18.1531 3.52794 14.8792 3.52794 10.8406C3.52794 6.80204 6.80186 3.52813 10.8404 3.52813C14.879 3.52813 18.1529 6.80204 18.1529 10.8406C18.1483 14.8773 14.8771 18.1484 10.8404 18.1531Z",fill:"white"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8749 6.75003C11.2892 6.75003 11.6249 7.08581 11.6249 7.50003V14.25C11.6249 14.6642 11.2892 15 10.8749 15C10.4607 15 10.1249 14.6642 10.1249 14.25V7.50003C10.1249 7.08581 10.4607 6.75003 10.8749 6.75003Z",fill:"white"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.74994 10.875C6.74994 10.4608 7.08573 10.125 7.49994 10.125H14.2499C14.6642 10.125 14.9999 10.4608 14.9999 10.875C14.9999 11.2892 14.6642 11.625 14.2499 11.625H7.49994C7.08573 11.625 6.74994 11.2892 6.74994 10.875Z",fill:"white"})]});case"zoom-out":return a.jsxs("svg",{viewBox:"0 0 24 24",...u,children:[a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.1025 20.9536L18.04 16.8911C17.9688 16.8206 17.8851 16.764 17.7931 16.7241C20.8864 13.0581 20.5401 7.60539 17.0081 4.36001C13.476 1.11463 8.0136 1.23011 4.62185 4.62185C1.23011 8.0136 1.11463 13.476 4.36001 17.0081C7.60539 20.5401 13.0581 20.8864 16.7241 17.7931C16.764 17.8851 16.8206 17.9688 16.8911 18.04L20.9536 22.1025C21.2709 22.4198 21.7853 22.4198 22.1025 22.1025C22.4198 21.7853 22.4198 21.2709 22.1025 20.9536ZM10.9656 18.2781C6.92698 18.2781 3.65306 15.0041 3.65306 10.9656C3.65306 6.92698 6.92698 3.65306 10.9656 3.65306C15.0041 3.65306 18.2781 6.92698 18.2781 10.9656C18.2734 15.0022 15.0022 18.2734 10.9656 18.2781Z",fill:"white"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.87506 11C6.87506 10.5858 7.21085 10.25 7.62506 10.25H14.3751C14.7893 10.25 15.1251 10.5858 15.1251 11C15.1251 11.4142 14.7893 11.75 14.3751 11.75H7.62506C7.21085 11.75 6.87506 11.4142 6.87506 11Z",fill:"white"})]});case"download":return a.jsx("svg",{viewBox:"0 0 24 24",...u,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.5 11.1346V18.4038C22.498 20.1873 21.0527 21.6326 19.2692 21.6346H4.73077C2.94731 21.6326 1.50204 20.1873 1.5 18.4038V11.1346C1.5 10.6885 1.86162 10.3269 2.30769 10.3269C2.75377 10.3269 3.11538 10.6885 3.11538 11.1346V18.4038C3.1164 19.2956 3.83904 20.0182 4.73077 20.0192H19.2692C20.161 20.0182 20.8836 19.2956 20.8846 18.4038V11.1346C20.8846 10.6885 21.2462 10.3269 21.6923 10.3269C22.1384 10.3269 22.5 10.6885 22.5 11.1346ZM11.1434 16.2663C11.6167 16.7388 12.3832 16.7388 12.8565 16.2663L17.4172 11.7057C17.7326 11.3903 17.7326 10.8789 17.4172 10.5635C17.1018 10.2481 16.5904 10.2481 16.275 10.5635L12.8076 14.0308V3.05769C12.8076 2.61162 12.446 2.25 11.9999 2.25C11.5539 2.25 11.1923 2.61162 11.1923 3.05769V14.0308L7.72485 10.5636C7.40946 10.2482 6.89812 10.2482 6.58273 10.5636C6.26734 10.8789 6.26734 11.3903 6.58273 11.7057L11.1434 16.2663Z",fill:"white"})});case"lightbox-close":return a.jsx("svg",{viewBox:"0 0 24 24",...u,children:a.jsx("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M19.2621 18.1129C19.4674 18.3182 19.5475 18.6173 19.4724 18.8977C19.3973 19.178 19.1783 19.397 18.8979 19.4721C18.6176 19.5472 18.3184 19.4671 18.1132 19.2619L12.1877 13.3363L6.26214 19.2619C6.0569 19.4671 5.75776 19.5472 5.47741 19.4721C5.19705 19.397 4.97807 19.178 4.90294 18.8977C4.82782 18.6173 4.90798 18.3182 5.11321 18.1129L11.0388 12.1874L5.11321 6.26186C4.90798 6.05663 4.82782 5.75749 4.90294 5.47713C4.97807 5.19678 5.19705 4.97779 5.47741 4.90267C5.75776 4.82755 6.0569 4.9077 6.26214 5.11294L12.1877 11.0385L18.1132 5.11294C18.4305 4.79567 18.9449 4.79567 19.2621 5.11294C19.5794 5.4302 19.5794 5.9446 19.2621 6.26186L13.3366 12.1874L19.2621 18.1129Z",fill:"white"})});case"pagination-left":return a.jsx("svg",{viewBox:"0 0 24 24",...u,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7935 18.7087C16.0092 18.9029 16.105 19.1974 16.0447 19.4813C15.9844 19.7652 15.7772 19.9954 15.5012 20.0852C15.2251 20.1749 14.9222 20.1105 14.7065 19.9164L6.58148 12.6039C6.41027 12.4498 6.3125 12.2303 6.3125 12C6.3125 11.7697 6.41027 11.5503 6.58148 11.3962L14.7065 4.08372C15.04 3.78354 15.5536 3.81054 15.8538 4.14402C16.154 4.4775 16.127 4.99119 15.7935 5.29136L8.33939 12L15.7935 18.7087Z",fill:"#222222"})});case"pagination-right":return a.jsx("svg",{viewBox:"0 0 24 24",...u,children:a.jsx("path",{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"})})}return null}case"FontAwesome":return a.jsx(he,{className:o,faIcon:c,title:t,...i});default:case"Text":return t?a.jsx("i",{className:j(o,"humany-letter-symbol"),title:t,...d,...i,children:t.substring(0,2)}):null}},Ms=y.svg`
232
- transform: rotate(180deg);
233
- `,Rs={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",span:"span"},Re=({variant:t,component:e,className:n,children:r})=>{const{typographyVariantMapping:s={}}=ks(),o={...Rs,...s},i=e||o[t]||"span";return a.jsx(zs,{className:n,as:i,children:r})},zs=y.span``,Ye=y.div`
234
- font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
235
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
236
- position: fixed;
237
- bottom: 0;
238
- left: 0;
239
- border: ${t=>t.theme.border};
240
- width: 100%;
241
- box-shadow: ${t=>t.theme.boxShadow};
242
- background: #ffffff;
243
- ${t=>t.css&&t.css}
244
- `;y(Re)`
245
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
246
- margin: 0;
247
- text-align: center;
248
- border-bottom: #eeeeee 1px solid;
249
- background: #ffffff;
250
- position: relative;
251
- display: flex;
252
- justify-content: center;
253
- align-items: center;
254
- font-weight: bold;
255
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
256
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
257
- line-height: 1.2em;
258
- `;const Ue=t=>$.css`
259
- transition: ${t.duration}ms;
260
- `;y(Ye)`
261
- max-height: 0;
262
- ${Ue}
263
-
264
- &.humany-drawer-transition-enter {
265
- max-height: 0;
266
- }
267
- &.humany-drawer-transition-enter-active,
268
- &.humany-drawer-transition-enter-done,
269
- &.humany-drawer-transition-exit {
270
- max-height: ${t=>t.fullScreen?"100%":"400px"};
271
- }
272
-
273
- &.humany-drawer-transition-exit-active,
274
- &.humany-drawer-transition-exit-done {
275
- max-height: 0;
276
- }
277
- `;y(Ye)`
278
- ${Ue}
279
- transform: translateX(100%);
280
- height: ${t=>t.fullScreen?"100%":"auto"};
281
-
282
- &.humany-drawer-transition-enter {
283
- transform: translateX(100%);
284
- }
285
- &.humany-drawer-transition-enter-active,
286
- &.humany-drawer-transition-enter-done,
287
- &.humany-drawer-transition-exit {
288
- transform: translateX(0);
289
- }
290
-
291
- &.humany-drawer-transition-exit-active,
292
- &.humany-drawer-transition-exit-done {
293
- transform: translateX(100%);
294
- }
295
- `;y(Ye)`
296
- ${Ue}
297
- transform: translateX(-100%);
298
- height: ${t=>t.fullScreen?"100%":"auto"};
299
-
300
- &.humany-drawer-transition-enter {
301
- transform: translateX(-100%);
302
- }
303
- &.humany-drawer-transition-enter-active,
304
- &.humany-drawer-transition-enter-done,
305
- &.humany-drawer-transition-exit {
306
- transform: translateX(0);
307
- }
308
-
309
- &.humany-drawer-transition-exit-active,
310
- &.humany-drawer-transition-exit-done {
311
- transform: translateX(-100%);
312
- }
313
- `;y(Ye)`
314
- ${Ue}
315
- bottom: unset;
316
- top: 0;
317
- height: 0;
318
-
319
- &.humany-drawer-transition-enter {
320
- height: 0;
321
- }
322
- &.humany-drawer-transition-enter-active,
323
- &.humany-drawer-transition-enter-done,
324
- &.humany-drawer-transition-exit {
325
- height: ${t=>t.clientHeight}px;
326
- }
327
-
328
- &.humany-drawer-transition-exit-active,
329
- &.humany-drawer-transition-exit-done {
330
- height: 0;
331
- }
332
- `;const Os=(t,e,n)=>{const[r,s]=f.useState(0),[o,i]=f.useState(0),l=f.useCallback((c,d)=>{if(c.preventDefault(),d){const u=d.getBoundingClientRect();s(Math.max(document.body.clientWidth-u.right,1)),i(u.bottom+window.scrollY)}},[r,o,s,i]);return f.useEffect(()=>{if(!n||!t)return;const c=n.getBoundingClientRect(),d={x:r,y:o};c.left<0&&(d.x=0),c.bottom>window.innerHeight&&(d.y=0),d.x!==r&&s(d.x),d.y!==o&&i(d.y)},[n,t,e]),[{x:r,y:o},l]};f.forwardRef(({className:t="",children:e=null,trigger:n,closeButtonAriaLabel:r,...s},o)=>{const i=f.useRef(),l=f.useRef(),c=f.useRef();f.useImperativeHandle(o,()=>c.current,[c.current]);const d=f.useRef(Ze()),[u,h]=f.useState(!1),p=Sn(u),[{x:g,y:x},m]=Os(u,d.current,c.current),v=je("Escape");f.useEffect(()=>{v&&h(!1)},[v]),f.useEffect(()=>{u&&i.current?i.current.focus():!u&&l.current&&p&&l.current.focus()},[u,i.current,l.current]),xe("click",N=>{const{target:S}=N;!c.current||!S||c.current!==S&&!c.current.contains(S)&&h(!1)},window),Nt("router:changed",()=>{h(!1)});const b=Nn(d.current,()=>{h(!1)}),C=f.useCallback(N=>{N.stopPropagation(),m(N,l.current),h(!u),b()},[b,m,h]);return a.jsxs(a.Fragment,{children:[u&&a.jsx(Rt,{children:a.jsxs(Ps,{className:j("humany-dropdown",`humany-dropdown-${d.current}`,t),...s,x:g,y:x,ref:c,children:[a.jsx(zn,{onClick:()=>h(!1),tabIndex:0,ref:i,"aria-label":r,children:a.jsx(_,{symbol:{type:"Svg",content:"close"}})}),e]})}),f.cloneElement(n,{onClick:C,ref:l,"aria-label":n.props.title,"aria-expanded":u})]})});const Ps=y.div`
333
- ${Ln}
334
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
335
- min-width: 150px;
336
- position: absolute;
337
- box-shadow: ${t=>t.theme.boxShadow};
338
-
339
- ${t=>{var n,r,s;let e="";return t.y>0?e+=`top: calc(${((n=t.theme.sizes)==null?void 0:n.small)||"0px"} + ${t.y||"0"}px);`:e+=`bottom: ${((r=t.theme.sizes)==null?void 0:r.normal)||"0px"};`,t.x>0?e+=`right: ${t.x||"0"}px;`:e+=`left: ${((s=t.theme.sizes)==null?void 0:s.normal)||"0px"};`,e}};
340
- `;y.div`
341
- display: none;
342
- `;f.forwardRef(({children:t,columns:e,gap:n,className:r,...s},o)=>a.jsx(As,{className:j(r,"humany-grid"),"data-columns":e,"data-gap":n,...gn(s),...W(s),ref:o,children:t}));const As=y.div`
343
- display: grid;
344
- grid-template-columns: repeat(${t=>t["data-columns"]}, 1fr);
345
- grid-gap: ${t=>t["data-gap"]};
346
- justify-content: center;
347
- grid-auto-rows: max-content;
348
- ${Wr}
349
- `,Je=f.forwardRef(({htmlParseInstruction:t=null,className:e,html:n,...r},s)=>{const o=U(),[i,l]=f.useState();return f.useEffect(()=>{const c=Jr(o,n),d={...c,...t,transform:{...c.transform,...t==null?void 0:t.transform}},u=Yr(n,d);l(u)},[n,t]),a.jsx("div",{className:j(e,"humany-html"),...W(r),ref:s,children:i})}),he=({faIcon:t,title:e,className:n="",role:r="presentation",...s})=>a.jsx("i",{className:j(n,`fa fa-${t}`),title:e,role:r,...W(s)}),Ds=f.forwardRef(({className:t="",autoFocus:e=!1,onFocusChange:n=()=>{},onEnter:r=()=>{},onEscape:s=()=>{},selectAllOnFocus:o,onChange:i=()=>{},disabled:l=!1,type:c,...d},u)=>{const[h,p]=f.useState(e),g=f.useRef();f.useImperativeHandle(u,()=>g.current),f.useEffect(()=>{var v;e&&((v=g==null?void 0:g.current)==null||v.focus())},[e,u,g]);const x=(v,b)=>{p(v),n&&n(v),o&&v&&b.target.select()},m={...W(d),disabled:l,autoFocus:e,type:c,onKeyDown:v=>{v.key==="Enter"&&h&&r(v),v.key==="Escape"&&h&&s(v)},onFocus:v=>x(!0,v),onBlur:v=>x(!1,v),onChange:v=>i(v.target.value||""),className:j(t,"humany-input"),"data-type":c};return c!=="textarea"?a.jsx("input",{...m,ref:g}):a.jsx("textarea",{...m,ref:g})}),be=f.forwardRef(({className:t,items:e,renderItem:n,renderLi:r=!1,...s},o)=>a.jsx("ul",{className:j(t,"humany-list"),"data-item-count":e.length,...W(s),ref:o,children:e.map((i,l,c)=>r?a.jsx("li",{className:"humany-list-item",children:n(i,l,c)},i.id||l):n(i,l,c))})),zt=f.forwardRef(({text:t,html:e,header:n,className:r,htmlParseInstruction:s,symbol:o,...i},l)=>a.jsxs("div",{className:j(r,"humany-paragraph"),...W(i),ref:l,children:[n?a.jsxs(Re,{variant:"h1",children:[o?a.jsx(_,{symbol:o}):null,n]}):null,e?a.jsx(Je,{html:e,htmlParseInstruction:s}):null,t?a.jsx(de,{children:t}):null]})),ze=f.forwardRef(({header:t,customHeader:e,text:n,html:r,className:s,children:o,symbol:i,items:l,renderItem:c,renderLi:d,ulProps:u,...h},p)=>a.jsxs("div",{className:j(s,"humany-item-list"),"data-item-count":l.length,...W(h),ref:p,children:[e||(t||n||r?a.jsx(zt,{symbol:i,header:t,text:n,html:r}):null),l.length?a.jsx(be,{items:l,renderItem:c,renderLi:d,...u}):null,o]}));var On=function(){};process.env.NODE_ENV!=="production"&&(On=function(t,e,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var s=2;s<r;s++)n[s-2]=arguments[s];if(e===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(e.length<10||/^[s\W]*$/.test(e))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+e);if(!t){var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}});var Ts=On,Hs=Ts;Vs(Hs);function Vs(t){return t&&t.__esModule?t:{default:t}}function Te(t){return t.charAt(0)==="/"}function st(t,e){for(var n=e,r=n+1,s=t.length;r<s;n+=1,r+=1)t[n]=t[r];t.pop()}function Is(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],s=t&&Te(t),o=e&&Te(e),i=s||o;if(t&&Te(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var l=void 0;if(r.length){var c=r[r.length-1];l=c==="."||c===".."||c===""}else l=!1;for(var d=0,u=r.length;u>=0;u--){var h=r[u];h==="."?st(r,u):h===".."?(st(r,u),d++):d&&(st(r,u),d--)}if(!i)for(;d--;d)r.unshift("..");i&&r[0]!==""&&(!r[0]||!Te(r[0]))&&r.unshift("");var p=r.join("/");return l&&p.substr(-1)!=="/"&&(p+="/"),p}const Fs=Object.freeze(Object.defineProperty({__proto__:null,default:Is},Symbol.toStringTag,{value:"Module"})),Bs=yn(Fs);var Gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function Ie(t,e){if(t===e)return!0;if(t==null||e==null)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(c,d){return Ie(c,e[d])});var n=typeof t>"u"?"undefined":Gt(t),r=typeof e>"u"?"undefined":Gt(e);if(n!==r)return!1;if(n==="object"){var s=t.valueOf(),o=e.valueOf();if(s!==t||o!==e)return Ie(s,o);var i=Object.keys(t),l=Object.keys(e);return i.length!==l.length?!1:i.every(function(c){return Ie(t[c],e[c])})}return!1}const Ws=Object.freeze(Object.defineProperty({__proto__:null,default:Ie},Symbol.toStringTag,{value:"Module"})),_s=yn(Ws);var Zs=Bs;Pn(Zs);var qs=_s;Pn(qs);function Pn(t){return t&&t.__esModule?t:{default:t}}var pt=(t=>(t.scopedHash="scopedHash",t.hash="hash",t.browser="browser",t.memory="memory",t))(pt||{});const Ks=(t,e)=>{const n=`humany-${e}=([^&?]+)&?`,r=new RegExp(n,"i"),s=t.match(r);return s&&s[1]||"/"};qe(t=>{t.createCommand("routing",e=>n=>{const r={mode:n.mode};n.basePath&&(r.basePath=n.basePath),e.container.register("routingSettings",r)})});var se=(t=>(t.Cookie="cookie",t.Local="local",t.Session="session",t))(se||{}),Ot=(t=>(t.Tenant="tenant",t.Implementation="implementation",t.Widget="widget",t))(Ot||{}),K=(t=>(t.Necessary="necessary",t.Functional="functional",t.Analytical="analytical",t.Marketing="marketing",t))(K||{});const Ys=(t,e,n,r={})=>Xt(t,n).then(s=>(process.env.NODE_ENV!=="production"&&s&&H.warn(`createStorageWriter: Attempted to create storage writer using unallowed category.
350
- Key: ${e}
351
- Category: ${JSON.stringify(n)}
352
- Options: ${JSON.stringify(r)}`),o=>(At(t),Xt(t,n).then(i=>{if(i){process.env.NODE_ENV!=="production"&&H.warn(`storageWriter: Attempted to write to storage using unallowed category.
353
- Key: ${e}
354
- Category: ${JSON.stringify(n)}
355
- Value: ${JSON.stringify(o)}
356
- Options: ${JSON.stringify(r)}`);return}const{scope:l=Ot.Widget,medium:c=se.Session,duration:d}=r,u=Gs();return u[l][e]=Tn(o,n,d),c===se.Cookie?no(t,u):so(t,c,u)})))),Us=(t,e,n=se.Session)=>(At(t),typeof e>"u"?(process.env.NODE_ENV!=="production"&&H.warn("readStorage: Undefined key passed when reading storage. ",e,n),Promise.resolve(void 0)):n===se.Cookie?to(t).then(r=>yt(r,e)):ro(t,n).then(r=>yt(r,e))),ve=t=>!!Object.entries(t).filter(([e,n])=>typeof n<"u").length,ot=t=>Object.entries(t).filter(([e,n])=>typeof n<"u").forEach(([e,{value:n}])=>{typeof n>"u"&&delete t[e]}),An=(t,e)=>{const n={tenant:{...t.tenant,...e.tenant},implementation:{...t.implementation,...e.implementation},widget:{...t.widget,...e.widget}};return ot(n.tenant),ot(n.implementation),ot(n.widget),n},Js=t=>Object.entries(t).reduce((n,r)=>{const[s,o]=r;return Object.entries(o).forEach(i=>{const[l,{expiration:c}]=i;c&&n.push(c)}),n},[]).slice().sort((n,r)=>new Date(r).valueOf()-new Date(n).valueOf()).shift()||Dt(),Ge=t=>{const{name:e,implementation:{name:n,tenant:r}}=t.get("$widget");return[`humany_${r}`,`humany_${Wt(r+n)}`,`humany_${Wt(r+n+e)}`]},it=t=>{const e=new RegExp(`(?:^|;)\\s?${t}=(.*?)(?:;|$)`,"i"),n=document.cookie.match(e);return n&&n[1]&&JSON.parse(n[1])||void 0},at=(t,e,n)=>{const r=`${t}=${JSON.stringify(e).trim()}`,s=`expires=${new Date(n).toUTCString()}`,o="path=/",i="SameSite=None;Secure";return document.cookie=`${r}; ${s}; ${o}; ${i}`},Pt=t=>{const[e,n,r]=Ge(t),s=it(e)||{},o=it(n)||{},i=it(r)||{};return{tenant:s,implementation:o,widget:i}},Dn=(t,e)=>{const n=Pt(t),r=An(n,e),[s,o,i]=Ge(t),{tenant:l,implementation:c,widget:d}=r,u=Js(e),h=Dt({days:-1});at(s,l,ve(l)?u:h),at(o,c,ve(c)?u:h),at(i,d,ve(d)?u:h)},We=(t,e)=>{const[n,r,s]=Ge(t),o=e.getItem(n)||"{}",i=e.getItem(r)||"{}",l=e.getItem(s)||"{}";return{tenant:JSON.parse(o),implementation:JSON.parse(i),widget:JSON.parse(l)}},gt=(t,e,n)=>{const r=We(t,e),s=An(r,n),[o,i,l]=Ge(t),{tenant:c,implementation:d,widget:u}=s;ve(c)?e.setItem(o,JSON.stringify(c)):e.removeItem(o),ve(d)?e.setItem(i,JSON.stringify(d)):e.removeItem(i),ve(u)?e.setItem(l,JSON.stringify(u)):e.removeItem(l)},Gs=()=>({tenant:{},implementation:{},widget:{}}),Xs=t=>t?!!t&&new Date>new Date(t):!1,yt=(t,e)=>{const n=t.widget[e]||t.implementation[e]||t.tenant[e];return n==null?void 0:n.value},Tn=(t,e,n)=>n?{value:t,category:e,expiration:typeof n=="object"?Dt(n):n}:{value:t,category:e},Qs=(t,e)=>{const n=un(t);return Object.entries(n).forEach(([r,s])=>{Object.entries(s).forEach(([o,i])=>{const{expiration:l,category:c}=i;(Xs(l)||eo(e,c))&&(s[o]=Tn(void 0,c,l))})}),n},Xt=(t,e)=>Us(t,"storagePolicy",se.Cookie).then((n=[K.Necessary])=>!!e&&n.indexOf(e)===-1),eo=(t=[K.Necessary],e)=>!!e&&t.indexOf(e)===-1,At=t=>{const e=Pt(t),n=We(t,window.localStorage),r=We(t,sessionStorage),s=yt(e,"storagePolicy"),[o,i,l]=[e,n,r].map(c=>Qs(c,s));Dn(t,o),gt(t,window.localStorage,i),gt(t,window.sessionStorage,l)},Dt=(t={days:30})=>{const{days:e=0,hours:n=0,minutes:r=0,seconds:s=0}=t,o=new Date;return o.setTime(o.getTime()+n*60*60*1e3),o.setTime(o.getTime()+e*24*60*60*1e3),o.setTime(o.getTime()+r*60*1e3),o.setTime(o.getTime()+s*1e3),o.toISOString()},to=t=>Ee(document)(()=>Pt(t)),no=(t,e)=>Ee(document)(()=>Dn(t,e)),ro=(t,e)=>{const n=e===se.Local?window.localStorage:window.sessionStorage;return Ee(n)(()=>We(t,n))},so=(t,e,n)=>{const r=e===se.Local?window.localStorage:window.sessionStorage;return Ee(r)(()=>gt(t,r,n))};qe(t=>{t.createCommand("storage",e=>(n={})=>{const{consent:r}=n;if(typeof r<"u"){if(typeof r!="number"&&typeof r!="string"&&!Array.isArray(r)){process.env.NODE_ENV!=="production"&&H.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
357
- Passed consent: ${JSON.stringify(r)}`);return}if(Array.isArray(r)&&!r.every(o=>typeof o=="number"||typeof o=="string")){process.env.NODE_ENV!=="production"&&H.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
358
- Passed consent: ${JSON.stringify(r)}`);return}const s=[K.Necessary,K.Functional,K.Analytical,K.Marketing].filter((o,i,l)=>typeof r=="number"?r>i:typeof r=="string"?l.indexOf(r)+1>i:Array.isArray(r)?r.findIndex(c=>c===i+1||c===o)>-1:!0);return s.indexOf(K.Necessary)===-1&&(process.env.NODE_ENV!=="production"&&H.warn(`storagePolicyConfigurationApi: passed consent does not include category: '${K.Necessary}'. Consent has to atleast include the '${K.Necessary}' category.
359
- Passed consent: ${JSON.stringify(r)}`),s.unshift(K.Necessary)),Ys(e.container,"storagePolicy",K.Necessary,{medium:se.Cookie,scope:Ot.Tenant,duration:{days:365}}).then(o=>o(s)).then(()=>{At(e.container),e.events.dispatch("storage:policy-changed",s)})}})});const oo=f.forwardRef(({className:t,onClick:e=()=>{},name:n="",to:r="",params:s={},children:o,...i},l)=>{const c=En(),d=U();if(!c)return null;let u="";const h={onClick:e,className:j(t,"humany-route-link"),to:u,innerRef:l,...i,ref:null};if(n){if(!(c.routes||[]).find(m=>m.name===n))return process.env.NODE_ENV!=="production"&&H.warn(`Unable to create route. No route named "${n}" exist.`),a.jsx(Qe.Link,{...h,onClick:m=>{e(m),m.preventDefault(),process.env.NODE_ENV!=="production"&&H.warn(`Unable to navigate. No route named "${n}" exist.`)},children:o});const x=Object.keys(s).reduce((m,v)=>{const b=s[v];if(Array.isArray(b)){if(b.length===0)return m;m[v]=b.map(C=>typeof C=="string"?encodeURIComponent(C):C).join(",")}else m[v]=typeof b=="string"?encodeURIComponent(b):b;return m},{});try{u=c.generate(n,x||{})}catch{return a.jsx(Qe.Link,{...h,ref:h.innerRef,children:o})}u&&c.settings.mode&&c.settings.mode===pt.browser&&u[0]!=="/"&&(u=`/${u}`)}else if(r&&c.history)u=c.history.createHref({hash:"",pathname:r,search:"",state:void 0});else return process.env.NODE_ENV!=="production"&&H.warn('Unable to generate path for route link. Either specify route name or use the "to" prop.'),null;if(c.settings&&c.settings.mode===pt.scopedHash){const p=d.get("$widget").name;u=Ks(u,p)}return h.as?a.jsx(io,{...h,as:h.as,children:o}):a.jsx(Qe.Link,{...h,to:u,children:o})}),io=y.span``,we=f.forwardRef(({className:t,disabled:e=!1,role:n="link",tabIndex:r=0,onClick:s=()=>{},onKeyDown:o=()=>{},title:i,as:l,href:c,children:d,target:u,routeName:h,params:p,...g},x)=>{const m={title:i,disabled:e,role:n,as:l,tabIndex:r,className:j(t,"humany-link",[!!e,"humany-disabled"]),onClick:v=>{if(v.persist(),e){v.preventDefault();return}s(v)},onKeyDown:v=>{if(v.persist(),e){v.key!=="Tab"&&v.preventDefault();return}o(v)}};return h?a.jsx(ao,{name:h,params:p,...m,...W(g),ref:x,children:d}):a.jsx(co,{href:c,target:u,...m,...W(g),ref:x,children:d})}),ao=y(oo)`
360
- ${t=>t.disabled?`
361
- pointer-events: none;
362
- opacity: .7;
363
- `:"cursor: pointer;"}
364
- `,co=y.a`
365
- ${t=>t.disabled?`
366
- pointer-events: none;
367
- opacity: .7;
368
- `:"cursor: pointer;"}
369
- `,Hn=({visible:t,duration:e=500,children:n,onClick:r=()=>{},...s})=>{const o=f.useRef(),i=f.useCallback(l=>{l.target===o.current&&r(l)},[r]);return a.jsx(mr.CSSTransition,{in:t,className:"humany-overlay-transition",classNames:"humany-overlay-transition",unmountOnExit:!0,timeout:e,children:a.jsx(Rt,{children:a.jsx(lo,{className:"humany-overlay",duration:e,ref:o,onClick:i,...s,children:n})})})},lo=y.div`
370
- background: rgba(0, 0, 0, 0.6);
371
- min-width: 100%;
372
- min-height: 100%;
373
- position: fixed;
374
- top: 0;
375
- bottom: 0;
376
- right: 0;
377
- left: 0;
378
- display: flex;
379
- justify-content: center;
380
- align-items: center;
381
- z-index: 7;
382
-
383
- transition: ${t=>t.duration}ms;
384
- opacity: 0;
385
-
386
- &.humany-overlay-transition-enter {
387
- opacity: 0.1;
388
- }
389
- &.humany-overlay-transition-enter-active,
390
- &.humany-overlay-transition-enter-done,
391
- &.humany-overlay-transition-exit {
392
- opacity: 1;
393
- }
394
-
395
- &.humany-overlay-transition-exit-active,
396
- &.humany-overlay-transition-exit-done {
397
- opacity: 0;
398
- }
399
- `,uo=$.keyframes`
400
- 100% {
401
- transform: rotate(360deg);
402
- }
403
- `,ho=$.keyframes`
404
- 0% {
405
- stroke-dasharray: 1, 200;
406
- stroke-dashoffset: 0;
407
- }
408
- 50% {
409
- stroke-dasharray: 89, 200;
410
- stroke-dashoffset: -35px;
411
- }
412
- 100% {
413
- stroke-dasharray: 89, 200;
414
- stroke-dashoffset: -124px;
415
- }
416
- `,fo=y.svg`
417
- animation: ${uo} 2s linear infinite;
418
- height: 100%;
419
- transform-origin: center center;
420
- width: 100%;
421
- position: absolute;
422
- top: 0;
423
- bottom: 0;
424
- left: 0;
425
- right: 0;
426
- margin: auto;
427
- transition: 200ms ease-out opacity;
428
- `,mo=y.div`
429
- position: absolute;
430
- top: 0;
431
- bottom: 0;
432
- left: 0;
433
- right: 0;
434
- height: 100%;
435
- width: 100%;
436
- pointer-events: ${t=>t["data-loading"]?"all":"none"};
437
- display: flex;
438
- flex-direction: column;
439
- justify-content: center;
440
- transition: 200ms ease-out opacity;
441
- box-sizing: border-box;
442
- overflow: hidden;
443
- svg {
444
- opacity: ${t=>t["data-loading"]?"1":"0"};
445
- }
446
- `,po=y.div`
447
- position: relative;
448
- margin: 0 auto;
449
- width: 100px;
450
- &:before {
451
- content: '';
452
- display: block;
453
- padding-top: 100%;
454
- }
455
- `,go=y.circle`
456
- stroke-dasharray: 1, 200;
457
- stroke-dashoffset: 0;
458
- animation: ${ho} 1.5s ease-in-out infinite;
459
- stroke-linecap: round;
460
- stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
461
- stroke-width: 2px;
462
- `,yo=({className:t,loading:e=!1})=>a.jsx(mo,{className:j("humany-loader",t),"data-loading":e,children:a.jsx(po,{className:"humany-spinner",children:a.jsx(fo,{viewBox:"25 25 50 50",children:a.jsx(go,{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"2","stroke-miterlimit":"10"})})})}),xo=({zoomState:t,image:e,changeZoom:n,...r})=>{var x;const s=f.useRef(null),[o,i]=f.useState(!1),[l,c]=f.useState(!1),{width:d,height:u,...h}=r.style||{},p=f.useCallback(()=>{const m=s.current;if(m){const v=window.innerWidth/m.naturalWidth,b=window.innerHeight/m.naturalHeight,C=Math.min(v,b);return b>=1&&v>=1?1:C}return 1},[o,e.src]),g=f.useMemo(()=>{const m=s.current;if(m&&o){if(!l){c(!0);const v=p();n(v)}return m.naturalWidth>=m.naturalHeight?[`${t*m.naturalWidth}px`,"auto"]:["auto",`${t*m.naturalHeight}px`]}return null},[t,s,o,e.src]);return f.useEffect(()=>(i(!1),function(){c(!1)}),[e.src]),a.jsxs(a.Fragment,{children:[a.jsx(vo,{loading:!o}),a.jsx(bo,{onLoad:()=>{i(!0)},ref:s,imageSize:g,draggable:"false",...r,alt:((x=r.alt)==null?void 0:x.toString())||"",style:h,src:e.src,loaded:o}),a.jsx(wo,{})]})},vo=y(yo)`
463
- svg circle {
464
- stroke: #ffffff;
465
- }
466
- `,bo=y.img`
467
- transform: none;
468
-
469
- ${t=>t.imageSize&&$.css`
470
- width: ${t.imageSize[0]};
471
- height: ${t.imageSize[1]};
472
- display: inline-block;
473
- `}
474
- vertical-align: middle;
475
- position: relative;
476
- ${t=>!t.loaded&&"display:none;"}
477
- `,wo=y.div`
478
- height: 100%;
479
- display: inline-block;
480
- vertical-align: middle;
481
- `,Co=()=>{const t=f.useRef(),[e,n]=f.useState(!0),r=f.useCallback(()=>(e||n(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{n(!1)},3e3),()=>{t.current&&clearTimeout(t.current)}),[e,t]);return[e,r]},$o=({attrs:t,htmlBody:e})=>{var Oe;const n=je("Escape"),r=je("ArrowLeft"),s=je("ArrowRight"),[o,i]=f.useState(1),[l,c]=f.useState({top:0,left:0,x:0,y:0}),[d,u]=f.useState(!1),[h,p]=Co(),[g,x]=f.useState(null),[m,v]=f.useState(null),b=f.useRef(null),C=f.useRef(null),N=f.useRef(null),S=f.useRef(null),R=f.useRef(null),[O,I]=f.useState(null);f.useEffect(()=>{n&&x(null)},[n]),f.useEffect(()=>{i(1)},[g]),f.useEffect(()=>{var F,te;if(g===null||C.current===null)return;const k=C.current.firstElementChild,M=(F=N.current)==null?void 0:F.querySelector(".nav-left"),A=(te=N.current)==null?void 0:te.querySelector(".nav-right");if(m==="Right")me&&A?A.focus():ie&&M&&M.focus();else if(m==="Left")ie&&M?M.focus():me&&A&&A.focus();else{if(!k)return;k.focus()}},[g,C,N,m]),f.useEffect(()=>{if(r){if(ie)return fe()}else if(s&&me)return q()},[r,s]),f.useEffect(()=>{var M,A;const k=((A=(M=R.current)==null?void 0:M.style)==null?void 0:A.float)||"";(k==="left"||k==="right")&&I(k)},[]);const T=f.useMemo(()=>{const k=document.createElement("div");k.innerHTML=e||"";const M=k.getElementsByTagName("img");return Array.from(M).reduce((F,te)=>{const ae=te.getAttribute("src");if(ae){const pe={src:ae};F.push(pe)}return F},[])},[e]),E=f.useCallback(()=>{const{src:k}=t;if(k){const M=T.findIndex((A,F)=>A.src===k);x(M)}},[T,t]),L=f.useCallback(k=>{x(null)},[]),z=f.useCallback(k=>{i(k?o+o*.25:o-o*.25)},[i,o]),P=f.useCallback(()=>{if(g!==null){const{src:k}=T[g];k&&window.open(k,"_self")}},[T,g]),B=f.useCallback(k=>{const M=S.current;M&&(c({top:M.scrollTop,left:M.scrollLeft,x:k.clientX,y:k.clientY}),u(!0))},[S]),Q=f.useCallback(k=>{const M=S.current;if(M&&d){const A=k.clientX-l.x,F=k.clientY-l.y;M.scrollTop=l.top-F,M.scrollLeft=l.left-A}},[d,l]),ee=k=>{k.preventDefault(),u(!1)},oe=f.useMemo(()=>{if(S.current){const k=S.current.getElementsByTagName("img");if(k&&k.length){const M=k[0];return M.width>window.innerWidth||M.height>window.innerHeight}}return!1},[S,o]),fe=()=>{g!==null&&(v("Left"),x(g-1))},q=()=>{g!==null&&(v("Right"),x(g+1))},ie=g!==null&&g>0&&T.length>1,me=g!==null&&T.length-1>g;return a.jsxs(a.Fragment,{children:[a.jsx(Hn,{visible:g!==null,onClick:L,children:a.jsxs(Ro,{onMouseDown:()=>p(),onMouseMove:()=>p(),onTouchStart:()=>p(),onKeyDown:()=>p(),children:[a.jsx(zo,{show:h.toString(),children:a.jsx(Eo,{ref:C,buttons:[{id:"download",onClick:P,icon:"download",ariaLabel:"Download image"},{id:"lightbox-close",onClick:()=>x(null),icon:"lightbox-close",ariaLabel:"Close"}]})}),a.jsx(Po,{scrolling:d.toString(),isDraggable:oe.toString(),ref:S,onMouseMove:Q,onMouseDown:B,onMouseUp:ee,children:g!==null&&a.jsx(xo,{changeZoom:k=>{i(k)},zoomState:o,...t,style:{...t.style||{},float:"none"},image:T[g]})}),a.jsx(Lo,{ref:N,show:h.toString(),buttons:[{id:"previous",onClick:fe,icon:"caret-left",circle:!0,show:ie,className:"nav-left",ariaLabel:"Navigate to previous image"},{id:"next",onClick:q,icon:"caret-right",circle:!0,show:me,className:"nav-right",ariaLabel:"Navigate to next image"}]}),a.jsxs(Oo,{show:h.toString(),children:[a.jsx(No,{buttons:[{id:"zoom-out",onClick:()=>z(!1),icon:"zoom-out",ariaLabel:"Zoom out"},{id:"zoom-in",onClick:()=>z(!0),icon:"zoom-in",ariaLabel:"Zoom in"}]}),a.jsxs(Mo,{variant:"span",children:[Math.trunc(o*100),"%"]})]})]})}),a.jsx(ko,{ref:b,onClick:E,onKeyDown:k=>{k.key==="Enter"&&(k.preventDefault(),E())},alignment:O,tabIndex:0,children:a.jsx(Ao,{...t,alt:((Oe=t.alt)==null?void 0:Oe.toString())||"",ref:R})})]})},Tt=f.forwardRef(({show:t="true",buttons:e,className:n},r)=>a.jsx(jo,{ref:r,show:t,className:j("humany-button-set",n),children:e.map(({id:s,circle:o=!1,show:i=!0,ariaLabel:l,onClick:c,icon:d,className:u},h)=>a.jsx(So,{circle:o.toString(),onClick:c,tabIndex:i?void 0:-1,show:i.toString(),icon:d,className:u,"aria-label":l,children:a.jsx(_,{size:24,symbol:{type:"Svg",content:d}})},s+h.toString()))})),Vn=y.div`
482
- transition: opacity 0.3s ease 0s;
483
- z-index: 5;
484
- ${t=>t.show==="true"?"opacity: 1;":$.css`
485
- opacity: 0;
486
- pointer-events: none;
487
- `}
488
- `,ko=y(we)`
489
- display: inline-block !important;
490
-
491
- ${t=>(t.alignment==="right"||t.alignment==="left")&&$.css`
492
- float: ${t.alignment};
493
- `}
494
- `,jo=y(Vn)`
495
- position: fixed;
496
- display: flex;
497
- gap: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
498
- `,xt="39px",So=y(Y)`
499
- width: ${xt};
500
- height: ${xt};
501
- display: flex;
502
- justify-content: center;
503
- align-items: center;
504
-
505
- ${t=>t.icon==="caret-left"&&$.css`
506
- svg {
507
- position: relative;
508
- left: -2px;
509
- }
510
- `}
511
-
512
- ${t=>{var e;return t.circle==="true"?$.css`
513
- background-color: #ffffff;
514
- border-radius: 50%;
515
-
516
- svg {
517
- path,
518
- line {
519
- stroke: ${(e=t.theme.colors)==null?void 0:e.text};
520
- }
521
- }
522
-
523
- &:focus-visible {
524
- ${V(t)}
525
- outline-color: #ffffff;
526
- background-color: transparent;
527
-
528
- svg {
529
- path,
530
- line {
531
- stroke: #ffffff;
532
- }
533
- }
534
- }
535
- `:$.css`
536
- svg {
537
- path,
538
- line {
539
- stroke: #ffffff;
540
- }
541
- }
542
- &:focus {
543
- outline-color: #ffffff;
544
- }
545
- &:focus-visible {
546
- ${V(t)}
547
- }
548
- `}}
549
-
550
- ${t=>t.show==="true"?$.css`
551
- opacity: 0.8;
552
- transition: opacity 0.3s ease 0s;
553
- &:hover {
554
- opacity: 1;
555
- }
556
- `:$.css`
557
- opacity: 0;
558
- pointer-events: none;
559
- `}
560
- `,Eo=y(Tt)`
561
- top: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
562
- right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
563
- `,No=y(Tt)`
564
- bottom: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
565
- width: 100%;
566
- align-items: center;
567
- justify-content: center;
568
- `,Lo=y(Tt)`
569
- display: block;
570
- button {
571
- position: fixed;
572
- top: calc(50% - calc(${xt} / 2));
573
- &:first-child {
574
- left: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
575
- }
576
- &:last-child {
577
- right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
578
- }
579
- }
580
- `,Mo=y(Re)`
581
- position: fixed;
582
- bottom: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
583
- right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
584
- color: #ffffff;
585
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.medium}};
586
- font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
587
- `,In=y(Vn)`
588
- position: absolute;
589
- width: 100vw;
590
- height: 88px;
591
- left: 0px;
592
- z-index: 5;
593
- `,Ro=y.div`
594
- width: 100%;
595
- `,zo=y(In)`
596
- top: 0px;
597
- background-image: linear-gradient(
598
- to bottom,
599
- rgb(34, 34, 34, 0.8),
600
- rgba(34, 34, 34, 0)
601
- );
602
- `,Oo=y(In)`
603
- bottom: 0px;
604
- background-image: linear-gradient(
605
- to top,
606
- rgb(34, 34, 34, 0.8),
607
- rgba(34, 34, 34, 0)
608
- );
609
- `,Po=y.div`
610
- width: 100%;
611
- height: 100vh;
612
- overflow: auto;
613
- text-align: center;
614
- vertical-align: middle;
615
- white-space: nowrap;
616
- justify-content: center;
617
- cursor: ${t=>t.isDraggable==="true"?t.scrolling==="true"?"grabbing":"grab":"auto"};
618
- `,Ao=y.img`
619
- cursor: pointer;
620
- `,Do=f.forwardRef(({className:t,children:e,trigger:n,onOverlayClick:r=()=>{},close:s=!1,...o},i)=>{const[l,c]=Ls(),[d,u]=Es(!0),h=f.useRef(),p=f.useRef(Ze()),g=je("Escape");f.useEffect(()=>{(g||s)&&c(!1)},[g,s]),f.useEffect(()=>{l&&h.current&&h.current.focus()},[l,h.current]),Nt("router:changed",()=>{c(!1)});const x=f.useCallback(v=>{c(!1),r(v)},[r,c]);f.useImperativeHandle(i,()=>({close(){c(!1)}}));const m=f.useCallback(()=>Nn(p.current,()=>{c(!1)}),[p.current]);return a.jsxs(a.Fragment,{children:[a.jsx(Hn,{visible:l,onClick:x,children:a.jsxs(To,{className:j(t,"humany-modal",`humany-modal-${p.current}`),css:d,tabIndex:-1,...o,ref:u,children:[a.jsx(zn,{onClick:()=>c(!1),tabIndex:0,ref:h,children:a.jsx(_,{symbol:{type:"Svg",content:"close"}})}),e]})}),f.cloneElement(n,{onClick:v=>{c(),m()}})]})}),To=y.div`
621
- font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
622
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
623
- position: relative;
624
- max-width: 50%;
625
- min-width: 200px;
626
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
627
- ${t=>Ln(t)}
628
- ${t=>t.css&&t.css}
629
- outline: none;
630
- `,Ho=({className:t,trigger:e,header:n="",text:r="",onCancel:s=()=>{},onConfirm:o=()=>{},cancelLabel:i="",confirmLabel:l=""})=>{const c=f.useRef(),d=f.useCallback(()=>{var h;s(),(h=c==null?void 0:c.current)==null||h.close()},[s]),u=f.useCallback(()=>{var h;o(),(h=c==null?void 0:c.current)==null||h.close()},[o]);return a.jsxs(Vo,{className:t,trigger:e,ref:c,onOverlayClick:d,children:[n&&a.jsx(re,{children:n}),r&&a.jsx(re,{children:r}),l&&a.jsx(Io,{onClick:u,children:l}),i&&a.jsx(Fo,{onClick:d,children:i})]})},Vo=y(Do)`
631
- display: block;
632
-
633
- span {
634
- display: block;
635
- margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
636
-
637
- &:first-of-type:not(:only-of-type) {
638
- font-weight: 700;
639
- margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
640
- }
641
- }
642
- `,Io=y(Y)`
643
- display: inline-block;
644
- min-width: 50px;
645
- ${t=>{var e,n;return`padding: ${(e=t.theme.sizes)==null?void 0:e.small} ${(n=t.theme.sizes)==null?void 0:n.normal};`}}
646
- ${t=>t.theme.borderRadius&&`border-radius: ${t.theme.borderRadius};`}
647
- color: #FFFFFF;
648
- background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
649
- border: 1px solid ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
650
-
651
- margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0 0;
652
-
653
- &:focus {
654
- background-color: transparent;
655
- }
656
-
657
- &:focus-visible {
658
- ${V}
659
- }
660
- `,Fo=y(Y)`
661
- display: inline-block;
662
- min-width: 50px;
663
- ${t=>{var e,n;return`padding: ${(e=t.theme.sizes)==null?void 0:e.small} ${(n=t.theme.sizes)==null?void 0:n.normal};`}}
664
- ${t=>t.theme.borderRadius&&`border-radius: ${t.theme.borderRadius};`}
665
- background-color: transparent;
666
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
667
- border: 1px solid ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
668
-
669
- &:focus-visible {
670
- ${V};
671
- }
672
- `;y.div`
673
- display: flex;
674
- flex-wrap: wrap;
675
- `;y.div`
676
- ${t=>X(t)("h2",$.css`
677
- padding: 0;
678
- margin: 0;
679
- color: gray;
680
- font-size: 7em;
681
- `)}
682
- `;y.div`
683
- margin-left: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
684
-
685
- ${t=>{var e;return X(t)("h3",$.css`
686
- text-transform: uppercase;
687
- font-size: ${(e=t.theme.fonts)==null?void 0:e.normal};
688
- `)}}
689
-
690
- a {
691
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.link}};
692
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
693
- }
694
- `;y.div`
695
- margin-top: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
696
- min-width: 100%;
697
-
698
- span {
699
- font-weight: bold;
700
- }
701
- `;const vt=f.forwardRef(({className:t,description:e,text:n,children:r,...s},o)=>a.jsxs(we,{className:j(t,"humany-text-link"),...s,ref:o,children:[r,a.jsx(de,{children:n}),e?a.jsx(Je,{html:e,className:"humany-description"}):null]}));var Fn=(t=>(t.HH_MM="hh:mm",t.YYYY_MM_DD="yyyy-mm-dd",t.YYYY_MM_DD_HH_MM="yyyy-mm-dd hh:mm",t))(Fn||{});const Bn=({className:t="",format:e="hh:mm",timestamp:n})=>a.jsx("span",{className:j(t,"humany-timestamp"),children:Bo(n,e)}),Qt=t=>`0${t}`.slice(-2);function Bo(t,e){const n=new Date(t),r=n.toTimeString().split(" ")[0].split(":"),s=r.length>1?`${r[0]}:${r[1]}`:r[0],o=n.getFullYear(),i=n.getMonth()+1,l=n.getDate(),c=`${o}-${Qt(i)}-${Qt(l)}`;return e==="yyyy-mm-dd"?c:e==="hh:mm"?s:`${c} ${s}`}y.div`
702
- display: flex;
703
- align-items: center;
704
- `;y.div`
705
- color: #ffffff;
706
- background: #161616;
707
- border-radius: ${t=>t.theme.borderRadius};
708
- padding: calc(${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} * 2);
709
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
710
- font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
711
- position: absolute;
712
- z-index: 10;
713
-
714
- a {
715
- color: ${t=>t.color?t.color:"inherit"};
716
- text-decoration: none;
717
- }
718
-
719
- i,
720
- svg {
721
- margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
722
- }
723
-
724
- ${t=>{let e="";return t.y>0?e+=`top: calc(2px + ${t.y||"0"}px);`:e+="bottom: 2px;",t.x>0?e+=`right: calc(2px + ${t.x||"0"}px);`:e+="left: 2px;",e}};
725
- `;const Wo=f.forwardRef(({className:t,children:e,onClick:n=()=>{},widgetName:r,activationOptions:s,...o},i)=>{const l=U(),c=()=>{const{implementation:h}=l.get("$widget");return h.widgets.get(r)};f.useEffect(()=>{const h=c();return h==null||h.activate(s).then(()=>h.invoke("attach")),()=>{h==null||h.deactivate()}},[r]);const d=h=>{const p=c(),g=h.currentTarget;if(p){const x=()=>{p.invoke("renderState").then(m=>m===kn.open?p.invoke("close"):p.invoke("open")).then(()=>{p.events.subscribeOnce("widget:area-rendered",(m,v)=>{l.get("widgetDOMElement")&&p.events.dispatch("widget:modal-opened",{name:p.name,ref:g})})})};p.state===bn.Deactivated?p.activate(s).then(()=>p.invoke("attach")).then(x):x()}},u=h=>{h.key==="Enter"&&(h.preventDefault(),d(h))};return a.jsx(we,{className:j(t,"humany-widget-link"),onKeyDown:u,onClick:h=>{n(h),d(h)},...o,ref:i,children:e})});f.forwardRef(({portalId:t="humany-widget-overlay-portal",className:e,children:n},r)=>{const s=U(),o=f.useMemo(()=>{if(!s)return null;const i=s.get("widgetDOMElement");return!i||!i.childElementCount?null:i.children[0]},[s]);return o?a.jsx(Rt,{elementId:t,parent:o,children:a.jsx(_o,{className:j("humany-widget-overlay-outlet",e),ref:r,children:n})}):null});const _o=y.div`
726
- background-color: #ffffff;
727
- position: absolute;
728
- top: 0;
729
- left: 0;
730
- bottom: 0;
731
- right: 0;
732
- z-index: 10;
733
- width: 100%;
734
- height: 100%;
735
- `;function Zo(t,e){return e["ui:order"]?e["ui:order"]:t.properties?Object.keys(t.properties):[]}function en(t,e){return typeof t>"u"?e:t}const qo=["properties","isValid","evaluate","data"];function Wn(t,e,n={},r,s){const o={name:t,parent:s,path:s&&s.path?`${s.path}.${t}`:t,ui:{},data:{},children:[]};o.isValid=en(e.isValid,!0),o.evaluate=en(e.evaluate,!1),e.properties||(o.value=r),Object.keys(e).filter(l=>qo.indexOf(l)===-1&&l.indexOf(":")===-1).forEach(l=>{o[l]=e[l]}),Object.keys(n).filter(l=>l.length>=3&&l.substr(0,3)==="ui:").forEach(l=>{const c=l.substr(3);o.ui[c]=n[l]}),typeof r=="object"&&Object.keys(r).filter(l=>l.length>=3&&l.substr(0,5)==="data:").forEach(l=>{const c=l.substr(3);o.data[c]=r[l]});const i=Zo(e,n);return o.children=i.map(l=>{const c=e.properties[l],d=n[l],u=r&&r[l];return Wn(l,c,d,u,o)}),o}function Ht(t){let e=[];return t.forEach(n=>{e.push(n),e=e.concat(Ht(n.children))}),e}function _n(t,e){const n=Ht(t.children).filter(r=>r.path===e);return n.length>0?n[0]:null}function Ko(t){const e=t.split(".");return e[e.length-1]}function Yo(t,e){let n=_n(t,e);const r=[];for(;n;)r.push(n),n=n.parent;return r}class ct{constructor(){w(this,"tree")}load(e,n,r){this.tree=Wn(e.id||"root",e,n,r,null)}getErrors(){return Ht(this.tree.children).filter(e=>e.ui.error).map(e=>e.ui.error)}isDisabled(e){return Yo(this.tree,e).filter(n=>n.ui&&n.ui.disabled).length>0}isRequired(e){return(_n(this.tree,e).parent.required||[]).indexOf(Ko(e))>-1}}const Uo=t=>{switch(t){case"object":return Di;case"string":return ra;case"number":return Qn;case"submit":return na;case"button":return yi;default:return null}},Jo=t=>{const e=t.ui.component;return e==="DropDownList"?Pi:e==="Group"?Ki:e==="Textarea"?sa:e==="PhoneNumber"?Ui:e==="Number"?Qn:e==="CheckboxList"?xi:e==="RadioButtonList"?ea:e==="Password"?Yi:e==="Email"?Ai:e==="Agreement"?pi:e==="Hidden"?Xn:e==="File"?Fi:e==="AntiSpam"?gi:e==="GenericDiv"?qi:e==="Date"?zi:Uo(t.type)},Go=t=>{const e=t.split(".");return e.length>1?`${e.slice(0,e.length-1).join(".")}.data:options.${e[e.length-1]}`:"data:options"},Xo=t=>{let e=t.replace(new RegExp("\\.","g"),"$");return e=dn(e),`humany-${e}`},bt=(t,e,n)=>{const r=t||{},s=e.split("."),o=s[0];return s.length>1?r[o]=bt(r[o],s.slice(1).join("."),n):r[o]=n,r},Qo=({errors:t,className:e})=>{const n=U(),r=f.useRef(null),s=Ne(),o=()=>{r.current&&typeof r.current.scrollIntoView=="function"&&(r.current.scrollIntoView({behavior:"smooth"}),r.current.focus())};return f.useEffect(()=>{o();const{events:i}=n.get("$widget");return i.subscribe("form:validated",(c,d)=>{o()})},[]),a.jsxs(ei,{ref:r,role:"alert",tabIndex:-1,className:j(e,"humany-form-validation-summary"),children:[s&&s.validationHeader&&a.jsx(Re,{variant:"h3",children:s.validationHeader}),a.jsx(ti,{items:t,renderItem:i=>a.jsxs("li",{children:["- ",i]},i)})]})},ei=y.div`
736
- background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
737
- color: #ffffff;
738
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
739
- margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0;
740
- border-radius: ${t=>t.theme.borderRadius};
741
-
742
- ${t=>{var e,n;return X(t)("h3",$.css`
743
- margin: 0 0 ${(e=t.theme.sizes)==null?void 0:e.normal} 0;
744
- font-size: ${(n=t.theme.fonts)==null?void 0:n.normal};
745
- `)}}
746
- `,ti=y(be)`
747
- ${Le}
748
- li {
749
- font-weight: 300;
750
- }
751
-
752
- > li {
753
- white-space: normal;
754
- }
755
- `,Zn=f.createContext(()=>{}),ni=({schema:t})=>{const e=t.getErrors();return e.length>0?a.jsx(Qo,{errors:e}):null},qn=({elementDefinitions:t,level:e=0})=>a.jsx("div",{className:`humany-form-level humany-form-level-${e}`,children:t.filter(n=>!n.ui.hidden).map(n=>a.jsx(ri,{elementDefinition:n,children:a.jsx(qn,{elementDefinitions:n.children,level:e+1})},n.actionKey||n.id))}),ri=({elementDefinition:t,children:e})=>{const n=f.useContext(Zn),r=Jo(t),s=n(t);return!r||!s||typeof s.id>"u"?null:a.jsx(r,{...s,children:e},s.id)},si=({className:t="",onChange:e=()=>{},autoFocus:n,schema:r,layout:s,data:o=null})=>{const i=f.useRef(null),l=Ne(),[c,d]=f.useState(new ct);f.useEffect(()=>{if(i.current&&n){const m=i.current.querySelectorAll("input,select");m&&m.length&&m[0].focus()}},[i.current]),f.useEffect(()=>{const m=new ct;m.load(r,s,o),d(m)},[r,s,o,l]);const u=f.useCallback((m,v,b)=>{const C=m.substr(m.indexOf(".")+1);let N=o;if(typeof v<"u"){N=bt(o,C,v),N=bt(o,Go(C),b);const S=new ct;S.load(r,s,N),d(S)}return N},[c,r,s,o]),h=f.useCallback((m,v,b)=>{if(!c.isDisabled(m.path)){const C=u(m.path,v,b);if(m.evaluate)return e(m.actionKey,C)}return!1},[c,u,e]),p=f.useCallback(m=>{const v=Xo(m.path),b={id:v,title:m.title,required:c.isRequired(m.path),description:m.ui.description,placeholder:m.ui.placeholder,disabled:c.isDisabled(m.path),value:m.value,prompt:(C,N)=>h(m,C,N),ui:m.ui,error:!m.isValid,accessibility:{...m.ui.error&&{"aria-describedby":`${v}_error`}}};if(m.enum||m.type==="array"){const C=m.ui.enumNames,N=m.enum||m.items.enum;b.items=N.map((S,R)=>{const O=C&&C.length>=R?C[R]:S;return{value:S,label:O}})}return b},[c,h]),g=c.tree;if(!c||!g)return null;const x=g.children;return a.jsx(Zn.Provider,{value:p,children:a.jsxs(oi,{role:"form",className:j(t,"humany-form",`humany-form-${g.id}`),ref:i,children:[a.jsx(ni,{schema:c}),a.jsx(qn,{elementDefinitions:x})]})})},oi=y.div`
756
- textarea:focus-visible,
757
- input:focus-visible,
758
- select:focus-visible {
759
- ${V}
760
- }
761
- button:focus-visible {
762
- ${V}
763
- background-color: transparent;
764
- }
765
- `,Kn=({id:t,text:e="",className:n="",onChange:r=()=>{},disabled:s,...o})=>a.jsxs(ii,{id:t,"data-disabled":!!s,children:[e,a.jsx(vn,{type:"checkbox",disabled:s,onChange:r,onEnter:i=>{r(i.currentTarget.value,!i.currentTarget.checked)},className:n,...o}),a.jsx(ai,{className:"check"})]}),ii=y.label`
766
- display: block;
767
- position: relative;
768
- padding-left: 35px;
769
- margin-bottom: 12px;
770
- cursor: pointer;
771
- user-select: none;
772
- font-weight: 300;
773
- white-space: normal;
774
- word-break: break-word;
775
-
776
- input {
777
- position: absolute;
778
- opacity: 0;
779
- cursor: pointer;
780
- height: 0;
781
- width: 0;
782
-
783
- &:checked {
784
- ~ .check {
785
- background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
786
- border: ${t=>t.theme.inputBorder};
787
-
788
- &:after {
789
- display: block;
790
- }
791
- }
792
- }
793
-
794
- &:focus-visible {
795
- ~ .check {
796
- ${V}
797
- }
798
- }
799
- }
800
-
801
- .check:after {
802
- content: '';
803
- position: absolute;
804
- display: none;
805
- }
806
- `,ai=y.span`
807
- position: absolute;
808
- top: 0;
809
- left: 0;
810
- height: 18px;
811
- width: 18px;
812
- background-color: #ffffff;
813
- border: ${t=>t.theme.inputBorder};
814
- border-radius: 3px;
815
-
816
- &:after {
817
- left: 6px;
818
- top: 3px;
819
- width: 4px;
820
- height: 9px;
821
- border: solid #ffffff;
822
- border-width: 0 2px 2px 0;
823
- transform: rotate(45deg);
824
- }
825
-
826
- && {
827
- box-sizing: content-box;
828
- }
829
- `,ci=({isRequired:t})=>t?a.jsx(hi,{children:"*"}):null,Z=({title:t,required:e,children:n,error:r,elementId:s="",description:o="",className:i="",ui:{component:l,error:c}={}})=>{const d=a.jsx(ci,{isRequired:e});return a.jsxs(li,{className:j(i,"humany-form-component"),"data-type":l,"data-error":r,children:[s.length?a.jsxs("label",{htmlFor:s,className:"humany-form-component-title",children:[t,d]}):a.jsxs(di,{className:"humany-form-component-title",children:[t,d]}),n,c&&a.jsxs(fi,{id:`${s}_error`,children:[a.jsx(_,{size:19,symbol:{type:"Svg",content:"alert"}}),a.jsx("span",{children:c})]}),o&&a.jsx(ui,{className:"humany-form-component-description",children:o})]})},li=y.div`
830
- ${t=>t["data-type"]==="AntiSpam"&&"display: none;"}
831
- > label {
832
- display: block;
833
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
834
- margin: 0 0 10px 0;
835
- font-weight: normal;
836
- }
837
- ${t=>{var e;return t["data-error"]&&$.css`
838
- > input,
839
- > textarea,
840
- > select {
841
- border-color: ${(e=t.theme.colors)==null?void 0:e.warning};
842
- }
843
- `}}
844
- &:not(:last-child) {
845
- margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}} 0;
846
- }
847
- label {
848
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
849
- }
850
- `,ui=y(re)`
851
- margin: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0 0 0;
852
- display: block;
853
- font-weight: 300;
854
- `,di=y(re)`
855
- display: block;
856
- font-size: 18px;
857
- margin: 0 0 10px 0;
858
- `,hi=y.strong`
859
- margin: 0 0 0 5px;
860
- display: inline-block;
861
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
862
- `,fi=y.div`
863
- && {
864
- margin: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0 0 0;
865
- }
866
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
867
- display: flex;
868
- align-items: center;
869
- font-weight: 300;
870
-
871
- svg {
872
- margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
873
-
874
- circle {
875
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
876
- }
877
- }
878
- `,mi=y(Z)`
879
- font-weight: 300;
880
-
881
- input {
882
- margin: 0 5px 0 0;
883
- cursor: pointer;
884
- vertical-align: middle;
885
- }
886
- a {
887
- text-decoration: none;
888
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.link}};
889
- }
890
- label {
891
- display: inline;
892
- margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
893
- }
894
- `,pi=({id:t,title:e="",value:n="",placeholder:r="",disabled:s,prompt:o,className:i="",ui:l,required:c,accessibility:d={},...u})=>{const h=l.linkText||e,p=l.link;return a.jsxs(mi,{title:e,elementId:t,required:c,className:j(i,"humany-form-component-agreement"),ui:l,id:t,disabled:s,value:n,prompt:o,...u,children:[a.jsx(Kn,{type:"checkbox",id:t,checked:!!n,disabled:s,required:c,onChange:(g,x)=>o(x),...d}),p?a.jsx(we,{title:h,"aria-label":h,href:p,target:"_blank",children:h}):null]})},gi=({id:t,disabled:e,prompt:n,accessibility:r={},className:s="",title:o="",placeholder:i="",value:l="",...c})=>a.jsx(Z,{title:o||"",elementId:t,className:j(s,"humany-form-component-anti-spam"),id:t,disabled:e,value:l,prompt:n,...c,children:a.jsx("input",{id:t,type:"text",defaultValue:l.toString(),placeholder:i,disabled:e,onChange:d=>{n(d.target.value)},...r})}),yi=({value:t="",disabled:e,className:n="",ui:r})=>a.jsx(Y,{className:j(n,"humany-form-component-button"),disabled:e,onClick:s=>{typeof r.onClick=="function"&&r.onClick(s)},children:t}),Vt=t=>{var e,n,r;return $.css`
895
- border: ${t.theme.inputBorder};
896
- border-radius: ${t.theme.borderRadius};
897
- padding: ${(e=t.theme.sizes)==null?void 0:e.normal};
898
- width: 100%;
899
- font-size: 16px;
900
- box-sizing: border-box;
901
- &:focus {
902
- border-color: ${(n=t.theme.colors)==null?void 0:n.primary};
903
- }
904
- ${t["data-focused"]?`border-color: ${(r=t.theme.colors)==null?void 0:r.primary}`:""}
905
- `},Ce=y(Ds)`
906
- ${Vt}
907
- ${t=>t["data-type"]==="textarea"&&$.css`
908
- resize: vertical;
909
- min-height: 100px;
910
- `}
911
- `,Yn=y(be)`
912
- ${t=>Le(t)}
913
- li {
914
- display: flex;
915
- align-items: center;
916
- }
917
-
918
- input {
919
- margin: 0 5px 0 0;
920
- cursor: pointer;
921
- }
922
-
923
- label {
924
- cursor: pointer;
925
- }
926
- `,xi=({id:t,disabled:e,prompt:n,items:r,required:s,accessibility:o={},className:i="",title:l="",placeholder:c="",value:d="",...u})=>{const[h,p]=f.useState(d||[]),g=(m,v)=>{const b=h.concat([]),C=b.indexOf(m);v&&C===-1?b.push(m):C>-1&&b.splice(C,1),n(b),p(b)},x=`checkbox-${t}`;return a.jsx(Z,{title:l||"",elementId:t,required:s,className:j(i,"humany-form-component-checkbox-list"),id:t,disabled:e,value:d,prompt:n,...u,children:a.jsx(Yn,{items:r,renderItem:m=>{const v=`${t}-${m.value}`;return a.jsx("li",{children:a.jsx(Kn,{id:v,name:x,value:m.value,disabled:e,checked:h.indexOf(m.value)>-1,onChange:g,htmlFor:v,text:m.label})},v)},...o})})},vi=({minuteInterval:t=15,dateHour:e="Hour",dateMinute:n="Minute",isToday:r,selectedTime:s,availableSessions:o,allowTimesBeforeNow:i,onTimePicked:l})=>{const c=f.useMemo(()=>s.minute,[s]),d=f.useMemo(()=>s.hour,[s]),u=f.useMemo(()=>{const g=new Date().getHours();return o.reduce((x,m)=>{let v=m.openingHour;const b=m.closingHour===0?24:m.closingHour;if(r&&m.openingHour&&m.closingHour&&m.closingHour>=g&&(i&&m.closingHour>=g?v=m.openingHour:v=m.openingHour>g?m.openingHour:g),v!==void 0&&typeof b<"u"){for(let C=0;C<b-v;C+=1){const N=v+C;x.push(N.toString())}m.closingMinutes&&m.closingMinutes>0&&x.push(b>=10?b.toString():`0${b}`)}return x},[])},[o,r,i]),h=f.useMemo(()=>{if(d===null)return[];let p=15;t&&(p=t>0&&t<60?t:15);let g=r&&d===new Date().getHours();i&&(g=!1);let x=0,m=60;o.length>0&&o.forEach(b=>{d===b.openingHour&&b.openingMinutes&&(x=b.openingMinutes),b.closingHour===d&&(b.closingMinutes||0)>0&&(m=b.closingMinutes||60)});const v=[];for(let b=0;b<(60-x)/p;b+=1){const C=x+b*p;if(C>=m)break;g&&C<new Date().getMinutes()||v.push(C.toString())}return v},[o,d,t,r,i]);return a.jsxs(bi,{className:"humany-date-picker-times",children:[a.jsxs(tn,{id:"hourList",value:(d==null?void 0:d.toString())||"",onChange:p=>{l({hour:+p.target.value,minute:null})},children:[a.jsx("option",{value:"",disabled:!0,children:e}),u.map(p=>a.jsx("option",{value:p,children:+p>=10?p:`0${p}`},`hour_${p}`))]}),a.jsx("span",{className:"humany-date-picker-times-delimiter",children:":"}),a.jsxs(tn,{id:"minuteList",value:(c==null?void 0:c.toString())||n,onChange:p=>{const g=+p.target.value;l({hour:d,minute:g})},disabled:d===null,children:[a.jsx("option",{value:n,disabled:!0,children:n}),h.map(p=>a.jsx("option",{value:p,children:+p>=10?p:`0${p}`},`minute_${p}`))]})]})},bi=y.div`
927
- margin-top: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
928
- display: flex;
929
- flex-direction: row;
930
- span {
931
- text-align: center;
932
- align-self: center;
933
- margin: 0 5px;
934
- font-size: 1.5em;
935
- }
936
- `,tn=y.select`
937
- ${t=>Vt(t)}
938
- font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
939
-
940
- option {
941
- font-weight: 300;
942
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
943
- }
944
- `,Un=t=>{const e=new Date(t),n=e.getDay(),r=e.getDate()-n+(n===0?-6:1);return new Date(e.setDate(r))},wi=t=>new Date(t.setDate(t.getDate()-t.getDay()+7)),Ci=(t,e)=>{const n=Un(t),r=wi(t),s=Intl.DateTimeFormat(e,{month:"long"}).format(n),o=n.getFullYear().toString();let i=s.charAt(0).toUpperCase()+s.slice(1);if(i=`${i} ${o}`,n.getMonth()!==r.getMonth()){const l=r.getFullYear().toString();let d=Intl.DateTimeFormat(e,{month:"long"}).format(r).replace(".","").trim();d=d.charAt(0).toUpperCase()+d.slice(1),i=`${i} / ${d} ${l}`}return i},G=t=>{const e=new Date(t);return e.setHours(0,0,0,0),e},nn=t=>{const e=Un(t),n=[];for(let r=0;r<7;r++){const s=new Date(e);s.setDate(s.getDate()+r),n[r]=G(s)}return n},Jn=(t,e)=>G(t).getTime()===G(e).getTime(),rn=t=>Jn(new Date,t),$i=({id:t,loading:e,availableHours:n=[],onDateChanged:r,minuteInterval:s=15,allowTimesBeforeNow:o=!0,language:i="sv"})=>{const{dateLoading:l="Loading",dateBack:c="Back",dateNext:d="Next",dateHour:u="Hour",dateMinute:h="Minute"}=Ne(),[p,g]=f.useState(),[x,m]=f.useState(nn(new Date)),[v,b]=f.useState({hour:null,minute:null}),C=E=>{g(E),b({hour:null,minute:null}),r(null)},N=f.useCallback(E=>{const L=new Date(x[0]);L.setDate(L.getDate()+7*E),m(nn(L))},[x]),S=f.useCallback(E=>{if(!n.length)return!0;const L=n.filter(P=>G(new Date(P.opening)).getTime()===E.getTime());if(!L.length)return!1;const z=G(new Date(L[0].opening));return L.reduce((P,B)=>{const{opening:Q,closing:ee}=B;return P||E.getTime()>=z.getTime()&&Q.getTime()!==ee.getTime()},!1)},[n]),R=f.useCallback(E=>{if(p&&Jn(p,E)){C(null);return}if(S(E)){const L=G(new Date(E));C(L)}else C(null)},[C,S,p]),O=f.useMemo(()=>Ci(new Date(x[0]),i),[x,i]),I=f.useMemo(()=>{if(!p)return[];const E=G(p);let L=[];if(!n.length&&o){const z=G(E),P=G(E);return[{openingHour:z.getHours(),openingMinutes:z.getMinutes(),closingHour:P.getHours(),closingMinutes:P.getMinutes()}]}else L=n&&n.length>0?n.filter(z=>G(new Date(z.opening)).getTime()===E.getTime()):[];return L.map(z=>({openingHour:z.opening.getHours(),openingMinutes:z.opening.getMinutes(),closingHour:z.closing.getHours(),closingMinutes:z.closing.getMinutes()}))},[p,n,o]),T=f.useMemo(()=>p?rn(p):!1,[p]);return a.jsx(ki,{id:t,className:"humany-date-picker",children:e?a.jsx("p",{children:l}):a.jsxs(a.Fragment,{children:[a.jsxs(ji,{className:"humany-date-picker-month",children:[a.jsx(Ri,{className:"humany-date-picker-back",title:c,"aria-label":c,onClick:()=>{N(-1)},children:a.jsx(he,{faIcon:"chevron-left"})}),a.jsx("span",{children:O}),a.jsx(Mi,{className:"humany-date-picker-forward",title:d,"aria-label":d,onClick:()=>{N(1)},children:a.jsx(he,{faIcon:"chevron-right"})})]}),a.jsx(Si,{className:"humany-date-picker-week",children:x.map(E=>a.jsxs(Ni,{className:"humany-date-picker-week-item",disabled:!S(E),onClick:L=>{L.preventDefault(),R(E)},children:[a.jsx(Li,{className:"humany-date-picker-week-item-day",children:Intl.DateTimeFormat(i,{weekday:"narrow"}).format(E)}),a.jsx(Ei,{className:"humany-date-picker-week-item-date","data-selected":!!p&&G(p).getTime()===E.getTime(),"data-current":rn(E),children:E.getDate()})]},E.getTime()))}),p&&a.jsx(vi,{minuteInterval:s,dateHour:u,dateMinute:h,isToday:T,allowTimesBeforeNow:o,selectedTime:v,availableSessions:I,onTimePicked:E=>{if(!p||(b(E),E.hour===null||E.minute===null))return;const L=new Date(p);L.setHours(E.hour||0),L.setMinutes(E.minute||0),r(L)}})]})})},ki=y.div`
945
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
946
- border: ${t=>t.theme.inputBorder};
947
- border-radius: ${t=>t.theme.borderRadius};
948
- `,ji=y.div`
949
- display: flex;
950
- flex-direction: row;
951
- width: 100%;
952
- justify-content: space-between;
953
- overflow: hidden;
954
- text-overflow: ellipsis;
955
- white-space: nowrap;
956
- margin-bottom: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
957
- `,Si=y.div`
958
- display: flex;
959
- flex-direction: row;
960
- width: 100%;
961
- justify-content: space-between;
962
- `,Ei=y.p`
963
- margin: 0;
964
- line-height: 2em;
965
- border: ${t=>t.theme.inputBorder};
966
- &:hover {
967
- background-color: rgba(0, 0, 0, 0.1);
968
- }
969
- ${t=>{var e;return t["data-current"]&&`border-color: ${(e=t.theme.colors)==null?void 0:e.link};`}}
970
- ${t=>{var e,n;return t["data-selected"]&&`
971
- background-color: ${(e=t.theme.colors)==null?void 0:e.link};
972
- color: #FFF;
973
- border-color: ${(n=t.theme.colors)==null?void 0:n.link}
974
- `}}
975
- `,Ni=y(Y)`
976
- flex: 1 0 0;
977
- text-align: center;
978
- margin-top: 5px;
979
- font-weight: bold;
980
- text-decoration: none;
981
- border-radius: 0;
982
- ${t=>t.disabled&&`
983
- pointer-events: none;
984
- opacity: .5;
985
- `}
986
- &:first-of-type > .humany-date-picker-week-item-date {
987
- border-top-left-radius: ${t=>t.theme.borderRadius};
988
- border-bottom-left-radius: ${t=>t.theme.borderRadius};
989
- }
990
- &:last-of-type > .humany-date-picker-week-item-date {
991
- border-top-right-radius: ${t=>t.theme.borderRadius};
992
- border-bottom-right-radius: ${t=>t.theme.borderRadius};
993
- }
994
- `,Li=y.p`
995
- margin-bottom: 5px;
996
- `,Mi=y(Y)`
997
- flex: 1 0 auto;
998
- align-self: flex-end;
999
- text-align: right;
1000
- `,Ri=y(Y)`
1001
- flex: 1 0 auto;
1002
- align-self: flex-start;
1003
- text-align: left;
1004
- `,zi=t=>{var h,p,g,x;const{id:e,disabled:n,prompt:r,className:s="",title:o="",placeholder:i="",value:l="",...c}=t,u=U().get("$settings");return a.jsx(Z,{title:o||"",elementId:e,className:j(s,"humany-form-component-date"),id:e,disabled:n,value:l,prompt:r,...c,children:a.jsx($i,{id:e,language:u.language,onDateChanged:m=>{r(m||"")},loading:(h=c.ui)==null?void 0:h.loading,minuteInterval:((p=c.ui)==null?void 0:p.minuteInterval)||15,availableHours:((g=c.ui)==null?void 0:g.availableHours)||[],allowTimesBeforeNow:typeof((x=c.ui)==null?void 0:x.allowTimesBeforeNow)=="boolean"?c.ui.allowTimesBeforeNow:!0})})},Oi=y.select`
1005
- ${t=>Vt(t)}
1006
- font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
1007
-
1008
- option {
1009
- font-weight: 300;
1010
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
1011
- }
1012
- `,Pi=({id:t,disabled:e=!1,prompt:n,items:r,required:s,accessibility:o={},className:i="",title:l="",placeholder:c="",value:d="",...u})=>{const[h,p]=f.useState(!1),g=f.useCallback(x=>{r.findIndex(m=>m.value===x)>-1?n(x):n("")},[r,n]);return a.jsx(Z,{title:l||"",elementId:t,required:s,className:j(i,"humany-form-component-drop-down-list"),id:t,disabled:e,value:d,prompt:n,...u,children:a.jsxs(Oi,{defaultValue:d.toString(),onChange:x=>g(x.target.value),disabled:e,"data-focused":h,required:s,onFocus:()=>p(!0),onBlur:()=>p(!1),...o,children:[a.jsx("option",{children:c}),r.map(x=>a.jsx("option",{value:x.value,children:x.label},x.value))]})})},Ai=({id:t,disabled:e,prompt:n,required:r,accessibility:s={},className:o="",title:i="",placeholder:l="",value:c="",...d})=>{const[u,h]=f.useState(!1);return a.jsx(Z,{elementId:t,title:i||"",required:r,className:j(o,"humany-form-component-email"),id:t,disabled:e,value:c,prompt:n,...d,children:a.jsx(Ce,{id:t,value:c.toString(),placeholder:l,disabled:e,"data-type":"email",type:"email","data-focused":u,required:r,onFocus:()=>h(!0),onBlur:()=>h(!1),onChange:p=>{n(p)},"aria-label":l,...s})})},Di=({children:t,ui:e,description:n="",title:r="",className:s=""})=>{const{multilineForm:o=!0,requiredDescriptionLabel:i}=Ne(),{component:l,hasRequiredChildren:c}=e;return a.jsxs(Ti,{className:j(s,"humany-form-component-fieldset"),"data-type":l,"data-multiline-form":o,children:[!!r.length&&a.jsx("legend",{children:r}),n&&a.jsx(de,{className:"humany-fieldset-description",children:n.split(`
1013
- `).map((d,u)=>a.jsxs(f.Fragment,{children:[d,a.jsx("br",{})]},u))}),c&&i&&a.jsx(de,{className:"humany-fieldset-required-description",children:i}),t]})},Ti=y.fieldset`
1014
- border: none;
1015
- margin: 0;
1016
- padding: 0;
1017
- white-space: normal;
1018
- legend {
1019
- display: block;
1020
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.medium}};
1021
- line-height: 29px;
1022
- margin: 0 0 15px 0;
1023
- font-weight: normal;
1024
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
1025
- }
1026
- > span {
1027
- margin: 15px 0 0 0;
1028
- display: block;
1029
- }
1030
- &:not(:last-child) {
1031
- margin: 0 0 15px 0;
1032
- }
1033
- ${t=>{var e;return t["data-type"]==="Name"&&t["data-multiline-form"]&&$.css`
1034
- > div {
1035
- display: grid;
1036
- grid-template-columns: repeat(2, 1fr);
1037
- grid-gap: ${(e=t.theme.sizes)==null?void 0:e.medium};
1038
- div {
1039
- margin: 0;
1040
- }
1041
- }
1042
- `}}
1043
- ${t=>{var e;return t["data-type"]==="Address"&&t["data-multiline-form"]&&$.css`
1044
- > div {
1045
- display: grid;
1046
- grid-template-columns: repeat(8, 1fr);
1047
- grid-gap: ${(e=t.theme.sizes)==null?void 0:e.medium};
1048
- div {
1049
- margin: 0;
1050
- &:nth-child(1) {
1051
- grid-column: span 6;
1052
- }
1053
- &:nth-child(2) {
1054
- grid-column: span 2;
1055
- }
1056
- &:nth-child(3) {
1057
- grid-column: span 3;
1058
- }
1059
- &:nth-child(4) {
1060
- grid-column: span 5;
1061
- }
1062
- }
1063
- }
1064
- `}}
1065
- `,Hi=t=>e=>{const n=Ne();return a.jsx(t,{componentInstanceProps:n,...e})},Vi=1e7,lt={fileName:null,fileSize:null,fileType:null,error:null},Ii=t=>!(t>Vi);class Gn extends f.Component{constructor(){super(...arguments);w(this,"state",lt);w(this,"reader");w(this,"input");w(this,"handleFileLoad",n=>{const r=this.reader.result;this.props.prompt(r,{fileName:this.state.fileName})});w(this,"handleFileChange",n=>{const r=this.input.files[0];if(r){if(!Ii(r.size)){const s=this.props.componentInstanceProps?this.props.componentInstanceProps.fileSizeErrorLabel:"Attached file exceeds maximum file size.";this.setState({...lt,error:s}),this.input.value=null,this.props.prompt("",{fileName:""});return}this.setState({...lt,fileName:r.name,fileSize:r.size,fileType:r.type},()=>{this.reader.readAsDataURL(r)})}})}componentDidMount(){this.reader=new FileReader,this.reader.addEventListener("load",this.handleFileLoad,!1)}componentWillUnmount(){this.reader.removeEventListener("load",this.handleFileLoad)}render(){const{id:n,required:r,disabled:s,accessibility:o={},className:i="",title:l="",placeholder:c="",value:d="",...u}=this.props,h=this.state.fileName?a.jsx(re,{children:this.state.fileName}):this.props.componentInstanceProps&&this.props.componentInstanceProps.fileUploadHeader?a.jsx("em",{children:this.props.componentInstanceProps.fileUploadHeader}):null;return a.jsxs(Bi,{elementId:n,title:l,required:r,className:j(i,"humany-form-component-file"),id:n,disabled:s,value:d,...u,children:[this.state.error&&a.jsx(_i,{className:"humany-file-error",children:this.state.error}),a.jsx(Wi,{id:n,type:"file",placeholder:c,"aria-label":c,disabled:s,ref:p=>{this.input=p},onChange:this.handleFileChange,...o}),a.jsx(Zi,{htmlFor:n,role:"button",children:l}),h]})}}w(Gn,"contextTypes",{texts:()=>null});const Fi=Hi(Gn),Bi=y(Z)`
1066
- font-weight: 300;
1067
- em {
1068
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
1069
- }
1070
- `,Wi=y.input`
1071
- width: 0px;
1072
- height: 0.1px;
1073
- opacity: 0;
1074
- overflow: hidden;
1075
- position: absolute;
1076
- z-index: -1;
1077
-
1078
- &:focus-visible + label {
1079
- ${V}
1080
- background-color: transparent;
1081
- }
1082
- `,_i=y.div`
1083
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
1084
- padding-bottom: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
1085
- `,Zi=y.label`
1086
- ${Lt}
1087
- && {
1088
- display: inline-block;
1089
- margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}} 0 0;
1090
- color: #ffffff;
1091
- }
1092
- background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1093
- min-width: 100px;
1094
- `,qi=({id:t,className:e})=>a.jsx("div",{id:t,className:e}),Ki=({children:t,className:e=""})=>a.jsx("div",{className:j(e,"humany-form-component-group"),children:t}),Xn=({value:t,prompt:e})=>a.jsx("input",{type:"hidden",value:t,onChange:n=>{e(n.target.value)}});Xn.defaultProps={className:"",title:"",description:"",placeholder:"",value:""};const Qn=({id:t,disabled:e,prompt:n,accessibility:r={},required:s,className:o="",title:i="",placeholder:l="",value:c="",...d})=>{const[u,h]=f.useState(!1);return a.jsx(Z,{elementId:t,title:i||"",required:s,className:j(o,"humany-form-component-number"),id:t,disabled:e,value:c,prompt:n,...d,children:a.jsx(Ce,{id:t,value:c,placeholder:l,"aria-label":l,disabled:e,required:s,"data-type":"number",type:"number","data-focused":u,onFocus:()=>h(!0),onBlur:()=>h(!1),onChange:p=>{n(p)},...r})})},Yi=({id:t,disabled:e,prompt:n,required:r,accessibility:s={},className:o="",title:i="",placeholder:l="",value:c="",...d})=>{const[u,h]=f.useState(!1);return a.jsx(Z,{title:i||"",elementId:t,required:r,className:j(o,"humany-form-component-password"),id:t,disabled:e,value:c,prompt:n,...d,children:a.jsx(Ce,{id:t,value:c,placeholder:l,"aria-label":l,disabled:e,type:"password","data-type":"password","data-focused":u,required:r,onFocus:()=>h(!0),onBlur:()=>h(!1),onChange:p=>{n(p)},...s})})},Ui=({id:t,disabled:e,prompt:n,ui:r={},required:s,className:o="",title:i="",placeholder:l="",value:c="",accessibility:d={},...u})=>{const h=(r&&r.options||[]).find(v=>v.selected),[p,g]=f.useState(!1),[x,m]=f.useState("");return a.jsx(Z,{elementId:t,title:i||"",className:j(o,"humany-form-component-phone-number"),ui:r,required:s,id:t,disabled:e,value:c,prompt:n,...u,children:a.jsxs(Ji,{className:"humany-form-component-phone-number-content",children:[h&&a.jsx("span",{children:h.title}),a.jsx(Ce,{id:t,value:x,type:"tel",placeholder:l,"aria-label":l,disabled:e,"data-type":"tel","data-focused":p,required:s,onFocus:()=>g(!0),onBlur:()=>g(!1),onChange:v=>{m(v),n(v&&v.length>0?`${h.value||""}${v}`:"")},pattern:"[0-9\\-\\s]*",...d})]})})},Ji=y.div`
1095
- display: flex;
1096
- align-items: center;
1097
- flex-flow: row nowrap;
1098
-
1099
- > span {
1100
- z-index: 3;
1101
- white-space: nowrap;
1102
- width: 100%;
1103
- padding-left: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
1104
- pointer-events: none;
1105
- color: rgba(0, 0, 0, 0.4);
1106
- }
1107
-
1108
- input {
1109
- flex: none;
1110
- margin-left: -100%;
1111
- text-indent: 50px;
1112
- }
1113
- `,Gi=({id:t,text:e,disabled:n,required:r,className:s="",onChange:o=()=>{},...i})=>a.jsxs(Xi,{id:t,"data-disabled":!!n,children:[e,a.jsx(vn,{required:r,type:"radio",disabled:n,className:s,onChange:o,...i}),a.jsx(Qi,{className:"check"})]}),Xi=y.label`
1114
- display: block;
1115
- position: relative;
1116
- padding-left: 35px;
1117
- margin-bottom: 12px;
1118
- cursor: pointer;
1119
- user-select: none;
1120
- font-weight: 300;
1121
- white-space: normal;
1122
- word-break: break-word;
1123
-
1124
- input {
1125
- position: absolute;
1126
- opacity: 0;
1127
- cursor: pointer;
1128
-
1129
- &:checked {
1130
- ~ .check {
1131
- background-color: #ffffff;
1132
- border: 1px solid ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1133
-
1134
- &:after {
1135
- display: block;
1136
- }
1137
- }
1138
- }
1139
-
1140
- &:focus-visible {
1141
- ~ .check {
1142
- ${V}
1143
- }
1144
- }
1145
- }
1146
- `,Qi=y.span`
1147
- position: absolute;
1148
- top: 0;
1149
- left: 0;
1150
- height: 18px;
1151
- width: 18px;
1152
- border-radius: 50%;
1153
- border: ${t=>t.theme.inputBorder};
1154
-
1155
- &:after {
1156
- content: '';
1157
- position: absolute;
1158
- display: none;
1159
- }
1160
-
1161
- &:after {
1162
- top: 5px;
1163
- left: 5px;
1164
- width: 8px;
1165
- height: 8px;
1166
- border-radius: 50%;
1167
- background: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1168
- }
1169
-
1170
- && {
1171
- box-sizing: content-box;
1172
- }
1173
- `,ea=({id:t,disabled:e,prompt:n,items:r,required:s,className:o="",title:i="",placeholder:l="",value:c="",accessibility:d={},...u})=>{const[h,p]=f.useState(c||""),g=m=>{p(m),n(m)},x=`radio-button-${t}`;return a.jsx(Z,{title:i||"",elementId:t,required:s,className:j(o,"humany-form-component-radio-button-list"),id:t,disabled:e,value:c,prompt:n,...u,children:a.jsx(Yn,{items:r,renderItem:m=>{const v=`${t}-${m.value}`;return a.jsx("li",{children:a.jsx(Gi,{id:v,name:x,value:m.value,disabled:e,required:s,checked:h===m.value,onChange:g,text:m.label})},v)},...d})})},ta=y(Y)`
1174
- ${Lt}
1175
- display: block;
1176
- background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1177
- color: #ffffff;
1178
- margin: 0 0 0 auto;
1179
- min-width: 100px;
1180
- `,na=({value:t="",disabled:e,prompt:n,className:r=""})=>a.jsx(ta,{className:j(r,"humany-form-component-submit"),disabled:e,onClick:()=>{n()},children:t}),ra=({id:t,disabled:e,prompt:n,className:r="",title:s="",placeholder:o="",value:i="",accessibility:l={},required:c,...d})=>{const[u,h]=f.useState(!1);return a.jsx(Z,{title:s||"",elementId:t,className:j(r,"humany-form-component-text"),required:c,id:t,disabled:e,value:i,prompt:n,...d,children:a.jsx(Ce,{id:t,value:i,placeholder:o,"aria-label":o,disabled:e,"data-type":"text","data-focused":u,onFocus:()=>h(!0),onBlur:()=>h(!1),onChange:p=>{n(p)},required:c,...l})})},sa=({id:t,disabled:e,prompt:n,required:r,className:s="",title:o="",placeholder:i="",value:l="",accessibility:c={},...d})=>{const[u,h]=f.useState(!1);return a.jsx(Z,{title:o||"",elementId:t,required:r,className:j(s,"humany-form-component-textarea"),id:t,disabled:e,value:l,prompt:n,...d,children:a.jsx(Ce,{id:t,defaultValue:l,placeholder:i,"aria-label":i,disabled:e,"data-type":"textarea",type:"textarea","data-focused":u,required:r,onFocus:()=>h(!0),onBlur:()=>h(!1),onChange:p=>{n(p)},...c})})},It=(t,e,n=!1)=>t.getManyAsync("matchingClient","router").then(r=>{const{formData:s}=new wt(e.body.form).export(n),{router:o,matchingClient:i}=r,{params:l}=o.getRouteData();return i.customRequest(`contactmethods/${e.id}${n?"/validatedwithpayload":""}`,"POST",{body:s,configuration:{guideId:e.body.guideId||l.guideId}})}),Ft=(t,e,n)=>It(t,e).then(r=>n?n(r):r).then(({ConfirmationText:r})=>r),$e=(t,e)=>It(t,e,!0).then(n=>({valid:n.Validation.IsValid,errors:n.Validation.Errors,errorTypes:n.Validation.ErrorTypes})),Bt=(t,e)=>It(t,e,!0).then(n=>le.fromLegacyForm(e.id,n.ContactMethod.Form).get()),ke=(t,e)=>t.getAsync("matchingClient").then(n=>{n.completeContactMethod(e.id)});function er(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"email.form",render:Promise.resolve().then(()=>require("./email-form-component-0320d88a.js")),onEvaluate:n=>Bt(t,n),onValidate:n=>$e(t,n),onSubmit:n=>Ft(t,n),onComplete:n=>ke(t,n)})})}const sn=(t,e,n)=>{const{url:r,width:s,height:o}=e,i=n||{},l=document.createElement("a");return l.href=r,l.search.replace("?","").split("&").forEach(c=>{const[d,u]=c.split("=");typeof u<"u"&&(i[d]=u)}),l.search=Object.keys(i).map(c=>`${c}=${i[c]}`).join("&"),window.open(l.href,t,`width=${s},height=${o}`),""};function tr(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"chat.popup",render:"email.form",handleClick:n=>{const{title:r,body:s}=n,{form:o,guideId:i,confirmationFallback:l,...c}=s;return o?()=>{}:d=>{d.preventDefault(),sn(r,c)}},onValidate:n=>$e(t,n),onComplete:n=>ke(t,n),onSubmit:n=>{const{title:r,body:s}=n,{form:o,guideId:i,confirmationFallback:l,...c}=s,d=new wt(o).export().values;return sn(r,c,d),l}})})}function nr(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"custom.freetext",render:Promise.resolve().then(()=>require("./free-text-component-02e4a06c.js"))})})}function rr(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"custom.link",render:Promise.resolve().then(()=>require("./link-component-a61eeafc.js"))})})}function sr(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"phone.text",render:Promise.resolve().then(()=>require("./phone-component-10862503.js"))})})}const oa=async(t,e)=>{const n=t.get(e.clientName);let{description:r,disabled:s,onClick:o}=e;if(n){const{handleClick:i,handleDescription:l,handleDisabled:c}=n;typeof i=="function"&&(o=await Promise.resolve(i(e))),typeof l=="function"&&(r=await Promise.resolve(l(e))),typeof c=="function"&&(s=await Promise.resolve(c(e)))}return Promise.resolve({...e,description:r,disabled:s,onClick:o})};class _e{constructor(e,n){w(this,"adapters",new Map);w(this,"subs",[]);if(this.container=e,this.componentPlatform=n,n){n.components().ofType("contact-list").select().actions.watch("contact-list.fetched",async(i,l)=>{const{contactMethods:c}=i;if(c){const d=Promise.all(c.map(u=>this.handleAdapters(u)));await Promise.resolve(d).then(u=>{i.contactMethods=u})}return l(i)});const s=n.components().ofType("guide").select();s.actions.watch("guide.fetched",async(i,l)=>{const{contactMethods:c}=i;if(c){const d=Promise.all(c.map(u=>this.handleAdapters(u)));await Promise.resolve(d).then(u=>{i.contactMethods=u})}return l(i)}),s.actions.watch("guide.handover",async(i,l)=>{const{handoverContactMethods:c}=i;if(c){const d=Promise.all(c.map(u=>this.handleAdapters(u)));await Promise.resolve(d).then(u=>{i.handoverContactMethods=u})}return l(i)}),n.components().ofType("contact-method").select().actions.watch("contact-method.fetched",async(i,l)=>{const{contactMethod:c}=i;return c?this.handleAdapters(c).then(d=>l({...i,contactMethod:d})):l(i)})}}static create(e){return mt.getInstance(e).then(n=>new _e(e,n))}handleAdapters(e){return oa(this.adapters,e)}static getInstance(e,n="contactMethods"){return Ee(e)(()=>e.getAsync(n).then(r=>{let s=r;return s||mt.getInstance(e).then(o=>(s=new _e(e,o),e.registerAsync(n,()=>s),s))}))}track(e={},n){const{events:r}=this.container.get("$widget");r.dispatch("tracking:service-client-response",{type:n,data:e})}complete(e){const{id:n,title:r,clientName:s,expanded:o,body:i}=e;this.track({contactMethod:{id:n,title:r,expanded:o,type:s},hasGuide:!!i.guideId},"contact-method-complete");const l=this.adapters.get(s);if(l&&l.onComplete)return l.onComplete(e)}evaluate(e){const{clientName:n}=e,r=this.adapters.get(n);return r&&r.onEvaluate?Promise.resolve(r.onEvaluate(e)):Promise.resolve(e.body.form)}validate(e){const{id:n,title:r,clientName:s}=e,o=this.adapters.get(s);return o&&o.onValidate?Promise.resolve(o.onValidate(e)).then(i=>{this.track({contactMethod:{id:n,title:r,type:s},isValid:i.valid},"contact-method-validate");const{events:l}=this.container.get("$widget");return l.dispatch("form:validated",{isValid:i.valid}),i}):Promise.resolve({valid:!0})}submit(e){const{clientName:n}=e,r=this.adapters.get(n);return r&&r.onSubmit?Promise.resolve(r.onSubmit(e)).then(s=>(this.complete(e),s)):Promise.resolve("")}create(e){const{clientName:n,render:r}=e;return this.adapters.set(n,{onValidate:s=>$e(this.container,s),onEvaluate:s=>Bt(this.container,s),onComplete:s=>ke(this.container,s),...e}),this.container.getAsync("componentResolver").then(s=>{typeof r=="string"?this.subs.push(s.registerAlias(n,r)):this.subs.push(s.registerComponent(n,f.lazy(()=>r)))})}dispose(){this.subs.forEach(e=>e())}}const ia=({title:t="",className:e,id:n,parent:r,connection:s,type:o,target:i,href:l,children:c,connectionKey:d})=>{const u={},{name:h,params:p}=Et();switch(o){case"default":case"guide":const{id:g,title:x}=r;let m=d||s;g!==n&&!d&&(m=void 0),u.routeName=h,u.params=Se({...p,guide:n,connection:m,uriName:ht(n===g?x:t)});break;case"link":u.href=l,u.target=i;break}return a.jsx(we,{className:j(e,"humany-dialog-link"),...u,children:c||a.jsxs(a.Fragment,{children:[o==="link"&&a.jsx(he,{faIcon:"link"}),a.jsx("span",{children:t})]})})};f.forwardRef(({className:t,dialog:e,...n},r)=>e.length?a.jsx(aa,{className:j(t,"humany-dialog"),items:e,renderItem:s=>a.jsx("li",{"data-dialog":s.connection,children:a.jsx(ia,{...s})},s.connection),...n,ref:r}):null);const aa=y(be)`
1181
- ${Le}
1182
- a {
1183
- min-width: 150px;
1184
- max-width: 400px;
1185
- display: block;
1186
- white-space: normal;
1187
- ${t=>{var e,n;return((e=t.theme.colors)==null?void 0:e.primary)&&Mn({primaryColor:(n=t.theme.colors)==null?void 0:n.primary,secondaryColor:"#FFFFFF",theme:t.theme})}}
1188
- }
1189
-
1190
- i {
1191
- margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0 0;
1192
- }
1193
- `;y(ze)`
1194
- ${Me}
1195
- font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
1196
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
1197
- > ul > li {
1198
- overflow: visible;
1199
- font-weight: 300;
1200
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
1201
- }
1202
- `;y.div`
1203
- background: #fff;
1204
- border: #ccc 1px solid;
1205
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
1206
- font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
1207
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
1208
- `;y.div`
1209
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
1210
- padding-bottom: 0;
1211
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
1212
- font-weight: normal;
1213
- white-space: nowrap;
1214
- display: flex;
1215
- align-items: center;
1216
-
1217
- h1,
1218
- h2,
1219
- h3,
1220
- h4,
1221
- h5,
1222
- h6 {
1223
- margin: 0;
1224
- font-weight: normal;
1225
- padding-bottom: 0;
1226
- }
1227
-
1228
- svg,
1229
- i {
1230
- margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
1231
- }
1232
- `;y(be)`
1233
- list-style: none;
1234
- padding: 0;
1235
- margin: 0;
1236
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0;
1237
-
1238
- li {
1239
- background: #fff;
1240
-
1241
- a {
1242
- display: block;
1243
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
1244
- padding: ${t=>{var e,n;return`${(e=t.theme.sizes)==null?void 0:e.small} ${(n=t.theme.sizes)==null?void 0:n.normal}`}};
1245
- cursor: pointer;
1246
- color: #555;
1247
- text-decoration: none;
1248
-
1249
- &:hover {
1250
- background: #f9f9f9;
1251
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1252
- }
1253
- }
1254
- }
1255
- `;y(ze)`
1256
- ${Me}
1257
- font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
1258
- > div {
1259
- ${t=>{var e;return X(t)("> h1",$.css`
1260
- font-size: ${(e=t.theme.fonts)==null?void 0:e.normal};
1261
- line-height: 1.2em;
1262
- `)}}
1263
- }
1264
- > ul > li {
1265
- overflow: visible;
1266
- font-weight: 300;
1267
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
1268
-
1269
- a {
1270
- display: inline-block;
1271
-
1272
- @media (hover: hover) {
1273
- &:hover {
1274
- text-decoration: underline;
1275
- }
1276
- }
1277
- }
1278
- }
1279
- `;const ca=t=>$.css`
1280
- ${t["data-loading"]&&"position: relative;"};
1281
- ${t["data-loading"]&&"min-height: 150px;"}
1282
- > * {
1283
- transition: 200ms ease-out opacity;
1284
- opacity: ${t["data-loading"]?"0.5":"1"};
1285
- }
1286
- .humany-loader {
1287
- opacity: ${t["data-loading"]?"1":"0"};
1288
- }
1289
- `;y(he)`
1290
- && {
1291
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
1292
- }
1293
- width: 1.2em;
1294
- `;y(de)`
1295
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.medium}};
1296
- font-weight: normal;
1297
- line-height: 1.2em;
1298
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
1299
- `;const la=y(Y)`
1300
- display: flex;
1301
- align-items: center;
1302
-
1303
- ${t=>{var e;return t["data-has-label"]==="true"&&t["data-has-symbol"]==="true"&&`
1304
- svg, i {
1305
- margin: 0 ${(e=t.theme.sizes)==null?void 0:e.small} 0 0;
1306
- }
1307
- `}}
1308
-
1309
- &:focus-visible {
1310
- ${t=>t["data-has-label"]==="true"&&Jt}
1311
-
1312
- svg, i {
1313
- ${t=>t["data-has-label"]==="false"&&t["data-has-symbol"]==="true"&&$.css`
1314
- ${Jt(t)}
1315
- box-sizing: content-box;
1316
- `}
1317
- }
1318
- }
1319
-
1320
- span {
1321
- flex: 1;
1322
- font-weight: 300;
1323
- }
1324
- `,ua=({addFavoriteTooltip:t,removeFavoriteCancelLabel:e,removeFavoriteConfirmLabel:n,removeFavoriteHeader:r,removeFavoriteLabel:s,removeFavoriteTooltip:o,id:i,isFavorite:l,guideTitle:c,buttonLabel:d="",actions:{addFavorite:u,removeFavorite:h}})=>{const p=f.useCallback(()=>{h(i)},[i,h]),g=f.useCallback(()=>{u(i)},[i,u]),x=`${l?o:t}${c?`: "${c}"`:""}`;return l?a.jsx(Ho,{trigger:a.jsxs(on,{className:"humany-favorite-button",title:x,"aria-label":x,"data-favorite":"true","data-has-label":d?"true":"false","data-has-symbol":"true",children:[a.jsx(_,{size:16,symbol:{type:"Svg",content:"star-empty"}}),d&&a.jsx(re,{children:d})]}),onConfirm:p,cancelLabel:e,confirmLabel:n,header:r,text:s}):a.jsxs(on,{className:"humany-favorite-button",title:x,"aria-label":x,onClick:g,"data-favorite":"false","data-has-label":d?"true":"false","data-has-symbol":"true",children:[a.jsx(_,{size:16,symbol:{type:"Svg",content:"star-empty"}}),d&&a.jsx(re,{children:d})]})},on=y(la)`
1325
- grid-area: favorite;
1326
-
1327
- &:focus-visible {
1328
- svg {
1329
- ${t=>{var e,n;return t["data-favorite"]==="true"?`
1330
- fill: transparent;
1331
-
1332
- path {
1333
- fill: transparent;
1334
- }
1335
- `:`
1336
- fill: ${(e=t.theme.colors)==null?void 0:e.text};
1337
-
1338
- path {
1339
- fill: ${(n=t.theme.colors)==null?void 0:n.text};
1340
- }
1341
- `}}
1342
- }
1343
- }
1344
-
1345
- ${t=>{var e,n,r,s,o,i,l;return((e=t.theme.colors)==null?void 0:e.text)&&$.css`
1346
- svg {
1347
- stroke: ${(n=t.theme.colors)==null?void 0:n.text};
1348
-
1349
- path {
1350
- stroke: ${(r=t.theme.colors)==null?void 0:r.text};
1351
- }
1352
-
1353
- ${t["data-favorite"]==="true"&&`
1354
- fill: ${(s=t.theme.colors)==null?void 0:s.text};
1355
-
1356
- path {
1357
- fill: ${(o=t.theme.colors)==null?void 0:o.text};
1358
- }
1359
- `};
1360
- }
1361
-
1362
- &:hover {
1363
- svg {
1364
- ${t["data-favorite"]==="true"?`
1365
- fill: transparent;
1366
-
1367
- path {
1368
- fill: transparent;
1369
- }
1370
- `:`
1371
- fill: ${(i=t.theme.colors)==null?void 0:i.text};
1372
-
1373
- path {
1374
- fill: ${(l=t.theme.colors)==null?void 0:l.text};
1375
- }
1376
- `};
1377
- }
1378
- }
1379
- `}}
1380
- `;f.forwardRef(({onFeedback:t=()=>{},direction:e="horizontal",className:n,header:r,positive:s,negative:o,selected:i,...l},c)=>a.jsxs(ha,{className:j(n,"humany-feedback"),"data-direction":e,...W(l),ref:c,children:[!!r&&a.jsx(da,{children:r}),a.jsxs(an,{className:"humany-feedback-button",disabled:!!i,"data-selected":i==="positive","data-direction":e,onClick:()=>t("positive"),children:[a.jsx(he,{faIcon:"smile-o"}),a.jsx("span",{children:s})]}),a.jsxs(an,{className:"humany-feedback-button",disabled:!!i,"data-selected":i==="negative","data-direction":e,onClick:()=>t("negative"),children:[a.jsx(he,{faIcon:"frown-o"}),a.jsx("span",{children:o})]})]}));const da=y(re)`
1381
- font-weight: normal;
1382
- margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
1383
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
1384
- display: block;
1385
- `,an=y(Y)`
1386
- display: inline-block;
1387
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
1388
- font-weight: 300;
1389
- && {
1390
- margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
1391
- }
1392
-
1393
- ${t=>{var e,n;return t["data-direction"]==="horizontal"&&$.css`
1394
- width: 225px;
1395
- max-width: calc(50% - ${(e=t.theme.sizes)==null?void 0:e.large} - ${(n=t.theme.sizes)==null?void 0:n.small});
1396
- `}}
1397
-
1398
- ${t=>t["data-direction"]==="vertical"&&$.css`
1399
- min-width: 190px;
1400
- `}
1401
-
1402
- ${t=>{var e,n;return((e=t.theme.colors)==null?void 0:e.primary)&&Mn({active:t["data-selected"],primaryColor:(n=t.theme.colors)==null?void 0:n.primary,secondaryColor:"#FFFFFF",theme:t.theme})}}
1403
-
1404
- i {
1405
- margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0 0;
1406
- }
1407
- `,ha=y.div`
1408
- ${t=>{var e;return t["data-direction"]==="vertical"&&$.css`
1409
- > button {
1410
- width: 100%;
1411
- &:not(:last-child) {
1412
- margin-bottom: ${(e=t.theme.sizes)==null?void 0:e.normal};
1413
- }
1414
- }
1415
- `}}
1416
- `,fa=()=>{const t=U(),[e,n]=f.useState([]),r=t.get("favorites");f.useEffect(()=>{if(r){n(r.get());const{events:c}=t.get("$widget");return c.subscribe("widget:favorites-updated",(u,{updated:h})=>{n([...h])})}},[]);const s=c=>r?r.add(c):Promise.resolve([]),o=c=>r?r.remove(c):Promise.resolve([]),i=()=>r?r.clear():Promise.resolve([]),l=f.useCallback(c=>e.indexOf(c)>-1?o(c):s(c),[e]);return[e,f.useMemo(()=>({addFavorite:s,removeFavorite:o,clearFavorites:i,toggleFavorite:l}),[e])]},ma=({format:t=Fn.YYYY_MM_DD_HH_MM,className:e="",byLabel:n="",modifiedLabel:r="",publishedLabel:s="",modifiedBy:o="",publishedBy:i="",showModified:l=!1,showPublished:c=!1,modified:d,published:u})=>{const h=c&&u?a.jsx(cn,{format:t,timestamp:u}):null,p=l&&d?a.jsx(cn,{format:t,timestamp:d}):null;return!h&&!p?null:a.jsxs(ut,{className:j(e,"humany-metadata"),children:[h&&a.jsxs(ut,{className:"humany-published",children:[s,h,n&&i&&` ${n.replace("{{editor}}",i)}`]}),p&&a.jsxs(ut,{className:"humany-modified",children:[h&&", ",r,p,n&&o&&` ${n.replace("{{editor}}",o)}`]})]})},cn=y(Bn)`
1417
- &:not(:first-child) {
1418
- margin-left: 4px;
1419
- }
1420
- &:not(:last-child) {
1421
- margin-right: 4px;
1422
- }
1423
- `,ut=y(de)`
1424
- font-style: italic;
1425
- `,pa=({tags:t})=>t.filter(e=>e.symbol).length?a.jsx(xa,{className:"humany-guide-list-tags",items:t,renderItem:({id:e,symbol:n,title:r})=>n&&a.jsx("li",{"data-tag":e,children:a.jsx(va,{size:18,symbol:n,title:r})},e)}):null;f.forwardRef(({title:t,id:e,route:n,symbolSize:r,collapseUri:s,children:o},i)=>{const{params:l}=Et();return a.jsxs(ga,{ref:i,"data-guide":e,children:[a.jsx(vt,{title:t,"aria-label":t,routeName:n,params:Se({...l,uriName:s||void 0,id:void 0,guide:void 0,accordion:void 0}),text:t,children:a.jsx(_,{size:r,symbol:{type:"Svg",content:"caret-up"}})}),o]})});const ga=y.li`
1426
- > a {
1427
- grid-column: 1/-1;
1428
- font-weight: bold;
1429
- margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0;
1430
- }
1431
-
1432
- > div {
1433
- grid-column: 1/-1;
1434
- }
1435
- `;f.forwardRef(({expandable:t=!1,routing:e={},paramMappers:n={},symbolSize:r=11,pageRole:s="link",pageCaret:o="down",showTags:i=!1,showFavoriteToggle:l=!1,localPaging:c=!1,onItemClick:d=()=>{},dispatch:u=()=>{},metadata:h={},pageLabel:p,className:g,children:x,items:m,renderItem:v,addFavoriteTooltip:b,removeFavoriteCancelLabel:C,removeFavoriteConfirmLabel:N,removeFavoriteHeader:S,removeFavoriteLabel:R,removeFavoriteTooltip:O,...I},T)=>{const E=Ss(),L=f.useRef(),z=Sn(m),{guide:P="guide",page:B="index"}=e,{guide:Q=({id:k})=>Se({guide:k}),page:ee=()=>Se()}=n,[oe,fe]=fa();f.useImperativeHandle(T,()=>L.current);const q=k=>{const{id:M,title:A,tags:F,published:te,modified:ae,publishedBy:pe,modifiedBy:Xe}=k;return a.jsxs("li",{"data-guide":M,"has-metadata":(!!(h!=null&&h.showPublished)&&!!te||!!(h!=null&&h.showModified)&&!!ae).toString(),children:[a.jsx(vt,{className:"humany-guide-link",title:A,"aria-label":A,routeName:P,onClick:dr=>d(dr,k),params:Q(k),text:A,children:a.jsx(_,{size:r,symbol:{type:"Svg",content:t?"caret-down":"caret-right"}})}),l&&a.jsx(ua,{guideTitle:A,addFavoriteTooltip:b,removeFavoriteCancelLabel:C,removeFavoriteConfirmLabel:N,removeFavoriteHeader:S,removeFavoriteLabel:R,removeFavoriteTooltip:O,isFavorite:oe.indexOf(M)>-1,actions:fe,id:M}),i&&a.jsx(pa,{tags:F}),a.jsx(ba,{...h,indent:t?void 0:r,modified:ae,published:te,publishedBy:pe,modifiedBy:Xe})]},M)},ie=f.useCallback((k,M,A)=>v?v(k,M,A,q):q(k),[v,q]),me=f.useCallback(k=>{c&&(k.preventDefault(),u("page",ee()))},[u,c]);f.useEffect(()=>{if(z&&z.length<m.length&&L.current){const k=L.current.querySelectorAll(".humany-guide-list > ul > li"),M=k[z.length];if(k.length===m.length&&z.length){const A=k[z.length];if(A){const F=A.querySelector(".humany-guide-link");F&&F.focus()}}else M&&new MutationObserver((F,te)=>{F.forEach(ae=>{if(ae.addedNodes){const pe=Array.from(ae.addedNodes).find(Xe=>Xe.tagName==="A");pe&&vr(L.current,document.activeElement)&&(E&&pe.focus(),te.disconnect())}})}).observe(M,{attributes:!1,characterData:!1,childList:!0,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})}});const Oe=!!Object.keys(h).filter(k=>typeof h[k]<"u").length;return a.jsxs(ya,{className:j(g,"humany-guide-list"),"data-item-count":m.length,items:m,renderItem:ie,isTabbing:E,expandable:t?"true":"false","grid-items":i||l||Oe?"true":"false",...W(I),ref:L,children:[p?a.jsx(vt,{text:p,title:p,"aria-label":p,routeName:B,role:s,params:ee(),onClick:me,children:a.jsx(_,{size:r,symbol:{type:"Svg",content:`caret-${o}`}})}):null,x]})});const ya=y(ze)`
1436
- ${Me}
1437
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
1438
- overflow: auto;
1439
- justify-content: flex-start;
1440
- white-space: nowrap;
1441
- font-weight: 300;
1442
- text-decoration: none;
1443
-
1444
- > div {
1445
- ${t=>X(t)("> h1",$.css`
1446
- white-space: pre-wrap;
1447
- `)}
1448
- }
1449
-
1450
- > ul > li {
1451
- ${t=>{var e,n;return t["grid-items"]==="true"&&$.css`
1452
- display: grid;
1453
- grid-template-columns: auto 1fr 1fr;
1454
- gap: 0px 0px;
1455
- grid-template-areas: '. favorite tags';
1456
- align-items: center;
1457
-
1458
- > button {
1459
- margin: 0 0 0 ${(e=t.theme.sizes)==null?void 0:e.small};
1460
-
1461
- &[data-favorite='false'] {
1462
- ${t.isTabbing?"opacity: 0;":"display: none;"};
1463
- &:focus {
1464
- opacity: 1;
1465
- }
1466
- }
1467
- }
1468
-
1469
- > span {
1470
- font-size: ${(n=t.theme.fonts)==null?void 0:n.small};
1471
- }
1472
-
1473
- &:hover {
1474
- button[data-favorite='false'] {
1475
- display: flex;
1476
- justify-self: flex-start;
1477
- }
1478
- }
1479
-
1480
- &[has-metadata='true'] {
1481
- grid-template-rows: 1fr 1fr;
1482
- grid-template-areas:
1483
- '. favorite tags'
1484
- 'metadata metadata metadata';
1485
- }
1486
- `}}
1487
- > a {
1488
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1489
- overflow: hidden;
1490
- text-overflow: ellipsis;
1491
- max-width: 100%;
1492
- display: inline-block;
1493
-
1494
- svg {
1495
- margin: 0 calc(${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}}*2) 0 0;
1496
- line {
1497
- stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1498
- }
1499
- }
1500
-
1501
- ${t=>{var e;return t.expandable==="true"&&$.css`
1502
- display: flex;
1503
- flex-direction: row-reverse;
1504
- justify-content: flex-end;
1505
- align-items: center;
1506
-
1507
- span {
1508
- overflow: hidden;
1509
- text-overflow: ellipsis;
1510
- }
1511
-
1512
- svg {
1513
- margin: 0 0 0 ${(e=t.theme.sizes)==null?void 0:e.small};
1514
- }
1515
- `}}
1516
-
1517
- &:focus-visible {
1518
- ${V}
1519
- text-decoration: underline;
1520
- }
1521
-
1522
- @media (hover: hover) {
1523
- &:hover {
1524
- text-decoration: underline;
1525
- }
1526
- }
1527
- }
1528
- }
1529
-
1530
- > a {
1531
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
1532
- margin: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0 0;
1533
- align-self: flex-start;
1534
- align-items: center;
1535
- display: flex;
1536
-
1537
- span {
1538
- text-decoration: underline;
1539
- }
1540
-
1541
- svg {
1542
- margin: 0 calc(${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}}*2) 0 0;
1543
- line {
1544
- stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
1545
- }
1546
- }
1547
-
1548
- &:focus-visible {
1549
- ${V}
1550
- text-decoration: underline;
1551
- }
1552
- }
1553
- `,xa=y(be)`
1554
- ${Le}
1555
- display: flex;
1556
- margin: 0 0 0 auto;
1557
- grid-area: tags;
1558
-
1559
- li,
1560
- li:last-child {
1561
- margin: 0 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
1562
- display: flex;
1563
- align-items: center;
1564
- justify-content: space-between;
1565
- }
1566
- `,va=y(_)`
1567
- display: block;
1568
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1569
- ${t=>{if(t.symbol.type==="Uri")return`
1570
- width: ${t.size}px;
1571
- height: ${t.size}px;
1572
- `;if(t.symbol.type==="FontAwesome")return`
1573
- font-size: ${t.size}px;
1574
- `}}
1575
- `,ba=y(ma)`
1576
- grid-area: metadata;
1577
- text-overflow: ellipsis;
1578
- overflow: hidden;
1579
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
1580
- ${t=>{var e;return typeof t.indent=="number"&&`text-indent: calc(${(e=t.theme.sizes)==null?void 0:e.small} * 2 + ${t.indent}px);`}}
1581
- `,wa=$.keyframes`
1582
- 100% {
1583
- transform: rotate(360deg);
1584
- }
1585
- `,Ca=$.keyframes`
1586
- 0% {
1587
- stroke-dasharray: 1, 200;
1588
- stroke-dashoffset: 0;
1589
- }
1590
- 50% {
1591
- stroke-dasharray: 89, 200;
1592
- stroke-dashoffset: -35px;
1593
- }
1594
- 100% {
1595
- stroke-dasharray: 89, 200;
1596
- stroke-dashoffset: -124px;
1597
- }
1598
- `;y.svg`
1599
- animation: ${wa} 2s linear infinite;
1600
- height: 100%;
1601
- transform-origin: center center;
1602
- width: 100%;
1603
- position: absolute;
1604
- top: 0;
1605
- bottom: 0;
1606
- left: 0;
1607
- right: 0;
1608
- margin: auto;
1609
- transition: 200ms ease-out opacity;
1610
- `;y.div`
1611
- position: absolute;
1612
- top: 0;
1613
- bottom: 0;
1614
- left: 0;
1615
- right: 0;
1616
- height: 100%;
1617
- width: 100%;
1618
- pointer-events: ${t=>t["data-loading"]?"all":"none"};
1619
- display: flex;
1620
- flex-direction: column;
1621
- justify-content: center;
1622
- transition: 200ms ease-out opacity;
1623
- box-sizing: border-box;
1624
- overflow: hidden;
1625
-
1626
- .humany-spinner-svg {
1627
- opacity: ${t=>t["data-loading"]?"1":"0"};
1628
- }
1629
- `;y.div`
1630
- position: relative;
1631
- margin: 0 auto;
1632
- width: 100px;
1633
- &:before {
1634
- content: '';
1635
- display: block;
1636
- padding-top: 100%;
1637
- }
1638
- `;y.circle`
1639
- stroke-dasharray: 1, 200;
1640
- stroke-dashoffset: 0;
1641
- animation: ${Ca} 1.5s ease-in-out infinite;
1642
- stroke-linecap: round;
1643
- stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1644
- stroke-width: 2px;
1645
- `;y(Y)`
1646
- display: flex;
1647
- justify-content: space-between;
1648
- align-items: center;
1649
- width: 100%;
1650
- text-align: left;
1651
- svg,
1652
- i {
1653
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1654
- }
1655
- span {
1656
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
1657
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
1658
- overflow: hidden;
1659
- text-overflow: ellipsis;
1660
- flex: 1;
1661
- white-space: nowrap;
1662
- }
1663
- &:focus-visible {
1664
- ${V}
1665
- span {
1666
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1667
- text-decoration: underline;
1668
- }
1669
- }
1670
- `;y(ze)`
1671
- ${ca}
1672
- ${Me}
1673
- overflow: hidden;
1674
- justify-content: flex-start;
1675
- padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
1676
- ${t=>!t["data-show-header"]&&$.css`
1677
- > div {
1678
- ${X(t)("h1",$.css`
1679
- display: none;
1680
- `)}
1681
- }
1682
- `}
1683
-
1684
- @media (hover: hover) {
1685
- button:hover {
1686
- text-decoration: underline;
1687
- }
1688
- }
1689
- `;y(zt)`
1690
- ${Mt}
1691
- font-weight: 300;
1692
-
1693
- p {
1694
- white-space: normal;
1695
- }
1696
- `;y.li`
1697
- .humany-paragraph {
1698
- display: none;
1699
- &:not(:only-child) {
1700
- ${t=>{var e,n,r;return((e=t.theme.sizes)==null?void 0:e.cardinal)&&((n=t.theme.sizes)==null?void 0:n.normal)&&$.css`
1701
- margin: ${(r=t.theme.sizes)==null?void 0:r.normal} 0;
1702
- `}}
1703
- }
1704
- }
1705
-
1706
- ${t=>t["data-expanded"]&&$.css`
1707
- .humany-paragraph {
1708
- display: block;
1709
- }
1710
- `}
1711
-
1712
- > span {
1713
- display: block;
1714
- font-weight: 300;
1715
- color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.accent}};
1716
- }
1717
- `;y(_)`
1718
- margin: 0 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
1719
- line {
1720
- stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1721
- }
1722
- `;y(Bn)`
1723
- font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
1724
- font-weight: 300;
1725
- `;y(zt)`
1726
- ${t=>{var e;return X(t)("h1",$.css`
1727
- font-weight: normal;
1728
- font-size: ${(e=t.theme.fonts)==null?void 0:e.medium};
1729
- `)}}
1730
- `;const or=y(Je)`
1731
- ${Mt}
1732
- font-weight: 300;
1733
- line-height: 1.5em;
1734
- button:focus-visible {
1735
- ${V};
1736
- }
1737
-
1738
- a:focus-visible {
1739
- ${Rn};
1740
- }
1741
- `,ir=t=>{const e=$s(t.clientName),{params:{contactCategory:n,guideCategory:r,phrase:s}}=Et();if(typeof e>"u")return null;if(e===null)return process.env.NODE_ENV!=="production"?a.jsx(ka,{title:`client-name: ${t.clientName}, id: ${t.id}`,className:"humany-non-resolved-contact-method",children:a.jsx(Re,{variant:"h5",children:"Non resolved Contact Method type"})}):null;const o=(i={})=>{const l={...t,...i},{id:c,title:d,clientName:u,symbol:h,inline:p,onClick:g=()=>{},description:x,htmlParseInstruction:m,className:v,disabled:b,guideId:C,dispatch:N=()=>{},expanded:S}=l,R=p?{onKeyDown:O=>{O.key&&O.key==="Enter"&&(g(O,l),O.defaultPrevented||!S&&N("expand",c))},onClick:O=>{g(O,l),O.defaultPrevented||!S&&N("expand",c)}}:{onClick:O=>g(O,l),routeName:"contact-method",params:Se({contactCategory:n,guideId:C,guideCategory:r,phrase:s,contactMethod:c,uriName:ht(d)})};return a.jsxs($a,{title:d,"aria-label":d,className:v,disabled:b,description:x,"data-client-name":u,...i,...R,children:[h&&a.jsx(_,{symbol:h}),x?a.jsxs("div",{className:"humany-contact-link-rich-content",children:[a.jsx(ln,{children:d}),a.jsx(or,{html:x,htmlParseInstruction:m})]}):a.jsx(ln,{children:d})]})};return t.expanded?a.jsx(f.Suspense,{fallback:null,children:a.jsx(e,{...t,renderDefault:o})}):o()},ar=t=>{var e,n,r,s,o,i,l,c;return $.css`
1742
- display: flex;
1743
- padding: ${(e=t.theme.sizes)==null?void 0:e.large};
1744
- ${t.description?"":"align-items: center;"}
1745
- text-decoration: none;
1746
- span {
1747
- display: inline-block;
1748
- color: ${(n=t.theme.colors)==null?void 0:n.text};
1749
- }
1750
- i {
1751
- font-size: ${(r=t.theme.fonts)==null?void 0:r.large};
1752
- margin: 0 ${(s=t.theme.sizes)==null?void 0:s.large} 0 0;
1753
- min-height: ${(o=t.theme.fonts)==null?void 0:o.large};
1754
- min-width: ${(i=t.theme.fonts)==null?void 0:i.large};
1755
- line-height: ${(l=t.theme.fonts)==null?void 0:l.large};
1756
- display: inline-block;
1757
- vertical-align: bottom;
1758
- color: ${(c=t.theme.colors)==null?void 0:c.text};
1759
- }
1760
- `},ln=y(re)`
1761
- line-height: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.large}};
1762
- `,$a=y(we)`
1763
- ${t=>ar(t)}
1764
-
1765
- &:focus-visible {
1766
- ${V};
1767
- }
1768
- `,ka=y.div`
1769
- text-align: center;
1770
- display: block;
1771
- ${t=>{var e,n;return typeof((e=t.theme.colors)==null?void 0:e.warning)<"u"&&`color: ${(n=t.theme.colors)==null?void 0:n.warning};`}}
1772
- `,cr=t=>{var e,n,r;return $.css`
1773
- ${Me(t)}
1774
-
1775
- > div {
1776
- padding: ${(e=t.theme.sizes)==null?void 0:e.large};
1777
-
1778
- ${X(t)("h1",$.css`
1779
- margin: 0;
1780
- `)}
1781
- }
1782
-
1783
- > ul {
1784
- &:not(:first-child) {
1785
- border-top: ${t.theme.border};
1786
- }
1787
-
1788
- > li {
1789
- margin: 0;
1790
- white-space: normal;
1791
-
1792
- > a {
1793
- overflow: hidden;
1794
- }
1795
-
1796
- &:first-child > a {
1797
- border-radius: ${`${t.theme.borderRadius} ${t.theme.borderRadius} 0 0`};
1798
- }
1799
-
1800
- &:last-child:not(:first-child) > a {
1801
- border-radius: ${`0 0 ${t.theme.borderRadius} ${t.theme.borderRadius}`};
1802
- }
1803
-
1804
- &:not(:last-child) {
1805
- border-bottom: ${t.theme.border};
1806
- }
1807
-
1808
- > div {
1809
- padding: ${(n=t.theme.sizes)==null?void 0:n.large};
1810
- }
1811
- }
1812
- }
1813
-
1814
- @media (hover: hover) {
1815
- a:hover {
1816
- background-color: ${(r=t.theme.colors)==null?void 0:r.accent};
1817
- }
1818
- }
1819
- `},ja=y(ze)`
1820
- ${t=>cr(t)}
1821
- `,Sa=({contactMethods:t,children:e,guideId:n,dispatch:r,className:s="",itemRenderer:o,action:i=()=>{},header:l=""})=>t.length?a.jsx(ja,{header:l,className:j(s,"humany-contact-list"),items:t,renderItem:o?c=>a.jsx("li",{"data-contact-method":c.id,children:o(c,{action:i,dispatch:r,guideId:n})},c.id):c=>a.jsx("li",{"data-contact-method":c.id,children:a.jsx(ir,{...c,action:i,dispatch:r,guideId:n})},c.id),children:e}):null,lr=(t,e)=>{if(t.actionKey===e)return t;if(!t.properties)return null;const n=Object.keys(t.properties);let r;for(let s=0;s<n.length;s++)if(r=lr(t.properties[n[s]],e),r)return r;return!1},Ea=({className:t,body:{form:e},id:n,action:r,dispatch:s,disabled:o,autoFocus:i})=>{if(e&&!o){const{schema:l,layout:c,data:d,meta:u}=e,h=s||r||(()=>{});return a.jsx(si,{className:t,schema:l,layout:c,data:d,autoFocus:i,onChange:(p,g)=>{const x={schema:l,layout:c,data:g,meta:u};p.toString()==="submit"?h("submit",{id:n,form:x}):lr(l,p).evaluate?h("evaluate",{id:n,form:x}):h("validate",{id:n,form:x})}})}return null},Na=t=>{const[e,n]=f.useState(null),r=U();return f.useEffect(()=>{let s;return r.getAsync("componentResolver").then(o=>{s=o.registerResolver(t,i=>n(i))}),()=>{s&&s()}},[t]),e};function ur(t){t.getAsync("contactMethods").then(e=>{e.create({clientName:"custom.webservice",render:"email.form",onValidate:n=>$e(t,n),onComplete:n=>ke(t,n),onSubmit:n=>Ft(t,n,r=>({...r,ConfirmationText:r.ResponseHtml}))})})}const La=(t,e,n)=>t.getAsync("contactMethods").then(r=>{r.create({clientName:e,render:"email.form",handleClick:()=>(s,o)=>{const{body:{form:i,guideId:l,confirmationFallback:c,...d}}=o;i||(s.preventDefault(),n(d))},onValidate:s=>$e(t,s),onComplete:s=>ke(t,s),onSubmit:s=>{const{body:{form:o,guideId:i,confirmationFallback:l,...c}}=s,{values:d}=new wt(o).export();return Promise.resolve(n(c,d)).then(u=>u||l)}})});class Ma extends ws{constructor(e,n){super(e,n),this.widget.implementation.configure(s=>{s.plugin(er).plugin(tr).plugin(nr).plugin(sr).plugin(ur).plugin(rr)})}}exports.ContactList=Sa;exports.ContactMethod=ir;exports.ContactMethodPlatform=_e;exports.DefaultContactMethodsPlugin=Ma;exports.Description=or;exports.Form=Ea;exports.Html=Je;exports.appendClassNames=j;exports.chatPopupPlugin=tr;exports.complete=ke;exports.contactItemList=cr;exports.contactLink=ar;exports.createSubmitAdapter=La;exports.emailPlugin=er;exports.evaluate=Bt;exports.freeTextPlugin=nr;exports.genericHtml=Mt;exports.headingElement=X;exports.linkPlugin=rr;exports.phonePlugin=sr;exports.submit=Ft;exports.useContactMethod=Na;exports.validate=$e;exports.webServicePlugin=ur;