@telia-ace/knowledge-widget-components-search 1.1.1-rc.1 → 1.1.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/detached-component-56fe2c89.js +1 -0
- package/detached-component-cbb384dc.mjs +27 -0
- package/index-0aec4054.js +1724 -0
- package/index-7592842b.mjs +7417 -0
- package/index.js +1 -1
- package/index.mjs +6 -2
- package/package.json +7 -7
- package/search-37ab93f5.js +281 -0
- package/search-d41ce4de.mjs +1520 -0
- package/detached-component-6da409b0.js +0 -1
- package/detached-component-73dbfdab.mjs +0 -22
- package/index-695c1f1a.mjs +0 -11330
- package/index-f4113eda.js +0 -1757
- package/search-332dd7c3.mjs +0 -1698
- package/search-3cfd5b73.js +0 -281
|
@@ -0,0 +1,1724 @@
|
|
|
1
|
+
"use strict";var Un=Object.defineProperty;var Kn=(t,e,n)=>e in t?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var b=(t,e,n)=>(Kn(t,typeof e!="symbol"?e+"":e,n),n);const a=require("react/jsx-runtime"),x=require("@emotion/styled"),$=require("@emotion/react"),m=require("react"),Gn=require("react-transition-group"),Yn=require("react-dom"),st=require("react-router-dom"),rt=new WeakMap;function Jn(){return t=>(rt.has(t)||rt.set(t,{}),rt.get(t))}const it=(t,e,n,...s)=>{const r=`[${t.get("$environment").name||"webprovisions"}] ${n}`;switch(e){case"info":console.info(r,...s);break;case"warning":console.warn(r,...s);break;case"error":console.error(r,...s);break}},ve=t=>{const e=t.container||t;return{info:(n,...s)=>it(e,"info",n,...s),warn:(n,...s)=>it(e,"warning",n,...s),error:(n,...s)=>it(e,"error",n,...s)}},A=Jn(),Lt=(()=>{let t=0;return()=>++t})(),Mt=(t,e,n)=>{const s=A(t).touchQueue.get(e);s&&s.forEach(r=>{r(n,t)})};class Qn{constructor(e,n,s,r){this.key=e,this.factory=n,this.parent=s,this.container=r,this.id=Lt(),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,Mt(this.container,this.key,n),n))}return this.value}}class Xn{constructor(e,n,s,r){this.key=e,this.value=n,this.parent=s,this.container=r,this.id=Lt(),this.async=!1,this.resolved=!1,this.constructed=!0,this.resolve=()=>(this.resolved=!0,Mt(this.container,this.key,this.value),this.value)}}class es{constructor(e,n,s,r){this.key=e,this.value=n,this.parent=s,this.container=r,this.id=Lt(),this.async=!1,this.resolved=!1,this.constructed=!1,this.resolve=()=>{this.resolved=!0,this.constructed=!0;const i=this.value(this.parent,this.container);return Mt(this.container,this.key,this.value),i}}}class Rt{constructor(e,n,s){this.owner=e,this.name=n,this.parent=s,A(this).resolvers=new Map,A(this).touchQueue=new Map,A(this).children=[]}delete(e){const n=A(this).resolvers,s=Array.from(n.values()).find(r=>r.id===e);return s?(A(this).touchQueue.delete(s.key),Promise.resolve(n.delete(s.key))):this.parent?this.parent.delete(e):Promise.resolve(!1)}clear(){const e=A(this).resolvers,n=Array.from(e.values());return Promise.all(n.map(s=>{if(s.constructed)return Promise.resolve(s.resolve()).then(r=>{if(r!==null&&typeof r=="object"&&typeof r.dispose=="function")return r.dispose.call(r,this,s)})})).then(()=>{n.forEach(s=>this.delete(s.id)),A(this).children.forEach(s=>s.clear())})}detach(){if(this.parent){const e=A(this.parent).children,n=e.indexOf(this);n>-1&&(e.splice(n,1),delete this.parent)}}touch(e,n){const s=A(this).resolvers.get(e);if(s&&s.constructed)Promise.resolve(s.resolve()).then(r=>{n(r,this)});else{const r=A(this).touchQueue;let i=r.get(e);i||(i=[],r.set(e,i)),i.push(n)}return this.parent&&!s?this.parent.touch(e,n):Promise.resolve()}registerAsync(e,n){const s=A(this).resolvers.get(e);s&&!s.async&&process.env.NODE_ENV!=="production"&&ve(this).warn(`Mismatching resolver type. You are registering an async resolver with a key ('${e}') previously used by a non-async resolver.`);const r=new Qn(e,n,s,this);return A(this).resolvers.set(e,r),r.id}registerFactory(e,n){const s=A(this).resolvers.get(e);s&&s.async&&process.env.NODE_ENV!=="production"&&ve(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${e}') previously used by an async resolver.`);const r=new es(e,n,s,this);return A(this).resolvers.set(e,r),r.id}register(e,n){const s=A(this).resolvers.get(e);s&&s.async&&process.env.NODE_ENV!=="production"&&ve(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${e}') previously used by an async resolver.`);const r=new Xn(e,n,s,this);return A(this).resolvers.set(e,r),r.id}get(e){const n=A(this).resolvers.get(e);if(n)return n.async&&process.env.NODE_ENV!=="production"&&ve(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=A(this).resolvers.get(e);if(n){if(!n.async)throw process.env.NODE_ENV!=="production"&&ve(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(s=>n[s]=this.get(s)),n}getManyAsync(...e){const n={};return Promise.all(e.map(s=>this.getAsync(s).then(r=>n[s]=r))).then(()=>n)}createChild(e,n){const s=new Rt(e,n,this);return A(this).children.push(s),s}}var qe=(t=>(t.Implementation="implementation",t.Widget="widget",t))(qe||{}),ue=(t=>(t.Pre="pre",t.Post="post",t))(ue||{});const ts=(t,e,n,s)=>{try{const r=new e(n,s);return{name:t,invoke:(i,o)=>{let u;return r[i]&&(u=r[i].call(r,o)),Promise.resolve(u)},getInstance:()=>r}}catch(r){if(r.message&&r.message.indexOf("is not a constructor")>=0)return{name:t,invoke:i=>{let o;return i==="initialize"&&(o=e(n,s)),Promise.resolve(o)},getInstance:()=>e};throw r}};function Gt(t,e){return typeof t>"u"?e:t}class ns{constructor(e={}){this.part=e}createCommand(e,n,s){let r;typeof n=="function"?r={scope:qe.Widget,stage:ue.Post,defaultArgs:void 0,handlerResolver:n}:r={scope:Gt(n.scope,qe.Widget),stage:Gt(n.stage,ue.Post),defaultArgs:n.defaultArgs,handlerResolver:s};let i=this.part;const o=e.split(".");return o.forEach((u,l)=>{l===o.length-1?i[u]||(i[u]=()=>r):i=this.part[u]=this.part[u]||{}}),this}get(){return this.part}}const We=t=>{const e=new ns({});return t(e),e.get()};We(t=>{t.createCommand("types.register",{scope:qe.Implementation,stage:ue.Pre},e=>(n,s)=>{e.container.get("$types")[n]=s}).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,s,r)=>{const{container:i}=e;let o=null,u=n,l=s;typeof n=="string"&&(o=n,u=s,l=r);const h=c=>{const{transformPluginSettings:d}=e.container.get("$environmentOptions"),f=d?d(l||{},o,e.container,u):s;try{const y=ts(o,u,i,f);i.get("$plugins").push(y),c&&y.invoke("initialize",null)}catch(y){ve(e).warn("Error when initializing plugin",y)}};e.container.get("$instance")?h(!0):e.events.subscribeOnce("widget:instance-created",()=>h(!1))}).createCommand("container.register",e=>(n,s)=>{e.container.register(n,s)}).createCommand("container.registerAsync",e=>(n,s)=>{e.container.registerAsync(n,s)}).createCommand("container.registerFactory",e=>(n,s)=>{e.container.registerFactory(n,s)}).createCommand("container.touch",e=>(n,s)=>{e.container.touch(n,s)}).createCommand("csp",{},e=>n=>{e.container.register("csp",n)})});var dn=(t=>(t.Activating="activating",t.Loading="loading",t.Activated="activated",t.Deactivating="deactivating",t.Deactivated="deactivated",t))(dn||{});const Ot=t=>{const e=[];return[(s,r)=>{e.push(t.subscribe(s,r))},()=>{e.forEach(s=>{s()})}]};class Ue{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 ss(this.platform,this)}}class hn{constructor(e,n,s){b(this,"actions");b(this,"subscribe");b(this,"unsubscribe");this.platform=e,this.node=n,this.actions=new zt(e,new Ue(e).withId(n.id),s);const[r,i]=Ot(this.platform.events);this.subscribe=r,this.unsubscribe=i}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:s})=>{s===this.node&&e(this.node.attributes.context)}),this.node.attributes.context}layout(e){return e&&this.subscribe("components:layout-changed",(n,{node:s})=>{s===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 ss{constructor(e,n,s=!0){b(this,"actions");b(this,"removes",[]);this.platform=e,this.target=n,this.clearOnDispose=s,this.actions=new zt(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 rs=(t,e,n)=>{const s=t.concat(),r=(i,o,u)=>{let l=!0;if(s.length){const h=s.shift(),c=(d,f)=>(l=!1,r(d,Object.assign({},o,f),u));return Promise.resolve(h(i,c,u)).then(d=>({...d,cancelled:l}))}return Promise.resolve({data:i,cancelled:!1,options:o})};return r(e,{},n)};class zt{constructor(e,n,s){b(this,"subscriptions",[]);this.platform=e,this.target=n,this.ns=s,this.create=this.create.bind(this)}create(e,n=()=>{}){const s={key:e,fn:n,target:this.target,ns:this.ns};this.platform.actionsState.handlers.push(s);const r=()=>{const i=this.platform.actionsState.handlers.indexOf(s);i>-1&&this.platform.actionsState.handlers.splice(i,1)};return this.subscriptions.push(r),r}dispatch(e,n){const s=this.platform.nodes.all.concat(this.platform.nodes.detached),r={},i=this.platform.actionsState.handlers.filter(o=>o.key===e&&(!o.ns||!this.ns||o.ns===this.ns));return Promise.all(i.map(o=>{const u=s.filter(h=>o.target.match(h)&&this.target.match(h)),l=this.platform.actionsState.watchers.filter(h=>h.key===e&&(!h.ns||!this.ns||h.ns===this.ns)&&u.some(c=>h.target.match(c))).map(h=>h.fn);return Promise.all(u.map(h=>{const c=new hn(this.platform,h,this.ns);return rs(l,n,c).then(d=>{const{data:f={},options:y,cancelled:g}=d;return Promise.resolve(g?{}:o.fn(f,y,c)).then(p=>{r[h.id]=p})})}))})).then(()=>r)}watch(e,n){let s=e,r=this.ns;const i=e.split(".");i.length>1&&(r=i[0],s=i.splice(1).join("."));const o={fn:n,target:this.target,key:s,ns:r};this.platform.actionsState.watchers.push(o);const u=()=>{const l=this.platform.actionsState.watchers.indexOf(o);l>-1&&this.platform.actionsState.watchers.splice(l,1)};return this.subscriptions.push(u),u}dispose(){this.subscriptions.forEach(e=>e())}}We(t=>{t.createCommand("components",e=>n=>{e.events.subscribeOnce("components:platform-created",(s,{platform:r})=>{n.handlers&&n.handlers.forEach(([i,o])=>{r.addComponentHandler(i,o)})})})});function is(t){const e=[];return t.forEach(n=>{e.indexOf(n)===-1&&e.push(n)}),e}function yt(t="",e=""){const n=t.split(" ").concat(e.split(" "));return is(n).join(" ").trim()}function os(t,e){if(t){if(typeof e=="string")return e;if(Array.isArray(e)){let n="";return e.forEach(s=>n=yt(n,s)),n}}}function N(...t){let e="";return t.length&&t.forEach(n=>{typeof n=="string"?e=yt(e,n):Array.isArray(n)?e=yt(e,os(...n)):typeof n<"u"&&n!==null&&process.env.NODE_ENV!=="production"&&T.warn("appendClassNames: arguments either haveto be a string or [boolean, ...string[]]. Passed args:",...t)}),e}function _e(t){const e={};if(typeof t=="number"||typeof t=="string")return t;for(const n in t)if(t.hasOwnProperty(n)){const s=t[n],r=n.substring(0,1).toLowerCase()+n.substring(1);if(Object.prototype.toString.call(s)==="[object Array]"){e[r]=[];for(let i=0,o=s.length;i<o;i++)e[r].push(_e(s[i]))}else s!==null&&typeof s=="object"?e[r]=_e(s):e[r]=s}return e}function Se(t={}){const{phrase:e="",category:n,guideCategory:s,contactCategory:r,take:i,connectionKey:o,accordion:u,id:l,uriName:h,sorting:c,tag:d,tagId:f,tagTitle:y,...g}=t,p={};return Object.keys(g).forEach(v=>{typeof t[v]=="string"&&(p[v]=t[v])}),typeof e=="string"&&e.length&&(p.phrase=e),e===null&&(p.phrase=e),typeof s=="string"&&s!=="0"&&(p.guideCategory=s),typeof s=="number"&&s!==0&&(p.guideCategory=s),typeof s=="object"&&s!==null&&(typeof s.id=="string"&&s.id!=="0"&&(p.guideCategory=s.id),typeof s.id=="number"&&s.id!==0&&(p.guideCategory=s.id)),typeof r=="string"&&r!=="0"&&(p.contactCategory=r),typeof r=="number"&&r!==0&&(p.contactCategory=r),typeof r=="object"&&r!==null&&(typeof r.id=="string"&&r.id!=="0"&&(p.contactCategory=r.id),typeof r.id=="number"&&r.id!==0&&(p.contactCategory=r.id)),typeof n=="string"&&n!=="0"&&(p.category=n),typeof n=="number"&&n!==0&&(p.category=n),typeof n=="object"&&n!==null&&(typeof n.id=="string"&&n.id!=="0"&&(p.category=n.id),typeof n.id=="number"&&n.id!==0&&(p.category=n.id)),l&&(p.id=l),h&&(+p.category||+p.guideCategory||+p.guide||+p.contactCategory||+p.contactMethod)&&(p.uriName=h),o&&(p.connectionKey=o),i&&(p.take=i),c&&(p.sorting=c),typeof u=="string"&&u.length>0&&(p.accordion=u),typeof d=="string"&&d!=="0"&&(p.tag=d),typeof d=="number"&&d!==0&&(p.tag=d),Array.isArray(d)&&d.length&&(p.tag=d),(typeof f=="string"||typeof f=="number")&&(p.tagId=f),typeof y=="string"&&(p.tagTitle=y),typeof p.tag=="string"&&(p.tag=p.tag.split(",")),p}function*fn(t){if(t)for(let e=0;e<t.length;e++){const n=t[e];yield n,n.items&&(yield*fn(n.items))}}const mn=(t,e)=>{const n=fn(e);let s=n.next(),r=null;for(;!s.done;)s.value.id===t&&(r=s.value),s=n.next();return r},Yt=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,s=/[-]$/;let r=t;for(const i in e)e.hasOwnProperty(i)&&e[i].from.test(t)&&(r=r.replace(e[i].from,e[i].to));return r=r.replace(n,"-"),r=r.replace(s,""),r=r.toLowerCase(),r||"humany"};function pn(t,e={},n){return t.forEach(s=>{n&&(e[+s.id]=n),s.items&&pn(s.items,e,s.id)}),e}function gn(t,e,n=[t],s=pn(e)){const r=o=>{const u=s[+o];u&&(n.unshift(u),r(u))},i=s[+t];return i&&(n.unshift(i),r(i)),n}const as=(t,e)=>typeof t>"u"||typeof e>"u"?new Map:new Map(t.map(n=>{const s=mn(n,e);return[n,s]})),Ae=(t,e,...n)=>typeof e=="string"?t(`[humany] ${e}`,...n):t(e,...n),xe=class{constructor(){b(this,"keys",[]);b(this,"log",(e,...n)=>this.lookup(e,()=>xe.log(...n)));b(this,"warn",(e,...n)=>this.lookup(e,()=>xe.warn(...n)));b(this,"error",(e,...n)=>this.lookup(e,()=>xe.error(...n)));b(this,"info",(e,...n)=>this.lookup(e,()=>xe.info(...n)))}lookup(e,n){this.keys.indexOf(e)===-1&&(this.keys.push(e),n())}};let T=xe;b(T,"log",(...e)=>Ae(console.log,...e)),b(T,"warn",(...e)=>Ae(console.warn,...e)),b(T,"error",(...e)=>Ae(console.error,...e)),b(T,"info",(...e)=>Ae(console.info,...e));const fe=t=>{let e={},n,s;if(typeof t!="object"||t===null)return t;e=Array.isArray(t)?[]:{};for(s in t)n=t[s],e[s]=typeof n=="object"&&n!==null?fe(n):n;return e};function Jt(t){let e=0;if(t.length===0)return e.toString();for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);e=(e<<5)-e+s,e=e&e}return e.toString()}const cs=(t,e)=>{if(!t||!e)return!0;let n=e.parentNode,s=!1;for(;n!==null;)n===t&&(s=!0),n=n.parentNode;return s};function ls(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}class us{constructor(e,n){b(this,"tasks",[]);b(this,"current",Promise.resolve());this.lockWarningTime=e,this.lockErrorTime=n,this.next=this.next.bind(this)}add(e,n,s,r){this.tasks.push({task:e,resolve:n,reject:s,done:r}),this.next()}next(){this.current=this.current.then(()=>{const e=this.tasks.shift();if(e){let n;const s=setTimeout(()=>{process.env.NODE_ENV!=="production"&&T.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),r=Promise.resolve(e.task()).then(i=>(clearTimeout(s),clearTimeout(n),i));return Promise.resolve(r).then(this.next).then(()=>r.then(i=>{e.done(),e.resolve(i)})).catch(i=>(e.done(),e.reject(i),this.next()))}return Promise.resolve()})}}const Te=new WeakMap;function Le(t,e=5e3,n=1e3){return Te.has(t)||Te.set(t,new us(e,n)),s=>new Promise((r,i)=>{const o=Te.get(t);o.add(s,r,i,()=>{o.tasks.length||Te.delete(t)})})}const vt=(t={})=>(Object.keys(t).forEach(e=>{(t[e]===null||typeof t[e]>"u")&&delete t[e]}),t),Pe=(t,e)=>{let n=!0;return Object.keys(t).length!==Object.keys(e).length||Object.keys(t).some(r=>!Object.keys(e).some(o=>r===o))?!1:(Object.keys(t).forEach(r=>{if(n){const i=typeof t[r]>"u"?"":t[r],o=typeof e[r]>"u"?"":e[r];n=i.toString()===o.toString()}}),n)},re=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);function me(){return re()+re()+"-"+re()+"-"+re()+"-"+re()+"-"+re()+re()+re()}class Qt{constructor(e,n){b(this,"id");b(this,"type");b(this,"name");b(this,"parent");b(this,"tags",[]);b(this,"children",{});b(this,"changesets",[]);b(this,"attributes");b(this,"mountCount",0);this.events=e,this.id=me(),this.type=n,this.attributes={context:{},properties:{},layout:{},tags:[]},this.writeLayout({size:"full",indent:0})}mount(e,n){let s=e.get("mounted-nodes");return s||(s=new Map,e.register("mounted-nodes",s)),s.has(this)?(process.env.NODE_ENV!=="production"&&T.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})),()=>{s.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={},s){const i=[{properties:e},n];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const o=this.changesets.indexOf(i);o>-1&&(this.changesets.splice(o,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeProperties(e,n={},s){const i=[{properties:e},n];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const o=this.changesets.indexOf(i);o>-1&&(this.changesets.splice(o,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeLayout(e,n={},s){const i=[{layout:e},n];return this.changesets.push(i),this.events.dispatch("components:set-layout",{node:this}),()=>{if(!s)return;const o=this.changesets.indexOf(i);o>-1&&(this.changesets.splice(o,1),this.events.dispatch("components:set-layout",{node:this}))}}writeContext(e,n={},s){const i=[{context:e},n];return this.changesets.push(i),this.events.dispatch("components:set-context",{node:this}),()=>{if(!s)return;const o=this.changesets.indexOf(i);o>-1&&(this.changesets.splice(o,1),this.events.dispatch("components:set-context",{node:this}))}}getChildren(e="default"){const n=this.children[e]||[];return n.reduce((s,r,i)=>{const{order:o=i}=r.attributes.layout;return s[o]?s.splice(o,0,r):s[o]=r,s},Array(n.length))}remove(){this.parent&&this.parent.removeChild(this)}removeChild(e){Object.keys(this.children).forEach(n=>{const s=this.children[n],r=s.indexOf(e);r>-1&&(s.splice(r,1),this.events.dispatch("components:node-removed",{node:e,parentNode:this}))}),delete e.parent}}const yn=(t,e,n)=>{for(let s=0,r=t.length;s<r&&n(t[s])!==!0;s++){const i=e[t[s].id]||"default",o=t[s].getChildren(i);yn(o,e,n)}},At=(t,e,n)=>{if(n(t)!==!0){const s=e[t.id]||"default",r=t.children[s];yn(r,e,n)}},ot=(t,e)=>{const n=[];return At(t,e,s=>{n.push(s)}),n},ds=(t,e,n)=>{let s;return At(t,e,r=>{if(n(r))return s=r,!0}),s};class hs{constructor(e,n,s){b(this,"all",[]);b(this,"visible",[]);b(this,"detached",[]);this.root=e,this.switches=n,s.subscribe("components:node-appended",(r,i)=>{this.all.push(i.node),this.visible=ot(e,n)}),s.subscribe("components:node-removed",(r,i)=>{let o=this.all.indexOf(i.node);o>-1&&this.all.splice(o,1),o=this.visible.indexOf(i.node),o>-1&&this.visible.splice(o,1),this.visible=ot(e,n)}),s.subscribe("components:node-switched",(r,i)=>{this.visible=ot(e,n)})}query(e={}){const n=[];return At(this.root,this.switches,s=>{Object.keys(e).every(i=>e[i]===s[i])&&n.push(s)}),n}get(e){return ds(this.root,this.switches,n=>n.id===e)||this.detached.find(n=>n.id===e)}}class fs{constructor(){b(this,"handlers",new Map)}add(e,n){this.handlers.set(e,n)}get(e){return this.handlers.get(e)}}const ms=t=>{let e=t,n=0;for(;e.parent;)n=n+1,e=e.parent;return n},ps=t=>t.map(([n,s])=>[ms(n),n,s]).sort(([n],[s])=>n-s).map(([,n,s])=>[n,s]),at=t=>t instanceof Date?!1:t&&typeof t=="object"&&!Array.isArray(t),Q=(t,...e)=>{if(!e.length)return t;const n=e.shift();if(at(t)&&at(n))for(const s in n)at(n[s])?(t[s]||Object.assign(t,{[s]:{}}),Q(t[s],n[s])):Object.assign(t,{[s]:n[s]});return Q(t,...e)},gs=(t,e)=>!t||t==="all"?!0:t.some(n=>e.indexOf(n)>-1),ys=(t,e)=>{let n=[],s=[],r;const i=()=>{process.env.NODE_ENV!=="production"&&console.time("state-processor.flush");const u=new Map,l=ps(n.map((c,d)=>[c,s[d]])),h=(c,d)=>{var E;const f=u.get(c)||{},y=d.context&&!f.context,g=d.properties&&!f.properties,p=d.layout&&!f.layout;u.set(c,{context:f.context||y,properties:f.properties||g,layout:f.layout||p}),g&&(c.attributes.properties={}),p&&(c.attributes.layout={}),y&&(c.attributes.context=Q({},(E=c.parent)==null?void 0:E.attributes.context));const v=[],w=[],k=[];if(c.changesets.forEach(j=>{const[L,F]=j;gs(F.breakpoints,t.breakpoints)&&(g&&(typeof L.properties=="function"?v.push(L.properties):Q(c.attributes.properties,L.properties)),p&&(typeof L.layout=="function"?w.push(L.layout):Q(c.attributes.layout,L.layout)),y&&(typeof L.context=="function"?k.push(L.context):Q(c.attributes.context,L.context)))}),v.forEach(j=>{Q(c.attributes.properties,j(c.attributes.properties))}),w.forEach(j=>{Q(c.attributes.layout,j(c.attributes.layout))}),k.forEach(j=>{Q(c.attributes.context,j(c.attributes.context))}),y||d.recursive){const j=t.getBranch(c),L=d.recursive?d:{context:!!y};c.getChildren(j).forEach(F=>{h(F,L)})}};process.env.NODE_ENV!=="production"&&console.timeEnd("state-processor.flush"),l.forEach(([c,d])=>{h(c,d)}),n=[],s=[],e(u)},o=()=>{clearTimeout(r),r=setTimeout(i,0)};return(u,l)=>{const h=n.indexOf(u);if(h>-1){const c=s[h];return l.context&&(c.context=!0),l.properties&&(c.properties=!0),l.layout&&(c.layout=!0),l.recursive&&(c.recursive=!0),o()}return n.push(u),s.push(l),o()}};class vn{constructor(e,n={}){b(this,"events");b(this,"breakpoints",[]);b(this,"nodes");b(this,"actionsState",{handlers:[],watchers:[]});b(this,"switches",{});b(this,"changesets",[]);b(this,"subscriptions",[]);b(this,"processNode");b(this,"customComponentHandler",new fs);this.providers=n,this.events=e.events.createChild(this);const s=new Qt(this.events,"root");s.name=`root-${e.name}`,this.nodes=new hs(s,this.switches,this.events);const r=this.processNode=ys(this,i=>{const o=Array.from(i.keys());process.env.NODE_ENV!=="production"&&console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
|
|
2
|
+
${o.map(u=>`${u.name||"<no name>"} (${u.id})
|
|
3
|
+
`)}`),o.forEach(u=>{const l=i.get(u);u.parent&&u.parent.type==="root"&&this.events.dispatch("components:root-children-changed",{node:u}),l!=null&&l.context&&this.events.dispatch("components:context-changed",{node:u}),l!=null&&l.properties&&this.events.dispatch("components:properties-changed",{node:u}),l!=null&&l.layout&&this.events.dispatch("components:layout-changed",{node:u})}),this.events.dispatch("components:component-model-initialized",{},{bubbles:!0})});Promise.all(Object.keys(n).map(i=>n[i].load(this))),this.subscriptions.push(this.events.subscribe("components:node-appended",(i,o)=>{const{node:u}=o;this.changesets.forEach(l=>{const{changeset:h,target:c,removes:d}=l,[f,y]=h;c.match(o.node)&&(f.properties&&d.push(u.writeProperties(f.properties,y)),f.context&&d.push(u.writeContext(f.context,y)),f.layout&&d.push(u.writeLayout(f.layout,y)))})})),this.subscriptions.push(this.events.subscribe("components:node-appended",(i,o)=>{r(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-properties",(i,o)=>{r(o.node,{properties:!0})})),this.subscriptions.push(this.events.subscribe("components:set-context",(i,o)=>{r(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-indent",(i,o)=>{r(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:set-layout",(i,o)=>{r(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:node-switched",(i,{node:o,branch:u})=>{r(o,{layout:!0,recursive:!0,properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:node-removed",(i,{parentNode:o})=>{r(o,{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 s=new Qt(this.events,e);return n.detached&&this.nodes.detached.push(s),s}components(){return new Ue(this)}actions(e,n){return new zt(this,e,n)}write(e){const{provider:n,target:s,attributes:r,options:i={},removable:o}=e,u=e.key||me(),h={changeset:[r,i],target:s,removes:[]};if(n){const c=this.providers[n];c.write(u,s,r,i),h.removes.push(()=>{c.remove(u)})}return this.changesets.push(h),this.nodes.all.forEach(c=>{if(s.match(c)){let d=()=>{};r.properties&&(d=c.writeProperties(r.properties,i,o)),r.context&&(d=c.writeContext(r.context,i,o)),r.layout&&(d=c.writeContext(r.layout,i,o)),h.removes.push(d)}}),()=>{if(o){h.removes.forEach(d=>d());const c=this.changesets.indexOf(h);c>-1&&this.changesets.splice(c,1)}}}addComponentHandler(e,n){this.customComponentHandler.add(e,n)}getComponentHandler(e){return this.customComponentHandler.get(e)}dispose(){this.subscriptions.forEach(e=>e())}}const vs=(t,e,n,s=me(),r={})=>t.getAsync("components").then(i=>{let o;if(typeof e=="string"){const h=new Ue(i);h.ofType(e),o=h}else o=e;const u={},l=h=>{const c=u[h.id];return c?Promise.resolve(c.controller):vn.getInstance(t).then(d=>new hn(d,h,s))};i.events.subscribe("components:node-enter",(h,{node:c})=>{o.match(c)&&l(c).then(d=>{Promise.resolve(n(d)).then(f=>{u[c.id]={dispose:f,controller:d}})})}),i.events.subscribe("components:node-exit",(h,{node:c})=>{const d=u[c.id];d&&(d.dispose&&d.dispose(),r.reuseController||(d.controller.dispose(),delete u[c.id]))})});var Ee=(t=>(t.open="open",t.closed="closed",t.hidden="hidden",t))(Ee||{}),He=(t=>(t.guide="guide",t.link="link",t.default="default",t))(He||{});const Xt=t=>Promise.resolve().then(()=>require("./index-373df3a5.js")).then(({ServiceClient:e,ServiceProxy:n})=>t.get("settings").then(s=>{const{name:r,events:i}=t.get("$widget"),{data:{projection:o="",site:u="current",forceHttps:l=!1}}=s,h=new n(o,{credentials:"same-origin"}),c=new e(h,{funnel:r.replace("_contact-method","").replace("_contact",""),site:xs(u,l)},null,t);return i.subscribe("widget:settings-updated",(d,{data:f})=>{f&&f.projection!==o&&c.proxy.setBaseUrl(f.projection)}),c})),xs=(t,e)=>()=>{const n=r=>{const i=document.createElement("a");return i.href=r,i};let s=window.location;return t==="referrer"&&document.referrer&&(s=n(document.referrer)),[e?"https:":"","//",s.host,s.pathname].join("")};function K(t,e){return t.hints&&t.hints.indexOf(e)>-1}function bs(t){return t.constraints&&t.constraints.verifyValue}function ws(t){return t.constraints&&t.constraints.required}function Cs(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="linkText")[0]||null;return e?e.split("=")[1]:null}function $s(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="url")[0]||null;return e?e.split("=")[1]:null}function ks(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="availableHours")[0]||null;return e?e.split("=")[1]||[]:[]}function js(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="minuteInterval")[0]||null;return e?e.split("=")[1]||[]:[]}function en(t){return t.components?"Fieldset":K(t,"fullname")?"Name":K(t,"address")?"Address":K(t,"dropdown")?"DropDownList":K(t,"checkbox")?"CheckboxList":K(t,"radio")?"RadioButtonList":K(t,"email")?"Email":K(t,"agreement")?"Agreement":K(t,"phonenumber")?"PhoneNumber":K(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 Ss(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 Es(t){return t.children||t.components||t.groups?"object":"string"}class Tt{constructor(e,n,s,r=s.getErrorMessage,i=s.getGeneralErrors){b(this,"children",[]);b(this,"isValid");b(this,"schema");b(this,"id");if(this.name=e,this.source=n,this.parent=s,this.getErrorMessage=r,this.getGeneralErrors=i,this.isValid=!this.getGeneralErrors(this.source)&&!this.getErrorMessage(this.source),!this.isValid){let o=this.parent;for(;o;)o.isValid=!1,o=o.parent}n.dataPath=s&&s.source?`${s.source.dataPath}.${e}`:e,this.schema={type:"object",actionKey:s?`${s.createSchema().actionKey}.${e}`:e,required:[]}}createChild(e,n){const s=new Tt(e,n,this);return this.children.push(s),s}createSchema(){const e=Object.assign({},this.schema);return this.id&&(e.id=this.id),this.source&&(e.type=Es(this.source),e.title=this.source.title,e.evaluate=this.source.hasDependants,e.isValid=this.isValid,this.source.options&&(K(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(),ws(n.source)&&e.required.push(n.name)})),e}createLayout(){const e={};if(this.source){const s=en(this.source)==="Fieldset";e["ui:component"]=en(this.source),e["ui:placeholder"]=Ss(this.source),e["ui:description"]=this.source.description,e["ui:tags"]=this.source.hints?this.source.hints.filter(r=>r.indexOf("=")===-1):[],e["ui:hidden"]=!this.source.visible,e["ui:error"]=this.getErrorMessage(this.source)||s&&this.getGeneralErrors(this.source),this.source.options&&(e["ui:enumNames"]=this.source.options.map(r=>r.title)),s&&this.schema.required.length&&(e["ui:hasRequiredChildren"]=!0),e["ui:component"]==="Agreement"&&(e["ui:linkText"]=Cs(this.source),e["ui:link"]=$s(this.source)),e["ui:component"]==="PhoneNumber"&&(e["ui:options"]=this.source.options),e["ui:component"]==="Date"&&(e["ui:availableHours"]=ks(this.source),e["ui:minuteInterval"]=js(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"?K(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 Ns(t,e,n,s){const r=new Tt(t,{title:"",groups:e.groups},null,n,s);return r.id=t,r}let Ls=class{constructor(e,n,s){b(this,"root");this.validationSource=s,this.getErrorMessage=this.getErrorMessage.bind(this),this.getGeneralErrors=this.getGeneralErrors.bind(this),this.validationSource=s,this.root=Ns(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 Ms=(t,e)=>{const n=t.hints.find(s=>s.startsWith(e+"="));if(n)return n.substr(e.length+1)};function Rs(t,e,n,s){const r=_e(e),i=n?_e(n):void 0,o=new Ls(t,r,i),u=o.root;return(r.Groups||r.groups).forEach((l,h)=>{const c=l.title||"group",d=l.name||`${c}[${h}]`,f=u.createChild(d,l),y=l.components;y&&y.forEach((g,p)=>{const v=g.name||`${g.title}[${p}]`,w=f.createChild(v,g);if(bs(g)){const k=Ms(g,"verifyLabel")||`Confirm ${g.title}`;f.createChild(`${v}$VerifyValue`,{...g,name:`${g.name}$VerifyValue`,title:k,value:r.extra&&r.extra[`${g.name}$VerifyValue`]||""})}g.children&&g.children.forEach((k,E)=>{const j=k.name||`${k.title}[${E}]`;w.createChild(j,k)})})}),o.create()}const Ie=(t,e)=>typeof t>"u"?e:t,Os=(t,e)=>{let n=t["ui:order"];n||(n=[],t["ui:order"]=n),n.push(e)},zs=(t,e)=>`${t.schema.id}$${e}`,As=(t,e)=>(t.schema.properties=Ie(t.schema.properties,{}),t.schema.properties[e.name]={id:e.id||zs(t,e.name),type:e.type,title:e.title,isValid:!0,required:[],evaluate:Ie(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),Os(t.layout,e.name),t.layout=Ie(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=Ie(t.data,{}),t.data[e.name]=e.type==="object"?{}:e.value,t),Ts=(t,e)=>Object.assign({},{schema:t.schema.properties[e],layout:t.layout[e],data:t.data[e]}),Ps=(t,e,n)=>{const s=Ts(t,e),r=new ie(s);return n(r),r},xn=(t,e,n,s,r=[])=>{Object.keys(t).forEach(i=>{i===e&&r.indexOf(i)===-1&&(t[i]=n,r.push(i),s&&(t["data:options"]=t["data:options"]||{},t["data:options"][i]=s)),typeof t[i]=="object"&&xn(t[i],e,n,s,r)})},bn=(t,e,n,s)=>{t&&t["ui:component"]===e&&(t[`ui:${n}`]=s),t&&Object.keys(t).forEach(r=>{typeof t[r]=="object"&&bn(t[r],e,n,s)})},Be=(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(s=>{Be(t[s],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(s=>{t.properties&&Ve(t.properties[s],e,n)}),e===null&&n(t)};class ie{constructor(e){this.form=e}createComponent(e,n){return this.form=As(this.form,e),n&&Ps(this.form,e.name,n),new ie(this.form)}setData(e,n,s){xn(this.form.data,e,n,s)}setLayout(e,n,s){bn(this.form.layout,e,n,s)}setMeta(e){return this.form.meta=e,this.form}setValidationErrors(e){if(e){const{general:n,...s}=e;Be(this.form.layout,null,r=>r["ui:error"]=!1),Ve(this.form.schema,null,r=>r.isValid=!0),this.form.schema.isValid=!1,n&&this.form.layout["group[0]"]&&(this.form.layout["group[0]"]["ui:error"]=n),Object.keys(s).forEach(r=>{Be(this.form.layout,r,i=>i["ui:error"]=s[r]),Ve(this.form.schema,r,i=>i.isValid=!1)})}else Be(this.form.layout,null,n=>n["ui:error"]=!1),Ve(this.form.schema,null,n=>n.isValid=!0);return new ie(this.form)}get(){return this.form}static create(e){const n={schema:{id:e,type:"object",title:"",isValid:!0,required:[]},layout:{},data:{}};return new ie(n)}static fromLegacyForm(e,n,s,r){const i=Rs(e,n,s);return new ie(i)}}var xt=(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))(xt||{});const tn=()=>{const{opr:t,opera:e,InstallTrigger:n,HTMLElement:s,safari:r,documentMode:i,StyleMedia:o,chrome:u,CSS:l}=window,h=!!t&&!!t.addons||!!e||navigator.userAgent.indexOf(" OPR/")>=0;if(h)return"opera";if(n)return"firefox";const c=(y=>y.toString()==="[object SafariRemoteNotification]")(!r||typeof r<"u"&&r.pushNotification);if(/constructor/i.test(s)||c)return"safari";const d=!!i;if(d)return"internet-explorer";if(!d&&o)return"edge";const f=!!u&&(!!u.webstore||!!u.runtime);if(f)return"chrome";if(f&&navigator.userAgent.indexOf("Edg")!==-1)return"edge-chromium";if((f||h)&&l)return"blink"},Is=["string","number"],V=t=>Object.keys(t).reduce((e,n)=>{const s=typeof t[n]>"u"?"":t[n],r=typeof s;if(Is.indexOf(r)>-1){const i=n.substring(0,5);i==="data-"||i==="aria-"?e[ls(n)]=s.toString():n.substring(0,4)!=="css-"&&(e[n]=s.toString())}else e[n]=s;return e},{}),Ds=t=>new RegExp("^#","i").test(t),Hs=t=>({children:e,...n})=>{const{implementation:s,name:r}=t.get("$widget"),{href:i=""}=n;if(Ds(i))return a.jsx(Us,{smooth:!0,to:i,children:e});const o=s.bindings.map(h=>h.replace(/\./g,"\\.")).join("|"),l=new RegExp(`^((http[s]?:)?//)?(${o})/([^\\s]+)`).exec(i);if(l&&l.length>=4){const h=l[4];if(s.widgets.get(h)&&!h.startsWith("blob?")&&!h.startsWith(r))return a.jsx(xi,{widgetName:h,children:e})}return a.jsx("a",{...n,children:e})},Pt=t=>{const e={};return Object.keys(t).forEach(n=>{n.indexOf("css-")>-1&&(e[n]=t[n])}),e},wn=t=>{let e="";return Object.keys(Pt(t)).forEach(n=>{n.indexOf("css-")>-1&&(e+=`${n.replace("css-","")}:${t[n]};`)}),$.css`
|
|
4
|
+
${e}
|
|
5
|
+
`},Bs=(t,e)=>{let n="";const s=()=>{n=""},r=c=>{const d=document.getElementById(n);return d!==null?(c(d),s(),!0):!1},i=c=>(c.preventDefault(),s(),t.onClick&&t.onClick(c),typeof t.to=="string"&&(n=t.to.split("#").slice(1).join("#")),n!==""&&r(t.scroll||(d=>t.smooth?d.scrollIntoView({behavior:"smooth"}):d.scrollIntoView())),!1),{scroll:o,smooth:u,to:l,...h}=t;return e==="a"&&(h.href="javascript:;"),a.jsx(e,{...h,onClick:i,children:t.children})},oe=t=>(e,n)=>{let s=e,r="";if(["h1","h2","h3","h4","h5","h6"].includes(e))s=e;else{const u=e.match(/h1|h2|h3|h4|h5|h6/);if(u!=null&&u[0]){s=u[0];const[l]=e.split(s);r=l}}const o=((u,l,h)=>h[u]?`${l}${h[u]}`:`${l}${u}`)(s,r,t.theme.typographyVariantMapping||{});return $.css`
|
|
6
|
+
${o} {
|
|
7
|
+
${n}
|
|
8
|
+
}
|
|
9
|
+
`};var Vs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Cn(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function s(){if(this instanceof s){var r=[null];r.push.apply(r,arguments);var i=Function.bind.apply(e,r);return new i}return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var r=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,r.get?r:{enumerable:!0,get:function(){return t[s]}})}),n}var $n={exports:{}};(function(t,e){(function(n,s){t.exports=s(m)})(Vs,function(n){function s(d,f,y,g){return f===void 0&&(f={}),Object.keys(f).reduce(function(p,v){if(/^on.*/.test(v))return p;var w=v;/^(data|aria)-/.test(v)||y.filter(function(D){return D instanceof RegExp?D.test(v):D===v}).length===0&&(w=r(v));var k,E,j=g(d,w);if(j.name==="style")p[j.name]=(k=f.style,E={},k.split(";").filter(function(D){return D.trim()!==""}).forEach(function(D){var M,P=D.split(":");if(P.length>1){var H=function(z){return/^-ms-/.test(z)&&(z=z.substr(1)),z.startsWith("--")?z:r(z)}(P[0].trim()),R=(M=P.slice(1).join(":").trim(),/^\d+$/.test(M)?Number(M):M.replace(/'/g,'"'));E[H]=R}}),E);else{var L=f[v],F=L===""||String(L).toLowerCase()===w.toLowerCase();p[j.name]=j.isBoolean?F:L}return p},{})}function r(d){return d.replace(/(-|:)(.)/g,function(f,y,g){return g.toUpperCase()})}n=n&&n.hasOwnProperty("default")?n.default:n;var i=["table","tbody","thead","tfoot","tr"],o={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 u(d,f){var y=o[f],g=document.createElement(d);if(y)return{name:Array.isArray(y)?y[0]:y,isBoolean:l(g,Array.isArray(y)?y[1]||f:y)};for(var p in g)if(p.toLowerCase()===f.toLowerCase())return{name:p,isBoolean:l(g,p)};return{name:f,isBoolean:l(g,f)}}function l(d,f){return d.setAttribute(f,""),d[f]===!0||h.indexOf(f)>-1}var h=["itemScope"];function c(d,f,y,g){g===void 0&&(g=null);var p=y[d],v=y._;return p?n.createElement(p,f,g):v?v(d,f,g):n.createElement(d,f,g)}return function(d,f){if(f===void 0&&(f={}),typeof d!="string")throw new TypeError("Expected HTML string");var y=document.createElement("div");y.innerHTML=d.trim();var g=Array.from(y.childNodes).map(function(p,v){return function w(k,E,j){var L=j.transform||{},F=j.preserveAttributes||[],D=j.dangerouslySetChildren||["style"],M=L._;if(k.nodeType===8)return null;if(k.nodeType===3){var P=k.textContent;return M?M(P):P}for(var H={},R=k.attributes,z=0;z<R.length;z++)H[R[z].name]=R[z].value;H.key=E.toString();var U=k.tagName.toLowerCase(),ce=s(U,H,F,u),le=Array.from(k.childNodes).map(function(_,ne){return i.indexOf(U)>-1&&_.nodeType===3&&(_.textContent=_.textContent.trim(),_.textContent==="")?null:w(_,E+"."+ne,j)}).filter(Boolean);if(D.indexOf(U)>-1){var te=k.innerHTML;return te&&(U!=="style"&&U!=="script"&&(te=te.replace(/"/g,""")),ce.dangerouslySetInnerHTML={__html:te.trim()}),c(U,ce,L)}var pe=le.length===0?null:le;return c(U,ce,L,pe)}(p,String(v),f)}).filter(Boolean);return g.length===1?g[0]:g}})})($n);var qs=$n.exports;const nn=Fs(qs);function _s(t,e){return e?nn(t,e):nn(t)}const Zs=t=>e=>a.jsx(Yr,{attrs:e,htmlBody:t}),Ws=(t,e)=>({transform:{a:Hs(t),img:Zs(e)}}),Us=t=>Bs(t,"a"),W=m.forwardRef(({className:t,children:e,...n},s)=>a.jsx(Ks,{type:"button",className:N(t,"humany-button"),...V(n),ref:s,children:e})),Ks=x.button`
|
|
10
|
+
-webkit-appearance: button;
|
|
11
|
+
text-transform: none;
|
|
12
|
+
overflow: visible;
|
|
13
|
+
outline: none;
|
|
14
|
+
border: none;
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
font-family: inherit;
|
|
18
|
+
font-size: inherit;
|
|
19
|
+
line-height: normal;
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
`,Gs=m.createContext(new Rt),Ys=m.createContext(1),kn=m.createContext({id:"",type:"",name:"",branch:""}),Js=m.createContext({}),Qs=m.createContext(null);m.createContext(null);const ee=()=>m.useContext(Gs),jn=t=>{const e=m.useContext(kn),n=It(),[s,r]=m.useState();return m.useEffect(()=>{if((t||e.id)&&n){const i=n.nodes.get(t||e.id);r(i)}},[t,e.id,n]),s},Ke=()=>{const t=m.useRef(!1);return m.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t},It=t=>{const e=ee(),[n,s]=m.useState(null),r=Ke();return m.useEffect(()=>{vn.getInstance(t||e).then(i=>{r.current&&s(i)})},[r]),n},Sn=t=>{const e=jn(t),n=It(),[s,r]=m.useState({}),i=Ke();return m.useEffect(()=>{e&&i.current&&r(e.attributes.context)},[i,e]),m.useEffect(()=>{if(n){const o=n.events.subscribe("components:context-changed",(u,l)=>{e===l.node&&i.current&&r(l.node.attributes.context)});return()=>{o()}}},[i,n,e]),s},de=(t,e,n=window,s=()=>!0)=>{const r=m.useRef(()=>{});m.useEffect(()=>{r.current=e},[e]),m.useEffect(()=>{if(!(n&&s()))return;const o=u=>r.current(u);return n.addEventListener(t,o),()=>{n.removeEventListener(t,o)}},[t,n])},Xs=t=>{const e=ee(),{events:n}=(t||e).get("$widget");return n},er=()=>{const[t,e]=m.useState(!1);return m.useEffect(()=>{const n=()=>{e(!1)},s=r=>{r.keyCode===9&&e(!0)};return window.addEventListener("keydown",s),window.addEventListener("click",n),()=>{window.removeEventListener("keydown",s),window.removeEventListener("click",n)}},[]),t},be=(t,e)=>{const[n,s]=m.useState(!1),r=m.useCallback(o=>{const{key:u}=o;u===t&&(s(!0),e&&e(o))},[s,e]),i=m.useCallback(({key:o})=>{o===t&&s(!1)},[s]);return de("keydown",r,window),de("keyup",i,window),n},Dt=t=>{const e=m.useRef();return m.useEffect(()=>{e.current=t}),e.current},Ht=()=>m.useContext(Qs),Bt=t=>{const e=ee(),n=Ht(),[s,r]=m.useState({name:"",params:{}}),i=Ke();return m.useEffect(()=>{const o=(t||e).get("$widget");if(!o)return;const{events:u}=o;return u.subscribe("router:change",(h,{next:{routeData:c}})=>{if(i.current){const{name:d,params:f}=c;vt(f),r({name:d,params:f})}})},[i,t,e]),m.useEffect(()=>{if(n&&n.history&&i.current){const o=n.getRouteData(),{name:u,params:l}=o;vt(l),r({name:u,params:l})}},[n,i]),s},En=t=>{const e=m.useRef(),n=m.useRef(0);let s;const r=m.useCallback(()=>{var h;(h=e.current)==null||h.classList.add("humany-scrolling"),clearTimeout(s),s=setTimeout(()=>{var c;(c=e.current)==null||c.classList.remove("humany-scrolling")},500)},[e]),i=m.useCallback(h=>{n.current=h.touches[0].clientY},[e]),o=h=>u(h)?h===e.current?h:null:h.parentElement?o(h.parentElement):null,u=h=>h.scrollWidth>h.clientWidth||h.scrollHeight>h.clientHeight,l=m.useCallback(h=>{if(!h.cancelable)return;const c=h.touches[0].clientY,d=o(h.target);if(!d)return;const f=d.scrollTop,y=n.current-c<0?"up":"down",g=f<=0&&y==="up",p=f>=d.scrollHeight-d.offsetHeight&&y==="down";(g||p)&&h.preventDefault(),n.current=c},[e,n]);return de("scroll",r,e.current,()=>e.current&&t),de("touchstart",i,e.current,()=>e.current&&t),de("touchmove",l,e.current,()=>e.current&&t),t?[tr,e]:["",e]},tr=`
|
|
23
|
+
overflow-y: ${tn()===xt.Chrome||tn()===xt.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
|
+
`,nr=(t=!1)=>{const[e,n]=m.useState(t),s=m.useCallback(r=>{n(typeof r=="boolean"?r:i=>!i)},[]);return[e,s]},Ge=(t,e,n=[],s)=>{const r=Xs(s);return m.useEffect(()=>{if(r){const i=r.subscribe(t,e);return()=>{i()}}},[r].concat(n)),i=>r==null?void 0:r.dispatch(t,i)},Nn=(t,e)=>{const n=Ge("widget:menu-toggled",(s,r)=>{r!==t&&e()});return()=>n(t)},$e=m.forwardRef(({className:t,children:e,...n},s)=>a.jsx("span",{ref:s,className:N(t,"humany-text"),...V(n),children:e})),Vt=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
|
+
`,Ft=t=>{var e,n,s;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: ${(s=t.theme.fonts)==null?void 0:s.normal};
|
|
68
|
+
`},Ln=t=>{var o;const{primaryColor:e,secondaryColor:n,active:s,theme:r,disabled:i}=t;return $.css`
|
|
69
|
+
${Ft(t)}
|
|
70
|
+
border: 1px solid ${s?n:e};
|
|
71
|
+
background-color: ${s?e:n};
|
|
72
|
+
|
|
73
|
+
color: ${s?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: ${s?n:e};
|
|
82
|
+
font-size: ${(o=r.fonts)==null?void 0:o.normal};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
${!i&&$.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
|
+
${I(t)};
|
|
100
|
+
}
|
|
101
|
+
`}
|
|
102
|
+
`},I=t=>{var e,n,s;return $.css`
|
|
103
|
+
outline: ${(e=t.theme.accessibility)==null?void 0:e.border};
|
|
104
|
+
color: ${(s=(n=t.theme.accessibility)==null?void 0:n.colors)==null?void 0:s.inactiveText};
|
|
105
|
+
border-color: transparent;
|
|
106
|
+
`},sr=t=>$.css`
|
|
107
|
+
${I(t)}
|
|
108
|
+
text-decoration: underline;
|
|
109
|
+
`,bt=t=>{var e;return $.css`
|
|
110
|
+
${I(t)}
|
|
111
|
+
outline-offset: ${(e=t.theme.sizes)==null?void 0:e.small};
|
|
112
|
+
`},Mn=x(W)`
|
|
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
|
+
${I}
|
|
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
|
+
`,ae=x($e)`
|
|
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
|
+
`,Me=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
|
+
`},Ye=t=>{var e,n,s,r;return $.css`
|
|
153
|
+
> div {
|
|
154
|
+
${oe(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: ${(s=t.theme.colors)==null?void 0:s.text};
|
|
160
|
+
`)}
|
|
161
|
+
}
|
|
162
|
+
> ul {
|
|
163
|
+
${Me(t)}
|
|
164
|
+
}
|
|
165
|
+
${oe(t)("h1",$.css`
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
i {
|
|
169
|
+
margin: 7px ${(r=t.theme.sizes)==null?void 0:r.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
|
+
`},rr=t=>{var e,n,s,r,i,o;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: ${(s=t.theme.colors)==null?void 0:s.link};
|
|
205
|
+
&:focus-visible {
|
|
206
|
+
${sr(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: ${(r=t.theme.sizes)==null?void 0:r.normal} 0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
p:first-child {
|
|
221
|
+
margin: 0 0 ${(i=t.theme.sizes)==null?void 0:i.normal};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
p:last-child {
|
|
225
|
+
margin: ${(o=t.theme.sizes)==null?void 0:o.normal} 0 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
p:only-child {
|
|
229
|
+
margin: 0;
|
|
230
|
+
}
|
|
231
|
+
`},Je=({elementId:t="humany-portal-elements",parent:e=document.body,children:n})=>{const[s]=m.useState(()=>{const r=document.getElementById(t)||document.createElement("div");return r.id=t,r});return m.useEffect(()=>(e.appendChild(s),()=>{s.childElementCount<=1&&s.remove()}),[s]),Yn.createPortal(n,s)},q=({text:t="",backgroundSize:e="contain",size:n=12,symbol:s={content:"",type:""},elementStyle:r={},className:i,...o})=>{const{type:u,content:l}=s,h={"aria-label":t,role:"presentation"};switch(u){case"Uri":{const c={backgroundSize:e,backgroundImage:`url('${l}')`,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundAttachment:"center"};return a.jsx("i",{className:N(i,"humany-icon","humany-custom-icon"),title:t,style:{...c,...r},...h,...o})}case"Svg":{const c={className:N(i,"humany-icon"),width:`${n}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,ref:null},d={minWidth:`${n}`};switch(l){case"search":return a.jsxs("svg",{viewBox:"0 0 32 30",...c,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",...c,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",...c,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:d,...c,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:d,...c,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(ir,{viewBox:"0 0 14 14",style:d,...c,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:d,...c,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",...c,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",...c,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",...c,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",...c,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",...c,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",...c,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",...c,children:a.jsx("path",{d:"M0 1H22",stroke:"white"})});case"sorting":return a.jsx("svg",{viewBox:"0 0 18 14",...c,children:a.jsx("path",{d:"M18 1H0M8 13H0M13 7H0"})});case"copy":return a.jsxs("svg",{viewBox:"0 0 19 17",...c,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",...c,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",...c,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",...c,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",...c,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",...c,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 d.minWidth&&typeof d.minWidth=="number"&&(d.minWidth=`${d.minWidth}px`),a.jsxs("svg",{viewBox:"0 0 25 25",...c,style:d,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",...c,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",...c,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",...c,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",...c,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",...c,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",...c,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",...c,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",...c,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",...c,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(Ne,{className:i,faIcon:l,title:t,...o});default:case"Text":return t?a.jsx("i",{className:N(i,"humany-letter-symbol"),title:t,...h,...o,children:t.substring(0,2)}):null}},ir=x.svg`
|
|
232
|
+
transform: rotate(180deg);
|
|
233
|
+
`,or={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",span:"span"},Qe=({variant:t,component:e,className:n,children:s})=>{const{typographyVariantMapping:r={}}=Sn(),i={...or,...r},o=e||i[t]||"span";return a.jsx(ar,{className:n,as:o,children:s})},ar=x.span``,Xe=x.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
|
+
`;x(Qe)`
|
|
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 et=t=>$.css`
|
|
259
|
+
transition: ${t.duration}ms;
|
|
260
|
+
`;x(Xe)`
|
|
261
|
+
max-height: 0;
|
|
262
|
+
${et}
|
|
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
|
+
`;x(Xe)`
|
|
278
|
+
${et}
|
|
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
|
+
`;x(Xe)`
|
|
296
|
+
${et}
|
|
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
|
+
`;x(Xe)`
|
|
314
|
+
${et}
|
|
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 Rn=(t,e,n)=>{const[s,r]=m.useState(0),[i,o]=m.useState(0),u=m.useCallback((l,h)=>{if(l.preventDefault(),h){const c=h.getBoundingClientRect();r(Math.max(document.body.clientWidth-c.right,1)),o(c.bottom+window.scrollY)}},[s,i,r,o]);return m.useEffect(()=>{if(!n||!t)return;const l=n.getBoundingClientRect(),h={x:s,y:i};l.left<0&&(h.x=0),l.bottom>window.innerHeight&&(h.y=0),h.x!==s&&r(h.x),h.y!==i&&o(h.y)},[n,t,e]),[{x:s,y:i},u]};m.forwardRef(({className:t="",children:e=null,trigger:n,closeButtonAriaLabel:s,...r},i)=>{const o=m.useRef(),u=m.useRef(),l=m.useRef();m.useImperativeHandle(i,()=>l.current,[l.current]);const h=m.useRef(me()),[c,d]=m.useState(!1),f=Dt(c),[{x:y,y:g},p]=Rn(c,h.current,l.current),v=be("Escape");m.useEffect(()=>{v&&d(!1)},[v]),m.useEffect(()=>{c&&o.current?o.current.focus():!c&&u.current&&f&&u.current.focus()},[c,o.current,u.current]),de("click",E=>{const{target:j}=E;!l.current||!j||l.current!==j&&!l.current.contains(j)&&d(!1)},window),Ge("router:changed",()=>{d(!1)});const w=Nn(h.current,()=>{d(!1)}),k=m.useCallback(E=>{E.stopPropagation(),p(E,u.current),d(!c),w()},[w,p,d]);return a.jsxs(a.Fragment,{children:[c&&a.jsx(Je,{children:a.jsxs(cr,{className:N("humany-dropdown",`humany-dropdown-${h.current}`,t),...r,x:y,y:g,ref:l,children:[a.jsx(Mn,{onClick:()=>d(!1),tabIndex:0,ref:o,"aria-label":s,children:a.jsx(q,{symbol:{type:"Svg",content:"close"}})}),e]})}),m.cloneElement(n,{onClick:k,ref:u,"aria-label":n.props.title,"aria-expanded":c})]})});const cr=x.div`
|
|
333
|
+
${Vt}
|
|
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,s,r;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: ${((s=t.theme.sizes)==null?void 0:s.normal)||"0px"};`,t.x>0?e+=`right: ${t.x||"0"}px;`:e+=`left: ${((r=t.theme.sizes)==null?void 0:r.normal)||"0px"};`,e}};
|
|
340
|
+
`;x.div`
|
|
341
|
+
display: none;
|
|
342
|
+
`;const lr=m.forwardRef(({children:t,columns:e,gap:n,className:s,...r},i)=>a.jsx(ur,{className:N(s,"humany-grid"),"data-columns":e,"data-gap":n,...Pt(r),...V(r),ref:i,children:t})),ur=x.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
|
+
${wn}
|
|
349
|
+
`,On=m.forwardRef(({htmlParseInstruction:t=null,className:e,html:n,...s},r)=>{const i=ee(),[o,u]=m.useState();return m.useEffect(()=>{const l=Ws(i,n),h={...l,...t,transform:{...l.transform,...t==null?void 0:t.transform}},c=_s(n,h);u(c)},[n,t]),a.jsx("div",{className:N(e,"humany-html"),...V(s),ref:r,children:o})}),Ne=({faIcon:t,title:e,className:n="",role:s="presentation",...r})=>a.jsx("i",{className:N(n,`fa fa-${t}`),title:e,role:s,...V(r)}),zn=m.forwardRef(({className:t="",autoFocus:e=!1,onFocusChange:n=()=>{},onEnter:s=()=>{},onEscape:r=()=>{},selectAllOnFocus:i,onChange:o=()=>{},disabled:u=!1,type:l,...h},c)=>{const[d,f]=m.useState(e),y=m.useRef();m.useImperativeHandle(c,()=>y.current),m.useEffect(()=>{var v;e&&((v=y==null?void 0:y.current)==null||v.focus())},[e,c,y]);const g=(v,w)=>{f(v),n&&n(v),i&&v&&w.target.select()},p={...V(h),disabled:u,autoFocus:e,type:l,onKeyDown:v=>{v.key==="Enter"&&d&&s(v),v.key==="Escape"&&d&&r(v)},onFocus:v=>g(!0,v),onBlur:v=>g(!1,v),onChange:v=>o(v.target.value||""),className:N(t,"humany-input"),"data-type":l};return l!=="textarea"?a.jsx("input",{...p,ref:y}):a.jsx("textarea",{...p,ref:y})}),ke=m.forwardRef(({className:t,items:e,renderItem:n,renderLi:s=!1,...r},i)=>a.jsx("ul",{className:N(t,"humany-list"),"data-item-count":e.length,...V(r),ref:i,children:e.map((o,u,l)=>s?a.jsx("li",{className:"humany-list-item",children:n(o,u,l)},o.id||u):n(o,u,l))})),An=m.forwardRef(({text:t,html:e,header:n,className:s,htmlParseInstruction:r,symbol:i,...o},u)=>a.jsxs("div",{className:N(s,"humany-paragraph"),...V(o),ref:u,children:[n?a.jsxs(Qe,{variant:"h1",children:[i?a.jsx(q,{symbol:i}):null,n]}):null,e?a.jsx(On,{html:e,htmlParseInstruction:r}):null,t?a.jsx($e,{children:t}):null]})),Re=m.forwardRef(({header:t,customHeader:e,text:n,html:s,className:r,children:i,symbol:o,items:u,renderItem:l,renderLi:h,ulProps:c,...d},f)=>a.jsxs("div",{className:N(r,"humany-item-list"),"data-item-count":u.length,...V(d),ref:f,children:[e||(t||n||s?a.jsx(An,{symbol:o,header:t,text:n,html:s}):null),u.length?a.jsx(ke,{items:u,renderItem:l,renderLi:h,...c}):null,i]}));var Tn=function(){};process.env.NODE_ENV!=="production"&&(Tn=function(t,e,n){var s=arguments.length;n=new Array(s>2?s-2:0);for(var r=2;r<s;r++)n[r-2]=arguments[r];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 i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}});var dr=Tn,hr=dr;fr(hr);function fr(t){return t&&t.__esModule?t:{default:t}}function De(t){return t.charAt(0)==="/"}function ct(t,e){for(var n=e,s=n+1,r=t.length;s<r;n+=1,s+=1)t[n]=t[s];t.pop()}function mr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=t&&t.split("/")||[],s=e&&e.split("/")||[],r=t&&De(t),i=e&&De(e),o=r||i;if(t&&De(t)?s=n:n.length&&(s.pop(),s=s.concat(n)),!s.length)return"/";var u=void 0;if(s.length){var l=s[s.length-1];u=l==="."||l===".."||l===""}else u=!1;for(var h=0,c=s.length;c>=0;c--){var d=s[c];d==="."?ct(s,c):d===".."?(ct(s,c),h++):h&&(ct(s,c),h--)}if(!o)for(;h--;h)s.unshift("..");o&&s[0]!==""&&(!s[0]||!De(s[0]))&&s.unshift("");var f=s.join("/");return u&&f.substr(-1)!=="/"&&(f+="/"),f}const pr=Object.freeze(Object.defineProperty({__proto__:null,default:mr},Symbol.toStringTag,{value:"Module"})),gr=Cn(pr);var sn=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 Fe(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(l,h){return Fe(l,e[h])});var n=typeof t>"u"?"undefined":sn(t),s=typeof e>"u"?"undefined":sn(e);if(n!==s)return!1;if(n==="object"){var r=t.valueOf(),i=e.valueOf();if(r!==t||i!==e)return Fe(r,i);var o=Object.keys(t),u=Object.keys(e);return o.length!==u.length?!1:o.every(function(l){return Fe(t[l],e[l])})}return!1}const yr=Object.freeze(Object.defineProperty({__proto__:null,default:Fe},Symbol.toStringTag,{value:"Module"})),vr=Cn(yr);var xr=gr;Pn(xr);var br=vr;Pn(br);function Pn(t){return t&&t.__esModule?t:{default:t}}var wt=(t=>(t.scopedHash="scopedHash",t.hash="hash",t.browser="browser",t.memory="memory",t))(wt||{});const wr=(t,e)=>{const n=`humany-${e}=([^&?]+)&?`,s=new RegExp(n,"i"),r=t.match(s);return r&&r[1]||"/"};We(t=>{t.createCommand("routing",e=>n=>{const s={mode:n.mode};n.basePath&&(s.basePath=n.basePath),e.container.register("routingSettings",s)})});var X=(t=>(t.Cookie="cookie",t.Local="local",t.Session="session",t))(X||{}),qt=(t=>(t.Tenant="tenant",t.Implementation="implementation",t.Widget="widget",t))(qt||{}),Z=(t=>(t.Necessary="necessary",t.Functional="functional",t.Analytical="analytical",t.Marketing="marketing",t))(Z||{});const Cr=(t,e,n,s={})=>rn(t,n).then(r=>(process.env.NODE_ENV!=="production"&&r&&T.warn(`createStorageWriter: Attempted to create storage writer using unallowed category.
|
|
350
|
+
Key: ${e}
|
|
351
|
+
Category: ${JSON.stringify(n)}
|
|
352
|
+
Options: ${JSON.stringify(s)}`),i=>(Zt(t),rn(t,n).then(o=>{if(o){process.env.NODE_ENV!=="production"&&T.warn(`storageWriter: Attempted to write to storage using unallowed category.
|
|
353
|
+
Key: ${e}
|
|
354
|
+
Category: ${JSON.stringify(n)}
|
|
355
|
+
Value: ${JSON.stringify(i)}
|
|
356
|
+
Options: ${JSON.stringify(s)}`);return}const{scope:u=qt.Widget,medium:l=X.Session,duration:h}=s,c=jr();return c[u][e]=Hn(i,n,h),l===X.Cookie?Mr(t,c):Or(t,l,c)})))),$r=(t,e,n=X.Session)=>(Zt(t),typeof e>"u"?(process.env.NODE_ENV!=="production"&&T.warn("readStorage: Undefined key passed when reading storage. ",e,n),Promise.resolve(void 0)):n===X.Cookie?Lr(t).then(s=>$t(s,e)):Rr(t,n).then(s=>$t(s,e))),we=t=>!!Object.entries(t).filter(([e,n])=>typeof n<"u").length,lt=t=>Object.entries(t).filter(([e,n])=>typeof n<"u").forEach(([e,{value:n}])=>{typeof n>"u"&&delete t[e]}),In=(t,e)=>{const n={tenant:{...t.tenant,...e.tenant},implementation:{...t.implementation,...e.implementation},widget:{...t.widget,...e.widget}};return lt(n.tenant),lt(n.implementation),lt(n.widget),n},kr=t=>Object.entries(t).reduce((n,s)=>{const[r,i]=s;return Object.entries(i).forEach(o=>{const[u,{expiration:l}]=o;l&&n.push(l)}),n},[]).slice().sort((n,s)=>new Date(s).valueOf()-new Date(n).valueOf()).shift()||Wt(),tt=t=>{const{name:e,implementation:{name:n,tenant:s}}=t.get("$widget");return[`humany_${s}`,`humany_${Jt(s+n)}`,`humany_${Jt(s+n+e)}`]},ut=t=>{const e=new RegExp(`(?:^|;)\\s?${t}=(.*?)(?:;|$)`,"i"),n=document.cookie.match(e);return n&&n[1]&&JSON.parse(n[1])||void 0},dt=(t,e,n)=>{const s=`${t}=${JSON.stringify(e).trim()}`,r=`expires=${new Date(n).toUTCString()}`,i="path=/",o="SameSite=None;Secure";return document.cookie=`${s}; ${r}; ${i}; ${o}`},_t=t=>{const[e,n,s]=tt(t),r=ut(e)||{},i=ut(n)||{},o=ut(s)||{};return{tenant:r,implementation:i,widget:o}},Dn=(t,e)=>{const n=_t(t),s=In(n,e),[r,i,o]=tt(t),{tenant:u,implementation:l,widget:h}=s,c=kr(e),d=Wt({days:-1});dt(r,u,we(u)?c:d),dt(i,l,we(l)?c:d),dt(o,h,we(h)?c:d)},Ze=(t,e)=>{const[n,s,r]=tt(t),i=e.getItem(n)||"{}",o=e.getItem(s)||"{}",u=e.getItem(r)||"{}";return{tenant:JSON.parse(i),implementation:JSON.parse(o),widget:JSON.parse(u)}},Ct=(t,e,n)=>{const s=Ze(t,e),r=In(s,n),[i,o,u]=tt(t),{tenant:l,implementation:h,widget:c}=r;we(l)?e.setItem(i,JSON.stringify(l)):e.removeItem(i),we(h)?e.setItem(o,JSON.stringify(h)):e.removeItem(o),we(c)?e.setItem(u,JSON.stringify(c)):e.removeItem(u)},jr=()=>({tenant:{},implementation:{},widget:{}}),Sr=t=>t?!!t&&new Date>new Date(t):!1,$t=(t,e)=>{const n=t.widget[e]||t.implementation[e]||t.tenant[e];return n==null?void 0:n.value},Hn=(t,e,n)=>n?{value:t,category:e,expiration:typeof n=="object"?Wt(n):n}:{value:t,category:e},Er=(t,e)=>{const n=fe(t);return Object.entries(n).forEach(([s,r])=>{Object.entries(r).forEach(([i,o])=>{const{expiration:u,category:l}=o;(Sr(u)||Nr(e,l))&&(r[i]=Hn(void 0,l,u))})}),n},rn=(t,e)=>$r(t,"storagePolicy",X.Cookie).then((n=[Z.Necessary])=>!!e&&n.indexOf(e)===-1),Nr=(t=[Z.Necessary],e)=>!!e&&t.indexOf(e)===-1,Zt=t=>{const e=_t(t),n=Ze(t,window.localStorage),s=Ze(t,sessionStorage),r=$t(e,"storagePolicy"),[i,o,u]=[e,n,s].map(l=>Er(l,r));Dn(t,i),Ct(t,window.localStorage,o),Ct(t,window.sessionStorage,u)},Wt=(t={days:30})=>{const{days:e=0,hours:n=0,minutes:s=0,seconds:r=0}=t,i=new Date;return i.setTime(i.getTime()+n*60*60*1e3),i.setTime(i.getTime()+e*24*60*60*1e3),i.setTime(i.getTime()+s*60*1e3),i.setTime(i.getTime()+r*1e3),i.toISOString()},Lr=t=>Le(document)(()=>_t(t)),Mr=(t,e)=>Le(document)(()=>Dn(t,e)),Rr=(t,e)=>{const n=e===X.Local?window.localStorage:window.sessionStorage;return Le(n)(()=>Ze(t,n))},Or=(t,e,n)=>{const s=e===X.Local?window.localStorage:window.sessionStorage;return Le(s)(()=>Ct(t,s,n))};We(t=>{t.createCommand("storage",e=>(n={})=>{const{consent:s}=n;if(typeof s<"u"){if(typeof s!="number"&&typeof s!="string"&&!Array.isArray(s)){process.env.NODE_ENV!=="production"&&T.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(s)}`);return}if(Array.isArray(s)&&!s.every(i=>typeof i=="number"||typeof i=="string")){process.env.NODE_ENV!=="production"&&T.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(s)}`);return}const r=[Z.Necessary,Z.Functional,Z.Analytical,Z.Marketing].filter((i,o,u)=>typeof s=="number"?s>o:typeof s=="string"?u.indexOf(s)+1>o:Array.isArray(s)?s.findIndex(l=>l===o+1||l===i)>-1:!0);return r.indexOf(Z.Necessary)===-1&&(process.env.NODE_ENV!=="production"&&T.warn(`storagePolicyConfigurationApi: passed consent does not include category: '${Z.Necessary}'. Consent has to atleast include the '${Z.Necessary}' category.
|
|
359
|
+
Passed consent: ${JSON.stringify(s)}`),r.unshift(Z.Necessary)),Cr(e.container,"storagePolicy",Z.Necessary,{medium:X.Cookie,scope:qt.Tenant,duration:{days:365}}).then(i=>i(r)).then(()=>{Zt(e.container),e.events.dispatch("storage:policy-changed",r)})}})});const zr=m.forwardRef(({className:t,onClick:e=()=>{},name:n="",to:s="",params:r={},children:i,...o},u)=>{const l=Ht(),h=ee();if(!l)return null;let c="";const d={onClick:e,className:N(t,"humany-route-link"),to:c,innerRef:u,...o,ref:null};if(n){if(!(l.routes||[]).find(p=>p.name===n))return process.env.NODE_ENV!=="production"&&T.warn(`Unable to create route. No route named "${n}" exist.`),a.jsx(st.Link,{...d,onClick:p=>{e(p),p.preventDefault(),process.env.NODE_ENV!=="production"&&T.warn(`Unable to navigate. No route named "${n}" exist.`)},children:i});const g=Object.keys(r).reduce((p,v)=>{const w=r[v];if(Array.isArray(w)){if(w.length===0)return p;p[v]=w.map(k=>typeof k=="string"?encodeURIComponent(k):k).join(",")}else p[v]=typeof w=="string"?encodeURIComponent(w):w;return p},{});try{c=l.generate(n,g||{})}catch{return a.jsx(st.Link,{...d,ref:d.innerRef,children:i})}c&&l.settings.mode&&l.settings.mode===wt.browser&&c[0]!=="/"&&(c=`/${c}`)}else if(s&&l.history)c=l.history.createHref({hash:"",pathname:s,search:"",state:void 0});else return process.env.NODE_ENV!=="production"&&T.warn('Unable to generate path for route link. Either specify route name or use the "to" prop.'),null;if(l.settings&&l.settings.mode===wt.scopedHash){const f=h.get("$widget").name;c=wr(c,f)}return d.as?a.jsx(Ar,{...d,as:d.as,children:i}):a.jsx(st.Link,{...d,to:c,children:i})}),Ar=x.span``,Oe=m.forwardRef(({className:t,disabled:e=!1,role:n="link",tabIndex:s=0,onClick:r=()=>{},onKeyDown:i=()=>{},title:o,as:u,href:l,children:h,target:c,routeName:d,params:f,...y},g)=>{const p={title:o,disabled:e,role:n,as:u,tabIndex:s,className:N(t,"humany-link",[!!e,"humany-disabled"]),onClick:v=>{if(v.persist(),e){v.preventDefault();return}r(v)},onKeyDown:v=>{if(v.persist(),e){v.key!=="Tab"&&v.preventDefault();return}i(v)}};return d?a.jsx(Tr,{name:d,params:f,...p,...V(y),ref:g,children:h}):a.jsx(Pr,{href:l,target:c,...p,...V(y),ref:g,children:h})}),Tr=x(zr)`
|
|
360
|
+
${t=>t.disabled?`
|
|
361
|
+
pointer-events: none;
|
|
362
|
+
opacity: .7;
|
|
363
|
+
`:"cursor: pointer;"}
|
|
364
|
+
`,Pr=x.a`
|
|
365
|
+
${t=>t.disabled?`
|
|
366
|
+
pointer-events: none;
|
|
367
|
+
opacity: .7;
|
|
368
|
+
`:"cursor: pointer;"}
|
|
369
|
+
`,Bn=({visible:t,duration:e=500,children:n,onClick:s=()=>{},...r})=>{const i=m.useRef(),o=m.useCallback(u=>{u.target===i.current&&s(u)},[s]);return a.jsx(Gn.CSSTransition,{in:t,className:"humany-overlay-transition",classNames:"humany-overlay-transition",unmountOnExit:!0,timeout:e,children:a.jsx(Je,{children:a.jsx(Ir,{className:"humany-overlay",duration:e,ref:i,onClick:o,...r,children:n})})})},Ir=x.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
|
+
`,Dr=$.keyframes`
|
|
400
|
+
100% {
|
|
401
|
+
transform: rotate(360deg);
|
|
402
|
+
}
|
|
403
|
+
`,Hr=$.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
|
+
`,Br=x.svg`
|
|
417
|
+
animation: ${Dr} 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
|
+
`,Vr=x.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
|
+
`,Fr=x.div`
|
|
447
|
+
position: relative;
|
|
448
|
+
margin: 0 auto;
|
|
449
|
+
width: 100px;
|
|
450
|
+
&:before {
|
|
451
|
+
content: '';
|
|
452
|
+
display: block;
|
|
453
|
+
padding-top: 100%;
|
|
454
|
+
}
|
|
455
|
+
`,qr=x.circle`
|
|
456
|
+
stroke-dasharray: 1, 200;
|
|
457
|
+
stroke-dashoffset: 0;
|
|
458
|
+
animation: ${Hr} 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
|
+
`,_r=({className:t,loading:e=!1})=>a.jsx(Vr,{className:N("humany-loader",t),"data-loading":e,children:a.jsx(Fr,{className:"humany-spinner",children:a.jsx(Br,{viewBox:"25 25 50 50",children:a.jsx(qr,{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"2","stroke-miterlimit":"10"})})})}),Zr=({zoomState:t,image:e,changeZoom:n,...s})=>{var g;const r=m.useRef(null),[i,o]=m.useState(!1),[u,l]=m.useState(!1),{width:h,height:c,...d}=s.style||{},f=m.useCallback(()=>{const p=r.current;if(p){const v=window.innerWidth/p.naturalWidth,w=window.innerHeight/p.naturalHeight,k=Math.min(v,w);return w>=1&&v>=1?1:k}return 1},[i,e.src]),y=m.useMemo(()=>{const p=r.current;if(p&&i){if(!u){l(!0);const v=f();n(v)}return p.naturalWidth>=p.naturalHeight?[`${t*p.naturalWidth}px`,"auto"]:["auto",`${t*p.naturalHeight}px`]}return null},[t,r,i,e.src]);return m.useEffect(()=>(o(!1),function(){l(!1)}),[e.src]),a.jsxs(a.Fragment,{children:[a.jsx(Wr,{loading:!i}),a.jsx(Ur,{onLoad:()=>{o(!0)},ref:r,imageSize:y,draggable:"false",...s,alt:((g=s.alt)==null?void 0:g.toString())||"",style:d,src:e.src,loaded:i}),a.jsx(Kr,{})]})},Wr=x(_r)`
|
|
463
|
+
svg circle {
|
|
464
|
+
stroke: #ffffff;
|
|
465
|
+
}
|
|
466
|
+
`,Ur=x.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
|
+
`,Kr=x.div`
|
|
478
|
+
height: 100%;
|
|
479
|
+
display: inline-block;
|
|
480
|
+
vertical-align: middle;
|
|
481
|
+
`,Gr=()=>{const t=m.useRef(),[e,n]=m.useState(!0),s=m.useCallback(()=>(e||n(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{n(!1)},3e3),()=>{t.current&&clearTimeout(t.current)}),[e,t]);return[e,s]},Yr=({attrs:t,htmlBody:e})=>{var ze;const n=be("Escape"),s=be("ArrowLeft"),r=be("ArrowRight"),[i,o]=m.useState(1),[u,l]=m.useState({top:0,left:0,x:0,y:0}),[h,c]=m.useState(!1),[d,f]=Gr(),[y,g]=m.useState(null),[p,v]=m.useState(null),w=m.useRef(null),k=m.useRef(null),E=m.useRef(null),j=m.useRef(null),L=m.useRef(null),[F,D]=m.useState(null);m.useEffect(()=>{n&&g(null)},[n]),m.useEffect(()=>{o(1)},[y]),m.useEffect(()=>{var B,Y;if(y===null||k.current===null)return;const C=k.current.firstElementChild,S=(B=E.current)==null?void 0:B.querySelector(".nav-left"),O=(Y=E.current)==null?void 0:Y.querySelector(".nav-right");if(p==="Right")ge&&O?O.focus():ne&&S&&S.focus();else if(p==="Left")ne&&S?S.focus():ge&&O&&O.focus();else{if(!C)return;C.focus()}},[y,k,E,p]),m.useEffect(()=>{if(s){if(ne)return pe()}else if(r&&ge)return _()},[s,r]),m.useEffect(()=>{var S,O;const C=((O=(S=L.current)==null?void 0:S.style)==null?void 0:O.float)||"";(C==="left"||C==="right")&&D(C)},[]);const M=m.useMemo(()=>{const C=document.createElement("div");C.innerHTML=e||"";const S=C.getElementsByTagName("img");return Array.from(S).reduce((B,Y)=>{const se=Y.getAttribute("src");if(se){const ye={src:se};B.push(ye)}return B},[])},[e]),P=m.useCallback(()=>{const{src:C}=t;if(C){const S=M.findIndex((O,B)=>O.src===C);g(S)}},[M,t]),H=m.useCallback(C=>{g(null)},[]),R=m.useCallback(C=>{o(C?i+i*.25:i-i*.25)},[o,i]),z=m.useCallback(()=>{if(y!==null){const{src:C}=M[y];C&&window.open(C,"_self")}},[M,y]),U=m.useCallback(C=>{const S=j.current;S&&(l({top:S.scrollTop,left:S.scrollLeft,x:C.clientX,y:C.clientY}),c(!0))},[j]),ce=m.useCallback(C=>{const S=j.current;if(S&&h){const O=C.clientX-u.x,B=C.clientY-u.y;S.scrollTop=u.top-B,S.scrollLeft=u.left-O}},[h,u]),le=C=>{C.preventDefault(),c(!1)},te=m.useMemo(()=>{if(j.current){const C=j.current.getElementsByTagName("img");if(C&&C.length){const S=C[0];return S.width>window.innerWidth||S.height>window.innerHeight}}return!1},[j,i]),pe=()=>{y!==null&&(v("Left"),g(y-1))},_=()=>{y!==null&&(v("Right"),g(y+1))},ne=y!==null&&y>0&&M.length>1,ge=y!==null&&M.length-1>y;return a.jsxs(a.Fragment,{children:[a.jsx(Bn,{visible:y!==null,onClick:H,children:a.jsxs(ri,{onMouseDown:()=>f(),onMouseMove:()=>f(),onTouchStart:()=>f(),onKeyDown:()=>f(),children:[a.jsx(ii,{show:d.toString(),children:a.jsx(ei,{ref:k,buttons:[{id:"download",onClick:z,icon:"download",ariaLabel:"Download image"},{id:"lightbox-close",onClick:()=>g(null),icon:"lightbox-close",ariaLabel:"Close"}]})}),a.jsx(ai,{scrolling:h.toString(),isDraggable:te.toString(),ref:j,onMouseMove:ce,onMouseDown:U,onMouseUp:le,children:y!==null&&a.jsx(Zr,{changeZoom:C=>{o(C)},zoomState:i,...t,style:{...t.style||{},float:"none"},image:M[y]})}),a.jsx(ni,{ref:E,show:d.toString(),buttons:[{id:"previous",onClick:pe,icon:"caret-left",circle:!0,show:ne,className:"nav-left",ariaLabel:"Navigate to previous image"},{id:"next",onClick:_,icon:"caret-right",circle:!0,show:ge,className:"nav-right",ariaLabel:"Navigate to next image"}]}),a.jsxs(oi,{show:d.toString(),children:[a.jsx(ti,{buttons:[{id:"zoom-out",onClick:()=>R(!1),icon:"zoom-out",ariaLabel:"Zoom out"},{id:"zoom-in",onClick:()=>R(!0),icon:"zoom-in",ariaLabel:"Zoom in"}]}),a.jsxs(si,{variant:"span",children:[Math.trunc(i*100),"%"]})]})]})}),a.jsx(Jr,{ref:w,onClick:P,onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),P())},alignment:F,tabIndex:0,children:a.jsx(ci,{...t,alt:((ze=t.alt)==null?void 0:ze.toString())||"",ref:L})})]})},Ut=m.forwardRef(({show:t="true",buttons:e,className:n},s)=>a.jsx(Qr,{ref:s,show:t,className:N("humany-button-set",n),children:e.map(({id:r,circle:i=!1,show:o=!0,ariaLabel:u,onClick:l,icon:h,className:c},d)=>a.jsx(Xr,{circle:i.toString(),onClick:l,tabIndex:o?void 0:-1,show:o.toString(),icon:h,className:c,"aria-label":u,children:a.jsx(q,{size:24,symbol:{type:"Svg",content:h}})},r+d.toString()))})),Vn=x.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
|
+
`,Jr=x(Oe)`
|
|
489
|
+
display: inline-block !important;
|
|
490
|
+
|
|
491
|
+
${t=>(t.alignment==="right"||t.alignment==="left")&&$.css`
|
|
492
|
+
float: ${t.alignment};
|
|
493
|
+
`}
|
|
494
|
+
`,Qr=x(Vn)`
|
|
495
|
+
position: fixed;
|
|
496
|
+
display: flex;
|
|
497
|
+
gap: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
|
|
498
|
+
`,kt="39px",Xr=x(W)`
|
|
499
|
+
width: ${kt};
|
|
500
|
+
height: ${kt};
|
|
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
|
+
${I(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
|
+
${I(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
|
+
`,ei=x(Ut)`
|
|
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
|
+
`,ti=x(Ut)`
|
|
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
|
+
`,ni=x(Ut)`
|
|
569
|
+
display: block;
|
|
570
|
+
button {
|
|
571
|
+
position: fixed;
|
|
572
|
+
top: calc(50% - calc(${kt} / 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
|
+
`,si=x(Qe)`
|
|
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
|
+
`,Fn=x(Vn)`
|
|
588
|
+
position: absolute;
|
|
589
|
+
width: 100vw;
|
|
590
|
+
height: 88px;
|
|
591
|
+
left: 0px;
|
|
592
|
+
z-index: 5;
|
|
593
|
+
`,ri=x.div`
|
|
594
|
+
width: 100%;
|
|
595
|
+
`,ii=x(Fn)`
|
|
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
|
+
`,oi=x(Fn)`
|
|
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
|
+
`,ai=x.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
|
+
`,ci=x.img`
|
|
619
|
+
cursor: pointer;
|
|
620
|
+
`,li=m.forwardRef(({className:t,children:e,trigger:n,onOverlayClick:s=()=>{},close:r=!1,...i},o)=>{const[u,l]=nr(),[h,c]=En(!0),d=m.useRef(),f=m.useRef(me()),y=be("Escape");m.useEffect(()=>{(y||r)&&l(!1)},[y,r]),m.useEffect(()=>{u&&d.current&&d.current.focus()},[u,d.current]),Ge("router:changed",()=>{l(!1)});const g=m.useCallback(v=>{l(!1),s(v)},[s,l]);m.useImperativeHandle(o,()=>({close(){l(!1)}}));const p=m.useCallback(()=>Nn(f.current,()=>{l(!1)}),[f.current]);return a.jsxs(a.Fragment,{children:[a.jsx(Bn,{visible:u,onClick:g,children:a.jsxs(ui,{className:N(t,"humany-modal",`humany-modal-${f.current}`),css:h,tabIndex:-1,...i,ref:c,children:[a.jsx(Mn,{onClick:()=>l(!1),tabIndex:0,ref:d,children:a.jsx(q,{symbol:{type:"Svg",content:"close"}})}),e]})}),m.cloneElement(n,{onClick:v=>{l(),p()}})]})}),ui=x.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=>Vt(t)}
|
|
628
|
+
${t=>t.css&&t.css}
|
|
629
|
+
outline: none;
|
|
630
|
+
`,di=({className:t,trigger:e,header:n="",text:s="",onCancel:r=()=>{},onConfirm:i=()=>{},cancelLabel:o="",confirmLabel:u=""})=>{const l=m.useRef(),h=m.useCallback(()=>{var d;r(),(d=l==null?void 0:l.current)==null||d.close()},[r]),c=m.useCallback(()=>{var d;i(),(d=l==null?void 0:l.current)==null||d.close()},[i]);return a.jsxs(hi,{className:t,trigger:e,ref:l,onOverlayClick:h,children:[n&&a.jsx(ae,{children:n}),s&&a.jsx(ae,{children:s}),u&&a.jsx(fi,{onClick:c,children:u}),o&&a.jsx(mi,{onClick:h,children:o})]})},hi=x(li)`
|
|
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
|
+
`,fi=x(W)`
|
|
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
|
+
${I}
|
|
659
|
+
}
|
|
660
|
+
`,mi=x(W)`
|
|
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
|
+
${I};
|
|
671
|
+
}
|
|
672
|
+
`;x.div`
|
|
673
|
+
display: flex;
|
|
674
|
+
flex-wrap: wrap;
|
|
675
|
+
`;x.div`
|
|
676
|
+
${t=>oe(t)("h2",$.css`
|
|
677
|
+
padding: 0;
|
|
678
|
+
margin: 0;
|
|
679
|
+
color: gray;
|
|
680
|
+
font-size: 7em;
|
|
681
|
+
`)}
|
|
682
|
+
`;x.div`
|
|
683
|
+
margin-left: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
|
|
684
|
+
|
|
685
|
+
${t=>{var e;return oe(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
|
+
`;x.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 jt=m.forwardRef(({className:t,description:e,text:n,children:s,...r},i)=>a.jsxs(Oe,{className:N(t,"humany-text-link"),...r,ref:i,children:[s,a.jsx($e,{children:n}),e?a.jsx(On,{html:e,className:"humany-description"}):null]}));var qn=(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))(qn||{});const _n=({className:t="",format:e="hh:mm",timestamp:n})=>a.jsx("span",{className:N(t,"humany-timestamp"),children:pi(n,e)}),on=t=>`0${t}`.slice(-2);function pi(t,e){const n=new Date(t),s=n.toTimeString().split(" ")[0].split(":"),r=s.length>1?`${s[0]}:${s[1]}`:s[0],i=n.getFullYear(),o=n.getMonth()+1,u=n.getDate(),l=`${i}-${on(o)}-${on(u)}`;return e==="yyyy-mm-dd"?l:e==="hh:mm"?r:`${l} ${r}`}const gi=({className:t,children:e,content:n,sticky:s=!1,...r})=>{const[i,o]=m.useState(!1),u=m.useRef(me()),l=m.useRef(),[{x:h,y:c},d]=Rn(i,u.current,l.current),f=g=>{const{target:p}=g;!l.current||!p||l.current!==p&&!l.current.contains(p)&&o(!1)};m.useEffect(()=>{if(s)return window.addEventListener("click",f),()=>{window.removeEventListener("click",f)}},[i,s]);const y=m.useCallback((g,p)=>{d(g,l.current),o(p)},[d,o]);return a.jsxs(yi,{ref:l,className:"humany-tooltip-trigger",onMouseEnter:s?void 0:g=>y(g,!0),onMouseLeave:s?void 0:g=>y(g,!1),onTouchEnd:s?g=>y(g,!i):void 0,onClick:s?g=>y(g,!i):void 0,children:[e,i&&a.jsx(Je,{children:a.jsx(vi,{className:N(t,"humany-tooltip-container"),x:h,y:c,...r,children:n})})]})},yi=x.div`
|
|
702
|
+
display: flex;
|
|
703
|
+
align-items: center;
|
|
704
|
+
`,vi=x.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
|
+
`,xi=m.forwardRef(({className:t,children:e,onClick:n=()=>{},widgetName:s,activationOptions:r,...i},o)=>{const u=ee(),l=()=>{const{implementation:d}=u.get("$widget");return d.widgets.get(s)};m.useEffect(()=>{const d=l();return d==null||d.activate(r).then(()=>d.invoke("attach")),()=>{d==null||d.deactivate()}},[s]);const h=d=>{const f=l(),y=d.currentTarget;if(f){const g=()=>{f.invoke("renderState").then(p=>p===Ee.open?f.invoke("close"):f.invoke("open")).then(()=>{f.events.subscribeOnce("widget:area-rendered",(p,v)=>{u.get("widgetDOMElement")&&f.events.dispatch("widget:modal-opened",{name:f.name,ref:y})})})};f.state===dn.Deactivated?f.activate(r).then(()=>f.invoke("attach")).then(g):g()}},c=d=>{d.key==="Enter"&&(d.preventDefault(),h(d))};return a.jsx(Oe,{className:N(t,"humany-widget-link"),onKeyDown:c,onClick:d=>{n(d),h(d)},...i,ref:o,children:e})});m.forwardRef(({portalId:t="humany-widget-overlay-portal",className:e,children:n},s)=>{const r=ee(),i=m.useMemo(()=>{if(!r)return null;const o=r.get("widgetDOMElement");return!o||!o.childElementCount?null:o.children[0]},[r]);return i?a.jsx(Je,{elementId:t,parent:i,children:a.jsx(bi,{className:N("humany-widget-overlay-outlet",e),ref:s,children:n})}):null});const bi=x.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
|
+
`,wi=(t,e,n,s,r)=>t.getAsync("componentResolver").then(i=>(i.registerComponent(e,m.lazy(()=>n)),vs(t,e,s||(()=>{}),e,r)));x.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 oe(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
|
+
`;x(ke)`
|
|
747
|
+
${Me}
|
|
748
|
+
li {
|
|
749
|
+
font-weight: 300;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
> li {
|
|
753
|
+
white-space: normal;
|
|
754
|
+
}
|
|
755
|
+
`;m.createContext(()=>{});x.div`
|
|
756
|
+
textarea:focus-visible,
|
|
757
|
+
input:focus-visible,
|
|
758
|
+
select:focus-visible {
|
|
759
|
+
${I}
|
|
760
|
+
}
|
|
761
|
+
button:focus-visible {
|
|
762
|
+
${I}
|
|
763
|
+
background-color: transparent;
|
|
764
|
+
}
|
|
765
|
+
`;x.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
|
+
${I}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
.check:after {
|
|
802
|
+
content: '';
|
|
803
|
+
position: absolute;
|
|
804
|
+
display: none;
|
|
805
|
+
}
|
|
806
|
+
`;x.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
|
+
`;const Ci=({isRequired:t})=>t?a.jsx(Si,{children:"*"}):null,Zn=({title:t,required:e,children:n,error:s,elementId:r="",description:i="",className:o="",ui:{component:u,error:l}={}})=>{const h=a.jsx(Ci,{isRequired:e});return a.jsxs($i,{className:N(o,"humany-form-component"),"data-type":u,"data-error":s,children:[r.length?a.jsxs("label",{htmlFor:r,className:"humany-form-component-title",children:[t,h]}):a.jsxs(ji,{className:"humany-form-component-title",children:[t,h]}),n,l&&a.jsxs(Ei,{id:`${r}_error`,children:[a.jsx(q,{size:19,symbol:{type:"Svg",content:"alert"}}),a.jsx("span",{children:l})]}),i&&a.jsx(ki,{className:"humany-form-component-description",children:i})]})},$i=x.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
|
+
`,ki=x(ae)`
|
|
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
|
+
`,ji=x(ae)`
|
|
855
|
+
display: block;
|
|
856
|
+
font-size: 18px;
|
|
857
|
+
margin: 0 0 10px 0;
|
|
858
|
+
`,Si=x.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
|
+
`,Ei=x.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
|
+
`;x(Zn)`
|
|
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
|
+
`;const Kt=t=>{var e,n,s;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: ${(s=t.theme.colors)==null?void 0:s.primary}`:""}
|
|
905
|
+
`};x(zn)`
|
|
906
|
+
${Kt}
|
|
907
|
+
${t=>t["data-type"]==="textarea"&&$.css`
|
|
908
|
+
resize: vertical;
|
|
909
|
+
min-height: 100px;
|
|
910
|
+
`}
|
|
911
|
+
`;x(ke)`
|
|
912
|
+
${t=>Me(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
|
+
`;x.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
|
+
`;x.select`
|
|
937
|
+
${t=>Kt(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
|
+
`;x.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
|
+
`;x.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
|
+
`;x.div`
|
|
958
|
+
display: flex;
|
|
959
|
+
flex-direction: row;
|
|
960
|
+
width: 100%;
|
|
961
|
+
justify-content: space-between;
|
|
962
|
+
`;x.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
|
+
`;x(W)`
|
|
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
|
+
`;x.p`
|
|
995
|
+
margin-bottom: 5px;
|
|
996
|
+
`;x(W)`
|
|
997
|
+
flex: 1 0 auto;
|
|
998
|
+
align-self: flex-end;
|
|
999
|
+
text-align: right;
|
|
1000
|
+
`;x(W)`
|
|
1001
|
+
flex: 1 0 auto;
|
|
1002
|
+
align-self: flex-start;
|
|
1003
|
+
text-align: left;
|
|
1004
|
+
`;x.select`
|
|
1005
|
+
${t=>Kt(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
|
+
`;x.fieldset`
|
|
1013
|
+
border: none;
|
|
1014
|
+
margin: 0;
|
|
1015
|
+
padding: 0;
|
|
1016
|
+
white-space: normal;
|
|
1017
|
+
legend {
|
|
1018
|
+
display: block;
|
|
1019
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.medium}};
|
|
1020
|
+
line-height: 29px;
|
|
1021
|
+
margin: 0 0 15px 0;
|
|
1022
|
+
font-weight: normal;
|
|
1023
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
|
|
1024
|
+
}
|
|
1025
|
+
> span {
|
|
1026
|
+
margin: 15px 0 0 0;
|
|
1027
|
+
display: block;
|
|
1028
|
+
}
|
|
1029
|
+
&:not(:last-child) {
|
|
1030
|
+
margin: 0 0 15px 0;
|
|
1031
|
+
}
|
|
1032
|
+
${t=>{var e;return t["data-type"]==="Name"&&t["data-multiline-form"]&&$.css`
|
|
1033
|
+
> div {
|
|
1034
|
+
display: grid;
|
|
1035
|
+
grid-template-columns: repeat(2, 1fr);
|
|
1036
|
+
grid-gap: ${(e=t.theme.sizes)==null?void 0:e.medium};
|
|
1037
|
+
div {
|
|
1038
|
+
margin: 0;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
`}}
|
|
1042
|
+
${t=>{var e;return t["data-type"]==="Address"&&t["data-multiline-form"]&&$.css`
|
|
1043
|
+
> div {
|
|
1044
|
+
display: grid;
|
|
1045
|
+
grid-template-columns: repeat(8, 1fr);
|
|
1046
|
+
grid-gap: ${(e=t.theme.sizes)==null?void 0:e.medium};
|
|
1047
|
+
div {
|
|
1048
|
+
margin: 0;
|
|
1049
|
+
&:nth-child(1) {
|
|
1050
|
+
grid-column: span 6;
|
|
1051
|
+
}
|
|
1052
|
+
&:nth-child(2) {
|
|
1053
|
+
grid-column: span 2;
|
|
1054
|
+
}
|
|
1055
|
+
&:nth-child(3) {
|
|
1056
|
+
grid-column: span 3;
|
|
1057
|
+
}
|
|
1058
|
+
&:nth-child(4) {
|
|
1059
|
+
grid-column: span 5;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
`}}
|
|
1064
|
+
`;const Ni=1e7,ht={fileName:null,fileSize:null,fileType:null,error:null},Li=t=>!(t>Ni);class Mi extends m.Component{constructor(){super(...arguments);b(this,"state",ht);b(this,"reader");b(this,"input");b(this,"handleFileLoad",n=>{const s=this.reader.result;this.props.prompt(s,{fileName:this.state.fileName})});b(this,"handleFileChange",n=>{const s=this.input.files[0];if(s){if(!Li(s.size)){const r=this.props.componentInstanceProps?this.props.componentInstanceProps.fileSizeErrorLabel:"Attached file exceeds maximum file size.";this.setState({...ht,error:r}),this.input.value=null,this.props.prompt("",{fileName:""});return}this.setState({...ht,fileName:s.name,fileSize:s.size,fileType:s.type},()=>{this.reader.readAsDataURL(s)})}})}componentDidMount(){this.reader=new FileReader,this.reader.addEventListener("load",this.handleFileLoad,!1)}componentWillUnmount(){this.reader.removeEventListener("load",this.handleFileLoad)}render(){const{id:n,required:s,disabled:r,accessibility:i={},className:o="",title:u="",placeholder:l="",value:h="",...c}=this.props,d=this.state.fileName?a.jsx(ae,{children:this.state.fileName}):this.props.componentInstanceProps&&this.props.componentInstanceProps.fileUploadHeader?a.jsx("em",{children:this.props.componentInstanceProps.fileUploadHeader}):null;return a.jsxs(Ri,{elementId:n,title:u,required:s,className:N(o,"humany-form-component-file"),id:n,disabled:r,value:h,...c,children:[this.state.error&&a.jsx(zi,{className:"humany-file-error",children:this.state.error}),a.jsx(Oi,{id:n,type:"file",placeholder:l,"aria-label":l,disabled:r,ref:f=>{this.input=f},onChange:this.handleFileChange,...i}),a.jsx(Ai,{htmlFor:n,role:"button",children:u}),d]})}}b(Mi,"contextTypes",{texts:()=>null});const Ri=x(Zn)`
|
|
1065
|
+
font-weight: 300;
|
|
1066
|
+
em {
|
|
1067
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
|
|
1068
|
+
}
|
|
1069
|
+
`,Oi=x.input`
|
|
1070
|
+
width: 0px;
|
|
1071
|
+
height: 0.1px;
|
|
1072
|
+
opacity: 0;
|
|
1073
|
+
overflow: hidden;
|
|
1074
|
+
position: absolute;
|
|
1075
|
+
z-index: -1;
|
|
1076
|
+
|
|
1077
|
+
&:focus-visible + label {
|
|
1078
|
+
${I}
|
|
1079
|
+
background-color: transparent;
|
|
1080
|
+
}
|
|
1081
|
+
`,zi=x.div`
|
|
1082
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
|
|
1083
|
+
padding-bottom: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
|
|
1084
|
+
`,Ai=x.label`
|
|
1085
|
+
${Ft}
|
|
1086
|
+
&& {
|
|
1087
|
+
display: inline-block;
|
|
1088
|
+
margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}} 0 0;
|
|
1089
|
+
color: #ffffff;
|
|
1090
|
+
}
|
|
1091
|
+
background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1092
|
+
min-width: 100px;
|
|
1093
|
+
`;x.div`
|
|
1094
|
+
display: flex;
|
|
1095
|
+
align-items: center;
|
|
1096
|
+
flex-flow: row nowrap;
|
|
1097
|
+
|
|
1098
|
+
> span {
|
|
1099
|
+
z-index: 3;
|
|
1100
|
+
white-space: nowrap;
|
|
1101
|
+
width: 100%;
|
|
1102
|
+
padding-left: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
|
|
1103
|
+
pointer-events: none;
|
|
1104
|
+
color: rgba(0, 0, 0, 0.4);
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
input {
|
|
1108
|
+
flex: none;
|
|
1109
|
+
margin-left: -100%;
|
|
1110
|
+
text-indent: 50px;
|
|
1111
|
+
}
|
|
1112
|
+
`;x.label`
|
|
1113
|
+
display: block;
|
|
1114
|
+
position: relative;
|
|
1115
|
+
padding-left: 35px;
|
|
1116
|
+
margin-bottom: 12px;
|
|
1117
|
+
cursor: pointer;
|
|
1118
|
+
user-select: none;
|
|
1119
|
+
font-weight: 300;
|
|
1120
|
+
white-space: normal;
|
|
1121
|
+
word-break: break-word;
|
|
1122
|
+
|
|
1123
|
+
input {
|
|
1124
|
+
position: absolute;
|
|
1125
|
+
opacity: 0;
|
|
1126
|
+
cursor: pointer;
|
|
1127
|
+
|
|
1128
|
+
&:checked {
|
|
1129
|
+
~ .check {
|
|
1130
|
+
background-color: #ffffff;
|
|
1131
|
+
border: 1px solid ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1132
|
+
|
|
1133
|
+
&:after {
|
|
1134
|
+
display: block;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
&:focus-visible {
|
|
1140
|
+
~ .check {
|
|
1141
|
+
${I}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
`;x.span`
|
|
1146
|
+
position: absolute;
|
|
1147
|
+
top: 0;
|
|
1148
|
+
left: 0;
|
|
1149
|
+
height: 18px;
|
|
1150
|
+
width: 18px;
|
|
1151
|
+
border-radius: 50%;
|
|
1152
|
+
border: ${t=>t.theme.inputBorder};
|
|
1153
|
+
|
|
1154
|
+
&:after {
|
|
1155
|
+
content: '';
|
|
1156
|
+
position: absolute;
|
|
1157
|
+
display: none;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
&:after {
|
|
1161
|
+
top: 5px;
|
|
1162
|
+
left: 5px;
|
|
1163
|
+
width: 8px;
|
|
1164
|
+
height: 8px;
|
|
1165
|
+
border-radius: 50%;
|
|
1166
|
+
background: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
&& {
|
|
1170
|
+
box-sizing: content-box;
|
|
1171
|
+
}
|
|
1172
|
+
`;x(W)`
|
|
1173
|
+
${Ft}
|
|
1174
|
+
display: block;
|
|
1175
|
+
background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1176
|
+
color: #ffffff;
|
|
1177
|
+
margin: 0 0 0 auto;
|
|
1178
|
+
min-width: 100px;
|
|
1179
|
+
`;const he=t=>{if(t){const{Type:e,Content:n}=t;if(e&&n)return{type:e,content:n}}},St=t=>t.map(e=>{const n={id:e.Id.toString(),title:e.Name,symbol:he(e.DefaultIcon),activeSymbol:e.ActiveIcon&&he(e.ActiveIcon),description:e.Description||e.Attributes&&e.Attributes.description||"",matches:e.GuidesCount};return e.Children&&e.Children.length&&(n.items=St(e.Children)),n}),J=(t,e)=>t.filter(({Type:n})=>n===e).map(({Id:n,Title:s,Body:r})=>({id:n.toString(),title:s,body:r})),ft=t=>t.map(({Id:e,Title:n,DefaultIcon:s,ListNotices:r,Notices:i})=>({id:e.toString(),title:n,symbol:he(s),defaultHeaderOptions:{visible:!!r.length},notifications:(r||[]).concat(i||[]).map(({Id:o,Title:u,Body:l,Type:h,Modified:c})=>({id:o.toString(),title:u,body:l,modified:c,expandable:h==="listNotice"}))})),mt=({Id:t,Title:e,DefaultIcon:n,Exits:[s],ExitType:r,ConfirmationText:i,ExpandFormAutomatically:o,Form:u,Description:l},h)=>{const{Adapter:c}=s||{Adapter:{}},{ClientName:d="",Settings:f={},CustomClientName:y=""}=c,g={id:t.toString(),title:e,description:l,symbol:he(n),clientName:d==="custom.adapter"?y:d,expanded:!0,inline:!0,body:{}};if(d.indexOf("phone")>-1||d.indexOf("freetext")>-1){const{displayTextBeforeClick:p,textBeforeClick:v}=f;p==="true"&&(g.expanded=!1,g.title=v),d.indexOf("phone.text")>-1?g.body.phoneNumber=f.phoneNumber:g.body.freetext=f.freetext}return(d.indexOf("chat.popup")>-1||d.indexOf("link")>-1||d==="custom.adapter"&&r==="custom")&&(g.body=f,g.body.confirmationFallback=i),d.indexOf("ace")>-1&&(g.body=f),u&&u.HasValueComponents&&(h?g.body.form=ie.fromLegacyForm(t.toString(),u,h).get():g.body.form=ie.fromLegacyForm(t.toString(),u).get(),o||(g.expanded=g.inline=!1)),g},je=(t=[])=>t.map(({Id:e,Title:n,TotalMatches:s,Symbol:r,DefaultIcon:i,ActiveIcon:o})=>({id:e.toString(),title:n,matches:s,symbol:he(i||r),defaultIcon:he(i),activeIcon:he(o)})),pt=t=>t.map(({Id:e,Title:n,Tags:s,FirstPublishedDate:r,Modified:i})=>({id:e.toString(),title:n,tags:je(s),published:r,modified:i})),Ti=(t,e)=>{switch(t){case G.MatchByCategory:case G.Match:{const n={guides:[],matches:0,topNotifications:[],middleNotifications:[],bottomNotifications:[],notificationLists:[],tags:[],byCategory:[]},{Matches:s,TotalMatches:r,Notices:i,NoticeLists:o,Tags:u,ByCategory:l}=e;return n.guides=pt(s),n.matches=r,n.byCategory=(l||[]).map(({Id:h,Matches:c,TotalMatches:d})=>({id:h,guides:pt(c),matches:d})),n.tags=je(u),n.notificationLists=ft(o||[]),n.topNotifications=J(i||[],"noticeRowTop"),n.middleNotifications=J(i||[],"noticeRowMiddle"),n.bottomNotifications=J(i||[],"footerNotice"),n}case G.Categories:{const{Children:n,GuidesCountTotal:s}=e;return{categories:St(n||[]),matches:s}}case G.Guide:{const{Id:n,Title:s,Body:r,Related:i,Options:o,ConnectionId:u,ContactMethods:l,EnableFeedback:h,HandoverExists:c,FirstPublishedDate:d,Modified:f,ModifiedByDisplayName:y,FirstPublishedByDisplayName:g,Categories:p,Tags:v,SeoMetaDescription:w,SeoAllowIndex:k,Perspectives:E,PerspectiveKey:j,Translations:L}=e,F=j||Object.values(E).find(M=>M===u)||E.Default||null,D={guide:{id:n.toString(),title:s,body:r,modified:f,published:d,modifiedBy:y,publishedBy:g,connection:u,categories:p,hasHandover:c,allowFeedback:h,seoMetaDescription:w,seoAllowIndex:k,perspectives:E,perspective:F,translations:Object.keys(L||{}).reduce((M,P)=>(M[P]=L[P].toString(),M),{})},related:pt(i||[]),dialog:[],contactMethods:(l||[]).map(M=>mt(M)),tags:je(v)};return(o||[]).forEach(({CanAccess:M,Description:P,ConnectionId:H,Properties:R})=>{if(!M)return;const z={id:n.toString(),title:P,connection:H,connectionKey:R.ConnectionKey,type:He.default,parent:{id:n.toString(),title:s,tags:je(v)}};if(R.Type==="Guide"||R.Type==="Link")switch(R.Id&&(z.id=R.Id.toString()),R.Uri&&(z.href=R.Uri),R.Target&&(z.target=R.Target),R.Type){case"Guide":z.type=He.guide;break;case"Link":z.type=He.link;break}D.dialog.push(z)}),D}case G.Contacts:{const{Children:n,Matches:s,Notices:r,NoticeLists:i}=e;return{contactMethods:(s||[]).map(u=>mt(u)),categories:St(n||[]),topNotifications:J(r||[],"noticeRowTop"),middleNotifications:J(r||[],"noticeRowMiddle"),bottomNotifications:J(r||[],"footerNotice"),notificationLists:ft(i||[])}}case G.ContactMethod:{const{ContactMethod:n}=e;return mt(n||{})}case G.Tags:case G.TagsOnGuides:return je(e||[]);case G.Notifications:{const{Notices:n,NoticeLists:s}=e;return{topNotifications:J(n||[],"noticeRowTop"),middleNotifications:J(n||[],"noticeRowMiddle"),bottomNotifications:J(n||[],"footerNotice"),notificationLists:ft(s||[])}}default:return{}}};var Et=(t=>(t.Guide="guide",t.Guides="guides",t.GuidesByCategory="guides-by-category",t.RowNotifications="row-notices",t.NotificationLists="notification-lists",t.GuideCategories="guide-categories",t.ContactMethodCategories="contact-method-categories",t.ContactMethod="contact-method",t.ContactMethods="contact-methods",t.Tags="tags",t.TagsOnGuides="tagsonguides",t))(Et||{}),G=(t=>(t.Match="match",t.Categories="categories",t.Guide="guide",t.Contacts="contacts",t.ContactMethod="contact-method",t.MatchByCategory="match-by-category",t.Tags="tags",t.TagsOnGuides="tagsonguides",t.Notifications="notifications",t))(G||{});const an=t=>{switch(t){case"guides":return"match";case"guides-by-category":return"match-by-category";case"guide":return"guide";case"guide-categories":return"categories";case"contact-method-categories":case"contact-methods":return"contacts";case"contact-method":return"contact-method";case"tags":return"tags";case"tagsonguides":return"tagsonguides";case"notification-lists":case"row-notices":return"notifications";default:throw"error"}},Pi=async t=>{const{invoke:e}=t.get("$widget");return await e("renderState")===Ee.hidden};class Ce{constructor(e,n){b(this,"queries",new Map);b(this,"lastTake",0);b(this,"events");b(this,"getUnresolvedQueries",()=>{let e=0;return this.queries.forEach((n,s)=>{n.some(i=>!i.resolved)&&(e=1)}),e});this.container=e,this.matchingClient=n,this.events=e.get("$widget").events,this.events.subscribe("widget:settings-updated",()=>this.queries=new Map),this.events.subscribe("widget:render-state-changed",(s,{next:r,previous:i})=>{i===Ee.hidden&&r===Ee.open&&this.fetchAllUnresolvedQueries()})}static getInstance(e,n="dataClient"){return Le(this)(()=>e.getAsync(n).then(async s=>{let r=await e.getAsync("matchingClient");r||(r=await Xt(e),e.registerAsync("matchingClient",()=>r));let i=s;return i||(i=new Ce(e,r),e.registerAsync(n,()=>i)),i}))}fetch(e,n,s){return new Promise((r,i)=>{n.take&&(this.lastTake=+(n.take||0)),vt(n);const o=an(e);let u=this.queries.get(o)||[],l=u.find(h=>Pe(h.params,n))||null;if(l&&(s!=null&&s.noCache)){const h=u.findIndex(c=>Pe(c.params,n));u=[...u.slice(0,h),...u.slice(h+1)],l=null}if(l){const h=u.indexOf(l);if(l.resolved?(this.events.dispatch("data-client:fetched",{params:n,type:o,response:l.data,unresolvedQueries:this.getUnresolvedQueries()}),this.track(l.data,o,l.error),l.data&&l.error?i({error:l.error}):r(l.data)):l.resolvers.push({resolve:r,reject:i}),u.splice(h,1),u.push(l),this.queries.set(o,u),!l.loading&&!l.resolved)return this.runQuery(o,n)}else return u.push({params:n,resolved:!1,loading:!0,data:{},resolvers:[{resolve:r,reject:i}]}),this.queries.set(o,u),this.runQuery(o,n)}).then(r=>fe(r))}read(e,n){const{select:s}=n,r=an(e);return(this.queries.get(r)||[]).reduce((u,l)=>{if(typeof s=="function"){const h=s(l.data);h&&u.push(h)}else u.push(l.data);return u},[])}feedback(e,n,s){return this.matchingClient.giveFeedback(e,n,s)}setLoadingStatus(e,n,s){const r=this.queries.get(e)||[],i=r.find(o=>Pe(o.params,n));i&&(i.loading=s),this.queries.set(e,r)}async runQuery(e,n){const{searchPhrase:s="",categories:r="0",contactMethodCategoryId:i="0",contactMethodId:o="0",tagId:u=void 0,take:l=5,connection:h="",guideId:c,expandCategories:d="descendants",currentCategory:f,sorting:y="popularity-descending",guideIds:g=[]}=n,p=s.toString().trim();if(await Pi(this.container))return Promise.resolve();switch(e){case"match":{const v=w=>{const[k,E]=w.split("-");return{type:new Map([["popularity","popularity"],["alphabetic","title"],["modified","lastModified"],["published","firstPublished"]]).get(k),direction:E}};return g.length?this.matchingClient.customRequest("guides","POST",{configuration:{ids:g,take:+l}}).then(w=>w&&this.handleResponse(w,e,n)):this.matchingClient.match(p,{categories:r==="0"?[]:Array.isArray(r)?r:[+r],take:+l,tags:u,sorting:v(y),ids:g}).then(w=>w&&this.handleResponse(w,e,n))}case"match-by-category":return this.matchingClient.match(p,{groupByCategory:!0,categories:r==="0"?[]:Array.isArray(r)?r:[+r],take:+l,tags:u}).then(v=>v&&this.handleResponse(v,e,n));case"guide":return this.matchingClient.getGuide(c,{connectionId:h}).then(v=>{v&&this.handleResponse(v,e,n)}).catch(v=>{const w={message:"Something went wrong.",status:v.status||400};w.status===404&&(w.message="The guide could not be found."),this.handleResponse({},e,n,w)});case"categories":return this.matchingClient.getCategories({phrase:p,expand:d,tags:u}).then(v=>v&&this.handleResponse(v,e,n));case"contacts":return c?this.matchingClient.contactMethods(+c,{phrase:p}).then(v=>v&&this.handleResponse(v,e,n)):this.matchingClient.contacts(+i,{phrase:p}).then(v=>v&&this.handleResponse(v,e,n));case"contact-method":return this.matchingClient.getContactMethod(+o,{guideId:c,currentCategory:f}).then(v=>v&&this.handleResponse(v,e,n));case"tags":return this.matchingClient.customRequest("tags","GET",{configuration:{take:999999,phrase:p,categories:r==="0"?[]:Array.isArray(r)?r:[+r]}}).then(v=>v&&this.handleResponse(v,e,n));case"tagsonguides":return this.matchingClient.customRequest("tagsonguides","GET",{configuration:{take:999999,phrase:p,categories:r==="0"?[]:Array.isArray(r)?r:[+r],tags:u}}).then(v=>v&&this.handleResponse(v,e,n));case"notifications":return this.matchingClient.customRequest("notices","GET",{configuration:{phrase:p,categories:r==="0"?[]:Array.isArray(r)?r:[+r]}}).then(v=>v&&this.handleResponse(v,e,n))}}handleResponse(e={},n,s,r){const i=this.queries.get(n)||[],o=i.find(u=>Pe(u.params,s));if(o){const u=r||Ti(n,e);this.track(u,n,r),o.resolvers.forEach(h=>{r?h.reject({error:u}):h.resolve(u)});const l=i.indexOf(o);l>-1&&i.splice(l,1),i.push({...o,error:r,resolvers:[],data:u,resolved:!0}),this.setLoadingStatus(n,s,!1),this.queries.set(n,i),r||this.events.dispatch("data-client:fetched",{type:n,params:s,response:u,unresolvedQueries:this.getUnresolvedQueries()})}}fetchAllUnresolvedQueries(){for(const[e,n]of this.queries)n.filter(s=>!s.resolved).forEach(s=>{this.runQuery(e,s.params)})}track(e={},n,s){const r=this.container.get("$widget");r&&!s?r.events.dispatch("tracking:service-client-response",{type:n,data:e}):r&&r.events.dispatch("tracking:service-client-error",{type:n,error:s})}static create(e){return e.getAsync("matchingClient").then(async n=>{if(n)return new Ce(e,n);const s=await Xt(e);return e.registerAsync("matchingClient",()=>s),new Ce(e,s)})}getClient(){return this.matchingClient}}const Ii=({title:t="",className:e,id:n,parent:s,connection:r,type:i,target:o,href:u,children:l,connectionKey:h})=>{const c={},{name:d,params:f}=Bt();switch(i){case"default":case"guide":const{id:y,title:g}=s;let p=h||r;y!==n&&!h&&(p=void 0),c.routeName=d,c.params=Se({...f,guide:n,connection:p,uriName:Yt(n===y?g:t)});break;case"link":c.href=u,c.target=o;break}return a.jsx(Oe,{className:N(e,"humany-dialog-link"),...c,children:l||a.jsxs(a.Fragment,{children:[i==="link"&&a.jsx(Ne,{faIcon:"link"}),a.jsx("span",{children:t})]})})};m.forwardRef(({className:t,dialog:e,...n},s)=>e.length?a.jsx(Di,{className:N(t,"humany-dialog"),items:e,renderItem:r=>a.jsx("li",{"data-dialog":r.connection,children:a.jsx(Ii,{...r})},r.connection),...n,ref:s}):null);const Di=x(ke)`
|
|
1180
|
+
${Me}
|
|
1181
|
+
a {
|
|
1182
|
+
min-width: 150px;
|
|
1183
|
+
max-width: 400px;
|
|
1184
|
+
display: block;
|
|
1185
|
+
white-space: normal;
|
|
1186
|
+
${t=>{var e,n;return((e=t.theme.colors)==null?void 0:e.primary)&&Ln({primaryColor:(n=t.theme.colors)==null?void 0:n.primary,secondaryColor:"#FFFFFF",theme:t.theme})}}
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
i {
|
|
1190
|
+
margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0 0;
|
|
1191
|
+
}
|
|
1192
|
+
`;x(Re)`
|
|
1193
|
+
${Ye}
|
|
1194
|
+
font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
|
|
1195
|
+
padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
|
|
1196
|
+
> ul > li {
|
|
1197
|
+
overflow: visible;
|
|
1198
|
+
font-weight: 300;
|
|
1199
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
|
|
1200
|
+
}
|
|
1201
|
+
`;x.div`
|
|
1202
|
+
background: #fff;
|
|
1203
|
+
border: #ccc 1px solid;
|
|
1204
|
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
|
1205
|
+
font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
|
|
1206
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
|
|
1207
|
+
`;x.div`
|
|
1208
|
+
padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
|
|
1209
|
+
padding-bottom: 0;
|
|
1210
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
|
|
1211
|
+
font-weight: normal;
|
|
1212
|
+
white-space: nowrap;
|
|
1213
|
+
display: flex;
|
|
1214
|
+
align-items: center;
|
|
1215
|
+
|
|
1216
|
+
h1,
|
|
1217
|
+
h2,
|
|
1218
|
+
h3,
|
|
1219
|
+
h4,
|
|
1220
|
+
h5,
|
|
1221
|
+
h6 {
|
|
1222
|
+
margin: 0;
|
|
1223
|
+
font-weight: normal;
|
|
1224
|
+
padding-bottom: 0;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
svg,
|
|
1228
|
+
i {
|
|
1229
|
+
margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
|
|
1230
|
+
}
|
|
1231
|
+
`;x(ke)`
|
|
1232
|
+
list-style: none;
|
|
1233
|
+
padding: 0;
|
|
1234
|
+
margin: 0;
|
|
1235
|
+
padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0;
|
|
1236
|
+
|
|
1237
|
+
li {
|
|
1238
|
+
background: #fff;
|
|
1239
|
+
|
|
1240
|
+
a {
|
|
1241
|
+
display: block;
|
|
1242
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
|
|
1243
|
+
padding: ${t=>{var e,n;return`${(e=t.theme.sizes)==null?void 0:e.small} ${(n=t.theme.sizes)==null?void 0:n.normal}`}};
|
|
1244
|
+
cursor: pointer;
|
|
1245
|
+
color: #555;
|
|
1246
|
+
text-decoration: none;
|
|
1247
|
+
|
|
1248
|
+
&:hover {
|
|
1249
|
+
background: #f9f9f9;
|
|
1250
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
`;x(Re)`
|
|
1255
|
+
${Ye}
|
|
1256
|
+
font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
|
|
1257
|
+
> div {
|
|
1258
|
+
${t=>{var e;return oe(t)("> h1",$.css`
|
|
1259
|
+
font-size: ${(e=t.theme.fonts)==null?void 0:e.normal};
|
|
1260
|
+
line-height: 1.2em;
|
|
1261
|
+
`)}}
|
|
1262
|
+
}
|
|
1263
|
+
> ul > li {
|
|
1264
|
+
overflow: visible;
|
|
1265
|
+
font-weight: 300;
|
|
1266
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
|
|
1267
|
+
|
|
1268
|
+
a {
|
|
1269
|
+
display: inline-block;
|
|
1270
|
+
|
|
1271
|
+
@media (hover: hover) {
|
|
1272
|
+
&:hover {
|
|
1273
|
+
text-decoration: underline;
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
`;const Hi=t=>$.css`
|
|
1279
|
+
${t["data-loading"]&&"position: relative;"};
|
|
1280
|
+
${t["data-loading"]&&"min-height: 150px;"}
|
|
1281
|
+
> * {
|
|
1282
|
+
transition: 200ms ease-out opacity;
|
|
1283
|
+
opacity: ${t["data-loading"]?"0.5":"1"};
|
|
1284
|
+
}
|
|
1285
|
+
.humany-loader {
|
|
1286
|
+
opacity: ${t["data-loading"]?"1":"0"};
|
|
1287
|
+
}
|
|
1288
|
+
`;x(Ne)`
|
|
1289
|
+
&& {
|
|
1290
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
|
|
1291
|
+
}
|
|
1292
|
+
width: 1.2em;
|
|
1293
|
+
`;x($e)`
|
|
1294
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.medium}};
|
|
1295
|
+
font-weight: normal;
|
|
1296
|
+
line-height: 1.2em;
|
|
1297
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
|
|
1298
|
+
`;const Bi=x(W)`
|
|
1299
|
+
display: flex;
|
|
1300
|
+
align-items: center;
|
|
1301
|
+
|
|
1302
|
+
${t=>{var e;return t["data-has-label"]==="true"&&t["data-has-symbol"]==="true"&&`
|
|
1303
|
+
svg, i {
|
|
1304
|
+
margin: 0 ${(e=t.theme.sizes)==null?void 0:e.small} 0 0;
|
|
1305
|
+
}
|
|
1306
|
+
`}}
|
|
1307
|
+
|
|
1308
|
+
&:focus-visible {
|
|
1309
|
+
${t=>t["data-has-label"]==="true"&&bt}
|
|
1310
|
+
|
|
1311
|
+
svg, i {
|
|
1312
|
+
${t=>t["data-has-label"]==="false"&&t["data-has-symbol"]==="true"&&$.css`
|
|
1313
|
+
${bt(t)}
|
|
1314
|
+
box-sizing: content-box;
|
|
1315
|
+
`}
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
span {
|
|
1320
|
+
flex: 1;
|
|
1321
|
+
font-weight: 300;
|
|
1322
|
+
}
|
|
1323
|
+
`,Vi=({addFavoriteTooltip:t,removeFavoriteCancelLabel:e,removeFavoriteConfirmLabel:n,removeFavoriteHeader:s,removeFavoriteLabel:r,removeFavoriteTooltip:i,id:o,isFavorite:u,guideTitle:l,buttonLabel:h="",actions:{addFavorite:c,removeFavorite:d}})=>{const f=m.useCallback(()=>{d(o)},[o,d]),y=m.useCallback(()=>{c(o)},[o,c]),g=`${u?i:t}${l?`: "${l}"`:""}`;return u?a.jsx(di,{trigger:a.jsxs(cn,{className:"humany-favorite-button",title:g,"aria-label":g,"data-favorite":"true","data-has-label":h?"true":"false","data-has-symbol":"true",children:[a.jsx(q,{size:16,symbol:{type:"Svg",content:"star-empty"}}),h&&a.jsx(ae,{children:h})]}),onConfirm:f,cancelLabel:e,confirmLabel:n,header:s,text:r}):a.jsxs(cn,{className:"humany-favorite-button",title:g,"aria-label":g,onClick:y,"data-favorite":"false","data-has-label":h?"true":"false","data-has-symbol":"true",children:[a.jsx(q,{size:16,symbol:{type:"Svg",content:"star-empty"}}),h&&a.jsx(ae,{children:h})]})},cn=x(Bi)`
|
|
1324
|
+
grid-area: favorite;
|
|
1325
|
+
|
|
1326
|
+
&:focus-visible {
|
|
1327
|
+
svg {
|
|
1328
|
+
${t=>{var e,n;return t["data-favorite"]==="true"?`
|
|
1329
|
+
fill: transparent;
|
|
1330
|
+
|
|
1331
|
+
path {
|
|
1332
|
+
fill: transparent;
|
|
1333
|
+
}
|
|
1334
|
+
`:`
|
|
1335
|
+
fill: ${(e=t.theme.colors)==null?void 0:e.text};
|
|
1336
|
+
|
|
1337
|
+
path {
|
|
1338
|
+
fill: ${(n=t.theme.colors)==null?void 0:n.text};
|
|
1339
|
+
}
|
|
1340
|
+
`}}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
${t=>{var e,n,s,r,i,o,u;return((e=t.theme.colors)==null?void 0:e.text)&&$.css`
|
|
1345
|
+
svg {
|
|
1346
|
+
stroke: ${(n=t.theme.colors)==null?void 0:n.text};
|
|
1347
|
+
|
|
1348
|
+
path {
|
|
1349
|
+
stroke: ${(s=t.theme.colors)==null?void 0:s.text};
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
${t["data-favorite"]==="true"&&`
|
|
1353
|
+
fill: ${(r=t.theme.colors)==null?void 0:r.text};
|
|
1354
|
+
|
|
1355
|
+
path {
|
|
1356
|
+
fill: ${(i=t.theme.colors)==null?void 0:i.text};
|
|
1357
|
+
}
|
|
1358
|
+
`};
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
&:hover {
|
|
1362
|
+
svg {
|
|
1363
|
+
${t["data-favorite"]==="true"?`
|
|
1364
|
+
fill: transparent;
|
|
1365
|
+
|
|
1366
|
+
path {
|
|
1367
|
+
fill: transparent;
|
|
1368
|
+
}
|
|
1369
|
+
`:`
|
|
1370
|
+
fill: ${(o=t.theme.colors)==null?void 0:o.text};
|
|
1371
|
+
|
|
1372
|
+
path {
|
|
1373
|
+
fill: ${(u=t.theme.colors)==null?void 0:u.text};
|
|
1374
|
+
}
|
|
1375
|
+
`};
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
`}}
|
|
1379
|
+
`;m.forwardRef(({onFeedback:t=()=>{},direction:e="horizontal",className:n,header:s,positive:r,negative:i,selected:o,...u},l)=>a.jsxs(qi,{className:N(n,"humany-feedback"),"data-direction":e,...V(u),ref:l,children:[!!s&&a.jsx(Fi,{children:s}),a.jsxs(ln,{className:"humany-feedback-button",disabled:!!o,"data-selected":o==="positive","data-direction":e,onClick:()=>t("positive"),children:[a.jsx(Ne,{faIcon:"smile-o"}),a.jsx("span",{children:r})]}),a.jsxs(ln,{className:"humany-feedback-button",disabled:!!o,"data-selected":o==="negative","data-direction":e,onClick:()=>t("negative"),children:[a.jsx(Ne,{faIcon:"frown-o"}),a.jsx("span",{children:i})]})]}));const Fi=x(ae)`
|
|
1380
|
+
font-weight: normal;
|
|
1381
|
+
margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
|
|
1382
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
|
|
1383
|
+
display: block;
|
|
1384
|
+
`,ln=x(W)`
|
|
1385
|
+
display: inline-block;
|
|
1386
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
|
|
1387
|
+
font-weight: 300;
|
|
1388
|
+
&& {
|
|
1389
|
+
margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
${t=>{var e,n;return t["data-direction"]==="horizontal"&&$.css`
|
|
1393
|
+
width: 225px;
|
|
1394
|
+
max-width: calc(50% - ${(e=t.theme.sizes)==null?void 0:e.large} - ${(n=t.theme.sizes)==null?void 0:n.small});
|
|
1395
|
+
`}}
|
|
1396
|
+
|
|
1397
|
+
${t=>t["data-direction"]==="vertical"&&$.css`
|
|
1398
|
+
min-width: 190px;
|
|
1399
|
+
`}
|
|
1400
|
+
|
|
1401
|
+
${t=>{var e,n;return((e=t.theme.colors)==null?void 0:e.primary)&&Ln({active:t["data-selected"],primaryColor:(n=t.theme.colors)==null?void 0:n.primary,secondaryColor:"#FFFFFF",theme:t.theme})}}
|
|
1402
|
+
|
|
1403
|
+
i {
|
|
1404
|
+
margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0 0;
|
|
1405
|
+
}
|
|
1406
|
+
`,qi=x.div`
|
|
1407
|
+
${t=>{var e;return t["data-direction"]==="vertical"&&$.css`
|
|
1408
|
+
> button {
|
|
1409
|
+
width: 100%;
|
|
1410
|
+
&:not(:last-child) {
|
|
1411
|
+
margin-bottom: ${(e=t.theme.sizes)==null?void 0:e.normal};
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
`}}
|
|
1415
|
+
`,_i=()=>{const t=ee(),[e,n]=m.useState([]),s=t.get("favorites");m.useEffect(()=>{if(s){n(s.get());const{events:l}=t.get("$widget");return l.subscribe("widget:favorites-updated",(c,{updated:d})=>{n([...d])})}},[]);const r=l=>s?s.add(l):Promise.resolve([]),i=l=>s?s.remove(l):Promise.resolve([]),o=()=>s?s.clear():Promise.resolve([]),u=m.useCallback(l=>e.indexOf(l)>-1?i(l):r(l),[e]);return[e,m.useMemo(()=>({addFavorite:r,removeFavorite:i,clearFavorites:o,toggleFavorite:u}),[e])]},Zi=({format:t=qn.YYYY_MM_DD_HH_MM,className:e="",byLabel:n="",modifiedLabel:s="",publishedLabel:r="",modifiedBy:i="",publishedBy:o="",showModified:u=!1,showPublished:l=!1,modified:h,published:c})=>{const d=l&&c?a.jsx(un,{format:t,timestamp:c}):null,f=u&&h?a.jsx(un,{format:t,timestamp:h}):null;return!d&&!f?null:a.jsxs(gt,{className:N(e,"humany-metadata"),children:[d&&a.jsxs(gt,{className:"humany-published",children:[r,d,n&&o&&` ${n.replace("{{editor}}",o)}`]}),f&&a.jsxs(gt,{className:"humany-modified",children:[d&&", ",s,f,n&&i&&` ${n.replace("{{editor}}",i)}`]})]})},un=x(_n)`
|
|
1416
|
+
&:not(:first-child) {
|
|
1417
|
+
margin-left: 4px;
|
|
1418
|
+
}
|
|
1419
|
+
&:not(:last-child) {
|
|
1420
|
+
margin-right: 4px;
|
|
1421
|
+
}
|
|
1422
|
+
`,gt=x($e)`
|
|
1423
|
+
font-style: italic;
|
|
1424
|
+
`,Wi=({tags:t})=>t.filter(e=>e.symbol).length?a.jsx(Gi,{className:"humany-guide-list-tags",items:t,renderItem:({id:e,symbol:n,title:s})=>n&&a.jsx("li",{"data-tag":e,children:a.jsx(Yi,{size:18,symbol:n,title:s})},e)}):null;m.forwardRef(({title:t,id:e,route:n,symbolSize:s,collapseUri:r,children:i},o)=>{const{params:u}=Bt();return a.jsxs(Ui,{ref:o,"data-guide":e,children:[a.jsx(jt,{title:t,"aria-label":t,routeName:n,params:Se({...u,uriName:r||void 0,id:void 0,guide:void 0,accordion:void 0}),text:t,children:a.jsx(q,{size:s,symbol:{type:"Svg",content:"caret-up"}})}),i]})});const Ui=x.li`
|
|
1425
|
+
> a {
|
|
1426
|
+
grid-column: 1/-1;
|
|
1427
|
+
font-weight: bold;
|
|
1428
|
+
margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
> div {
|
|
1432
|
+
grid-column: 1/-1;
|
|
1433
|
+
}
|
|
1434
|
+
`;m.forwardRef(({expandable:t=!1,routing:e={},paramMappers:n={},symbolSize:s=11,pageRole:r="link",pageCaret:i="down",showTags:o=!1,showFavoriteToggle:u=!1,localPaging:l=!1,onItemClick:h=()=>{},dispatch:c=()=>{},metadata:d={},pageLabel:f,className:y,children:g,items:p,renderItem:v,addFavoriteTooltip:w,removeFavoriteCancelLabel:k,removeFavoriteConfirmLabel:E,removeFavoriteHeader:j,removeFavoriteLabel:L,removeFavoriteTooltip:F,...D},M)=>{const P=er(),H=m.useRef(),R=Dt(p),{guide:z="guide",page:U="index"}=e,{guide:ce=({id:C})=>Se({guide:C}),page:le=()=>Se()}=n,[te,pe]=_i();m.useImperativeHandle(M,()=>H.current);const _=C=>{const{id:S,title:O,tags:B,published:Y,modified:se,publishedBy:ye,modifiedBy:nt}=C;return a.jsxs("li",{"data-guide":S,"has-metadata":(!!(d!=null&&d.showPublished)&&!!Y||!!(d!=null&&d.showModified)&&!!se).toString(),children:[a.jsx(jt,{className:"humany-guide-link",title:O,"aria-label":O,routeName:z,onClick:Wn=>h(Wn,C),params:ce(C),text:O,children:a.jsx(q,{size:s,symbol:{type:"Svg",content:t?"caret-down":"caret-right"}})}),u&&a.jsx(Vi,{guideTitle:O,addFavoriteTooltip:w,removeFavoriteCancelLabel:k,removeFavoriteConfirmLabel:E,removeFavoriteHeader:j,removeFavoriteLabel:L,removeFavoriteTooltip:F,isFavorite:te.indexOf(S)>-1,actions:pe,id:S}),o&&a.jsx(Wi,{tags:B}),a.jsx(Ji,{...d,indent:t?void 0:s,modified:se,published:Y,publishedBy:ye,modifiedBy:nt})]},S)},ne=m.useCallback((C,S,O)=>v?v(C,S,O,_):_(C),[v,_]),ge=m.useCallback(C=>{l&&(C.preventDefault(),c("page",le()))},[c,l]);m.useEffect(()=>{if(R&&R.length<p.length&&H.current){const C=H.current.querySelectorAll(".humany-guide-list > ul > li"),S=C[R.length];if(C.length===p.length&&R.length){const O=C[R.length];if(O){const B=O.querySelector(".humany-guide-link");B&&B.focus()}}else S&&new MutationObserver((B,Y)=>{B.forEach(se=>{if(se.addedNodes){const ye=Array.from(se.addedNodes).find(nt=>nt.tagName==="A");ye&&cs(H.current,document.activeElement)&&(P&&ye.focus(),Y.disconnect())}})}).observe(S,{attributes:!1,characterData:!1,childList:!0,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})}});const ze=!!Object.keys(d).filter(C=>typeof d[C]<"u").length;return a.jsxs(Ki,{className:N(y,"humany-guide-list"),"data-item-count":p.length,items:p,renderItem:ne,isTabbing:P,expandable:t?"true":"false","grid-items":o||u||ze?"true":"false",...V(D),ref:H,children:[f?a.jsx(jt,{text:f,title:f,"aria-label":f,routeName:U,role:r,params:le(),onClick:ge,children:a.jsx(q,{size:s,symbol:{type:"Svg",content:`caret-${i}`}})}):null,g]})});const Ki=x(Re)`
|
|
1435
|
+
${Ye}
|
|
1436
|
+
padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
|
|
1437
|
+
overflow: auto;
|
|
1438
|
+
justify-content: flex-start;
|
|
1439
|
+
white-space: nowrap;
|
|
1440
|
+
font-weight: 300;
|
|
1441
|
+
text-decoration: none;
|
|
1442
|
+
|
|
1443
|
+
> div {
|
|
1444
|
+
${t=>oe(t)("> h1",$.css`
|
|
1445
|
+
white-space: pre-wrap;
|
|
1446
|
+
`)}
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
> ul > li {
|
|
1450
|
+
${t=>{var e,n;return t["grid-items"]==="true"&&$.css`
|
|
1451
|
+
display: grid;
|
|
1452
|
+
grid-template-columns: auto 1fr 1fr;
|
|
1453
|
+
gap: 0px 0px;
|
|
1454
|
+
grid-template-areas: '. favorite tags';
|
|
1455
|
+
align-items: center;
|
|
1456
|
+
|
|
1457
|
+
> button {
|
|
1458
|
+
margin: 0 0 0 ${(e=t.theme.sizes)==null?void 0:e.small};
|
|
1459
|
+
|
|
1460
|
+
&[data-favorite='false'] {
|
|
1461
|
+
${t.isTabbing?"opacity: 0;":"display: none;"};
|
|
1462
|
+
&:focus {
|
|
1463
|
+
opacity: 1;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
> span {
|
|
1469
|
+
font-size: ${(n=t.theme.fonts)==null?void 0:n.small};
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
&:hover {
|
|
1473
|
+
button[data-favorite='false'] {
|
|
1474
|
+
display: flex;
|
|
1475
|
+
justify-self: flex-start;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
&[has-metadata='true'] {
|
|
1480
|
+
grid-template-rows: 1fr 1fr;
|
|
1481
|
+
grid-template-areas:
|
|
1482
|
+
'. favorite tags'
|
|
1483
|
+
'metadata metadata metadata';
|
|
1484
|
+
}
|
|
1485
|
+
`}}
|
|
1486
|
+
> a {
|
|
1487
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1488
|
+
overflow: hidden;
|
|
1489
|
+
text-overflow: ellipsis;
|
|
1490
|
+
max-width: 100%;
|
|
1491
|
+
display: inline-block;
|
|
1492
|
+
|
|
1493
|
+
svg {
|
|
1494
|
+
margin: 0 calc(${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}}*2) 0 0;
|
|
1495
|
+
line {
|
|
1496
|
+
stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
${t=>{var e;return t.expandable==="true"&&$.css`
|
|
1501
|
+
display: flex;
|
|
1502
|
+
flex-direction: row-reverse;
|
|
1503
|
+
justify-content: flex-end;
|
|
1504
|
+
align-items: center;
|
|
1505
|
+
|
|
1506
|
+
span {
|
|
1507
|
+
overflow: hidden;
|
|
1508
|
+
text-overflow: ellipsis;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
svg {
|
|
1512
|
+
margin: 0 0 0 ${(e=t.theme.sizes)==null?void 0:e.small};
|
|
1513
|
+
}
|
|
1514
|
+
`}}
|
|
1515
|
+
|
|
1516
|
+
&:focus-visible {
|
|
1517
|
+
${I}
|
|
1518
|
+
text-decoration: underline;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
@media (hover: hover) {
|
|
1522
|
+
&:hover {
|
|
1523
|
+
text-decoration: underline;
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
> a {
|
|
1530
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
|
|
1531
|
+
margin: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0 0;
|
|
1532
|
+
align-self: flex-start;
|
|
1533
|
+
align-items: center;
|
|
1534
|
+
display: flex;
|
|
1535
|
+
|
|
1536
|
+
span {
|
|
1537
|
+
text-decoration: underline;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
svg {
|
|
1541
|
+
margin: 0 calc(${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}}*2) 0 0;
|
|
1542
|
+
line {
|
|
1543
|
+
stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
&:focus-visible {
|
|
1548
|
+
${I}
|
|
1549
|
+
text-decoration: underline;
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
`,Gi=x(ke)`
|
|
1553
|
+
${Me}
|
|
1554
|
+
display: flex;
|
|
1555
|
+
margin: 0 0 0 auto;
|
|
1556
|
+
grid-area: tags;
|
|
1557
|
+
|
|
1558
|
+
li,
|
|
1559
|
+
li:last-child {
|
|
1560
|
+
margin: 0 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
|
|
1561
|
+
display: flex;
|
|
1562
|
+
align-items: center;
|
|
1563
|
+
justify-content: space-between;
|
|
1564
|
+
}
|
|
1565
|
+
`,Yi=x(q)`
|
|
1566
|
+
display: block;
|
|
1567
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1568
|
+
${t=>{if(t.symbol.type==="Uri")return`
|
|
1569
|
+
width: ${t.size}px;
|
|
1570
|
+
height: ${t.size}px;
|
|
1571
|
+
`;if(t.symbol.type==="FontAwesome")return`
|
|
1572
|
+
font-size: ${t.size}px;
|
|
1573
|
+
`}}
|
|
1574
|
+
`,Ji=x(Zi)`
|
|
1575
|
+
grid-area: metadata;
|
|
1576
|
+
text-overflow: ellipsis;
|
|
1577
|
+
overflow: hidden;
|
|
1578
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
|
|
1579
|
+
${t=>{var e;return typeof t.indent=="number"&&`text-indent: calc(${(e=t.theme.sizes)==null?void 0:e.small} * 2 + ${t.indent}px);`}}
|
|
1580
|
+
`,Qi=$.keyframes`
|
|
1581
|
+
100% {
|
|
1582
|
+
transform: rotate(360deg);
|
|
1583
|
+
}
|
|
1584
|
+
`,Xi=$.keyframes`
|
|
1585
|
+
0% {
|
|
1586
|
+
stroke-dasharray: 1, 200;
|
|
1587
|
+
stroke-dashoffset: 0;
|
|
1588
|
+
}
|
|
1589
|
+
50% {
|
|
1590
|
+
stroke-dasharray: 89, 200;
|
|
1591
|
+
stroke-dashoffset: -35px;
|
|
1592
|
+
}
|
|
1593
|
+
100% {
|
|
1594
|
+
stroke-dasharray: 89, 200;
|
|
1595
|
+
stroke-dashoffset: -124px;
|
|
1596
|
+
}
|
|
1597
|
+
`,eo=x.svg`
|
|
1598
|
+
animation: ${Qi} 2s linear infinite;
|
|
1599
|
+
height: 100%;
|
|
1600
|
+
transform-origin: center center;
|
|
1601
|
+
width: 100%;
|
|
1602
|
+
position: absolute;
|
|
1603
|
+
top: 0;
|
|
1604
|
+
bottom: 0;
|
|
1605
|
+
left: 0;
|
|
1606
|
+
right: 0;
|
|
1607
|
+
margin: auto;
|
|
1608
|
+
transition: 200ms ease-out opacity;
|
|
1609
|
+
`,to=x.div`
|
|
1610
|
+
position: absolute;
|
|
1611
|
+
top: 0;
|
|
1612
|
+
bottom: 0;
|
|
1613
|
+
left: 0;
|
|
1614
|
+
right: 0;
|
|
1615
|
+
height: 100%;
|
|
1616
|
+
width: 100%;
|
|
1617
|
+
pointer-events: ${t=>t["data-loading"]?"all":"none"};
|
|
1618
|
+
display: flex;
|
|
1619
|
+
flex-direction: column;
|
|
1620
|
+
justify-content: center;
|
|
1621
|
+
transition: 200ms ease-out opacity;
|
|
1622
|
+
box-sizing: border-box;
|
|
1623
|
+
overflow: hidden;
|
|
1624
|
+
|
|
1625
|
+
.humany-spinner-svg {
|
|
1626
|
+
opacity: ${t=>t["data-loading"]?"1":"0"};
|
|
1627
|
+
}
|
|
1628
|
+
`,no=x.div`
|
|
1629
|
+
position: relative;
|
|
1630
|
+
margin: 0 auto;
|
|
1631
|
+
width: 100px;
|
|
1632
|
+
&:before {
|
|
1633
|
+
content: '';
|
|
1634
|
+
display: block;
|
|
1635
|
+
padding-top: 100%;
|
|
1636
|
+
}
|
|
1637
|
+
`,so=x.circle`
|
|
1638
|
+
stroke-dasharray: 1, 200;
|
|
1639
|
+
stroke-dashoffset: 0;
|
|
1640
|
+
animation: ${Xi} 1.5s ease-in-out infinite;
|
|
1641
|
+
stroke-linecap: round;
|
|
1642
|
+
stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1643
|
+
stroke-width: 2px;
|
|
1644
|
+
`,ro=({loading:t=!1})=>a.jsx(to,{className:"humany-loader","data-loading":t,children:a.jsx(no,{className:"humany-spinner",children:a.jsx(eo,{className:"humany-spinner-svg",viewBox:"25 25 50 50",children:a.jsx(so,{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"2","stroke-miterlimit":"10"})})})});x(W)`
|
|
1645
|
+
display: flex;
|
|
1646
|
+
justify-content: space-between;
|
|
1647
|
+
align-items: center;
|
|
1648
|
+
width: 100%;
|
|
1649
|
+
text-align: left;
|
|
1650
|
+
svg,
|
|
1651
|
+
i {
|
|
1652
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1653
|
+
}
|
|
1654
|
+
span {
|
|
1655
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
|
|
1656
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
|
|
1657
|
+
overflow: hidden;
|
|
1658
|
+
text-overflow: ellipsis;
|
|
1659
|
+
flex: 1;
|
|
1660
|
+
white-space: nowrap;
|
|
1661
|
+
}
|
|
1662
|
+
&:focus-visible {
|
|
1663
|
+
${I}
|
|
1664
|
+
span {
|
|
1665
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1666
|
+
text-decoration: underline;
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
`;x(Re)`
|
|
1670
|
+
${Hi}
|
|
1671
|
+
${Ye}
|
|
1672
|
+
overflow: hidden;
|
|
1673
|
+
justify-content: flex-start;
|
|
1674
|
+
padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
|
|
1675
|
+
${t=>!t["data-show-header"]&&$.css`
|
|
1676
|
+
> div {
|
|
1677
|
+
${oe(t)("h1",$.css`
|
|
1678
|
+
display: none;
|
|
1679
|
+
`)}
|
|
1680
|
+
}
|
|
1681
|
+
`}
|
|
1682
|
+
|
|
1683
|
+
@media (hover: hover) {
|
|
1684
|
+
button:hover {
|
|
1685
|
+
text-decoration: underline;
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
`;x(An)`
|
|
1689
|
+
${rr}
|
|
1690
|
+
font-weight: 300;
|
|
1691
|
+
|
|
1692
|
+
p {
|
|
1693
|
+
white-space: normal;
|
|
1694
|
+
}
|
|
1695
|
+
`;x.li`
|
|
1696
|
+
.humany-paragraph {
|
|
1697
|
+
display: none;
|
|
1698
|
+
&:not(:only-child) {
|
|
1699
|
+
${t=>{var e,n,s;return((e=t.theme.sizes)==null?void 0:e.cardinal)&&((n=t.theme.sizes)==null?void 0:n.normal)&&$.css`
|
|
1700
|
+
margin: ${(s=t.theme.sizes)==null?void 0:s.normal} 0;
|
|
1701
|
+
`}}
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
${t=>t["data-expanded"]&&$.css`
|
|
1706
|
+
.humany-paragraph {
|
|
1707
|
+
display: block;
|
|
1708
|
+
}
|
|
1709
|
+
`}
|
|
1710
|
+
|
|
1711
|
+
> span {
|
|
1712
|
+
display: block;
|
|
1713
|
+
font-weight: 300;
|
|
1714
|
+
color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.accent}};
|
|
1715
|
+
}
|
|
1716
|
+
`;x(q)`
|
|
1717
|
+
margin: 0 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
|
|
1718
|
+
line {
|
|
1719
|
+
stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
|
|
1720
|
+
}
|
|
1721
|
+
`;x(_n)`
|
|
1722
|
+
font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
|
|
1723
|
+
font-weight: 300;
|
|
1724
|
+
`;const io=t=>!!t.guideCategoryId||t.tagIds.length>0,oo=(t,e)=>{const n=gn(t,e),s=as(n,e);return n.map(i=>{var o;return((o=s.get(i))==null?void 0:o.title)||""}).join(" / ")},Nt=t=>{const e=fe(t);return e.sort((n,s)=>n.title>s.title?1:-1),e.forEach(n=>{n.items&&(n.items=Nt(n.items))}),e},ao=t=>wi(t,"search",Promise.resolve().then(()=>require("./search-37ab93f5.js")).then(e=>e.search),e=>{const{events:n}=t.get("$widget"),[s,r]=Ot(n),i=async h=>{const c=h.tag?h.tag.split(","):[],d=h.guideCategory,f=h.phrase||"",{activeFilterBadges:y}=e.properties(),g=await l({}),p=await u({tagId:h.tag,searchPhrase:f}),v=d?mn(d,p):null,w=c.reduce((k,E)=>{const j=g.find(L=>L.id===E);return j&&k.push(j),k},[]);e.writeProperties({activeFilterBadges:{...y,tag:w,guideCategory:v,tooltip:oo(d,p)||null}})};e.actions.create("search",async h=>{const{route:c="search",patchParams:d=!1}=e.properties(),{filters:f,filtersChanged:y,value:g}=h;if(g.length>0||(io(f)||y)&&!f.initial){const p=await t.getAsync("router"),{params:v}=p.getRouteData();let w={guide:void 0,id:void 0,accordion:void 0,contactMethod:void 0};w.phrase=g.length>0?encodeURIComponent(g):"",d&&(w={...v,...w}),(f!=null&&f.guideCategoryId||y)&&(w.guideCategory=f.guideCategoryId||void 0),((f==null?void 0:f.tagIds.length)>0||y)&&(f.tagIds.length>0?w.tag=f.tagIds.join(","):w.tag=void 0),p.navigate(c,Se(w))}}),e.actions.create("clear",(h,c)=>{h.navigateToHome&&t.getAsync("router").then(d=>{const{name:f}=d.getInitialRoute();d.navigate(f)})});const o=()=>t.getAsync("router").then(h=>h.getRouteData().params);e.actions.create("quick-filter:add",async h=>{const{category:c,tagIds:d=[],initial:f}=h,y=await t.getAsync("router"),{params:g}=y.getRouteData(),p=g.tag?g.tag.split(","):[];e.actions.dispatch("search",{filtersChanged:!0,filters:{guideCategoryId:c,tagIds:[...new Set([...p,...d])]},value:g.phrase||""})}),e.actions.create("quick-filter:remove",({types:h,ids:c=[]})=>{const{activeFilterBadges:d}=e.properties();t.getAsync("router").then(f=>{var g;const{params:y}=f.getRouteData();e.actions.dispatch("search",{filtersChanged:!0,filters:{guideCategoryId:h.indexOf("guideCategory")>-1?null:(g=d==null?void 0:d.guideCategory)==null?void 0:g.id,tagIds:h.indexOf("tag")>-1?((d==null?void 0:d.tag)||[]).filter(p=>!(c!=null&&c.includes(p.id))).map(p=>p.id):(d==null?void 0:d.tag.map(p=>p.id))||[]},value:y.phrase||""})})}),e.actions.create("quick-filter:close",()=>e.writeProperties({quickFilter:{items:[],loading:!1,open:!1}})),e.actions.create("quick-filter:open",({symbol:h,type:c})=>(e.writeProperties({quickFilter:{type:c,symbol:h,items:[],loading:!0,open:!0}}),o().then(({tag:d,guideCategory:f,phrase:y})=>{if(c==="guideCategory")return u({tagId:d,searchPhrase:y}).then(g=>{const p=fe(g);e.writeProperties({quickFilter:{items:Nt(p),loading:!1}})});if(c==="tag")return l({categories:f,searchPhrase:y}).then(g=>{const p=fe(g);e.writeProperties({quickFilter:{items:Nt(p),loading:!1}})})})));const u=h=>Ce.getInstance(t).then(c=>c.fetch(Et.GuideCategories,h)).then(c=>c.categories||[]),l=h=>Ce.getInstance(t).then(c=>c.fetch(Et.TagsOnGuides,h)).then((c=[])=>c);return o().then(h=>{i(h)}),s("router:changed",(h,{current:c})=>{const{routeData:{params:d}}=c;i(d)}),s("data-client:fetched",(h,c)=>{const{filterBadges:d}=e.properties(),f=typeof d=="object"?!!d.tag:!!d;c.type==="match"&&f&&o().then(({tag:y})=>{const{tags:g=[]}=c.response,p=g.find(v=>v.id===y)||null;e.writeProperties({filters:{tag:p}})})}),()=>{r()}});exports.Button=W;exports.ColumnContext=Ys;exports.ComponentNodeContext=kn;exports.ComponentPropertyContext=Js;exports.ComponentQuery=Ue;exports.Grid=lr;exports.Input=zn;exports.ItemList=Re;exports.Link=Oe;exports.Loader=ro;exports.SearchComponent=ao;exports.SymbolBadge=q;exports.Text=$e;exports.Tooltip=gi;exports.Typography=Qe;exports.appendClassNames=N;exports.borderTabStyle=I;exports.categoryTrail=gn;exports.contentBox=Vt;exports.convertToStringAttributes=V;exports.createEventSubscriber=Ot;exports.deepClone=fe;exports.filterCssProps=Pt;exports.filterCssPropsStyle=wn;exports.paddedBorderTabStyle=bt;exports.useComponentNode=jn;exports.useComponentPlatform=It;exports.useContainer=ee;exports.useContext=Sn;exports.useEventListener=de;exports.useIsMounted=Ke;exports.useKeyPress=be;exports.usePrevious=Dt;exports.useRouteData=Bt;exports.useRouter=Ht;exports.useScroll=En;exports.useWidgetEvent=Ge;exports.uuid=me;
|