"use strict";(self.webpackChunk_genially_view_client=self.webpackChunk_genially_view_client||[]).push([[56],{65455(e,t,n){n.d(t,{q:()=>l});var i=n(45992),o=n(94310),r=n(65850);const l=e=>{let{text:t,textColor:n,backgroundColor:l,hoverColor:a,visitedColor:d,showVisitedState:s,visited:c,shape:u,fontFamily:h,bold:g,italic:m,onClick:f}=e;const{ref:v,size:p}=(0,o.r)(),b=s&&c?d:l;return(0,i.jsx)(r.mO,{ref:v,style:{"--parent-height":p.height},children:(0,i.jsx)(r.OV,{type:"button",onClick:f,$textColor:n,$backgroundColor:b,$hoverColor:a,$shape:u,$fontFamily:h,$bold:g,$italic:m,children:t})})}},65850(e,t,n){n.d(t,{OV:()=>u,eG:()=>d,mO:()=>c,q8:()=>a,zU:()=>l});var i=n(37577),o=n(24578),r=n(2521);const l=8,a=.5,d=.5,s={[r.a.Pill]:"9999px",[r.a.Rounded]:"calc(var(--parent-height) * 0.25 * 1px)",[r.a.Square]:"0"},c=i.Ay.div(Object.assign({width:"100%",height:"100%",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center"},o.iF.mixins.increaseSpecificity({padding:l}))),u=i.Ay.button((e=>{let{$textColor:t,$backgroundColor:n,$hoverColor:i,$shape:r,$fontFamily:l,$bold:c,$italic:u}=e;return Object.assign(Object.assign({border:"none",fontSize:`calc(var(--parent-height) * ${a} * 1px)`,width:"100%",boxSizing:"border-box",whiteSpace:"nowrap",cursor:"pointer"},o.iF.mixins.increaseSpecificity({padding:`calc(var(--parent-height) * 0.25 * 1px) calc(var(--parent-height) * ${d} * 1px)`,backgroundColor:n,borderRadius:s[r],lineHeight:1,color:t,fontFamily:null!==l&&void 0!==l?l:"inherit",fontWeight:c?"bold":"normal",fontStyle:u?"italic":"normal"})),{"&:hover":Object.assign({},o.iF.mixins.increaseSpecificity({backgroundColor:i}))})}))},60056(e,t,n){n.d(t,{geniallyButtonViewScript:()=>a});var i=n(45992),o=n(41381),r=n(65455);const l="visited",a=(e,t)=>{(0,o.p)({getTargetNodeItem:()=>e.item,initialState:void 0,renderApp:n=>{let{setState:o}=n;const a=!0===t.getVar(l),d=()=>{t.setVar(l,!0),o({visited:!0})};return t=>{var n;const o=null!==(n=null===t||void 0===t?void 0:t.visited)&&void 0!==n?n:a,{text:l,textColor:s,defaultColor:c,hoverColor:u,visitedColor:h,showVisitedState:g,shape:m,fontFamily:f,bold:v,italic:p}=e.config;return(0,i.jsx)(r.q,{text:l,textColor:s,backgroundColor:c,hoverColor:u,visitedColor:null!==h&&void 0!==h?h:"",showVisitedState:g,visited:o,shape:m,fontFamily:""===f.name?void 0:f.name,bold:v,italic:p,onClick:d})}}})(e,t)}},94310(e,t,n){n.d(t,{r:()=>o});var i=n(17588);const o=()=>{const[e,t]=(0,i.useState)({width:0,height:0}),n=(0,i.useRef)(null);return{ref:(0,i.useCallback)((e=>{if(n.current&&n.current.disconnect(),!e)return;const{width:i,height:o}=e.getBoundingClientRect();t({width:i,height:o}),n.current=new ResizeObserver((e=>{const{contentRect:n}=e[0];t({width:n.width,height:n.height})})),n.current.observe(e)}),[]),size:e}}},41381(e,t,n){n.d(t,{p:()=>l});var i=n(70377),o=n(66264),r=n(60708);function l(e){let{getTargetNodeItem:t,renderApp:n,renderThumbnailApp:l,initialState:a}=e,d=!1;const s=[],c=e=>{s.push(e)};return e=>{const u=t(e.config),h=null===u||void 0===u?void 0:u.parentSlide;function g(){d=!1,s.forEach((e=>{e()})),s.length=0}function m(){if(!u)return;let e=null;if("idOfFreeNode"in u)e=document.getElementById(u.idOfFreeNode);else{const t=document.createElement("div");t.innerHTML=u.source;let n=t.getElementsByClassName("genially-widget-app");n.length||(n=t.getElementsByClassName("genially-widget-gallery"));const{id:i}=n[0];if(!i)return;e=document.getElementById(i)}if(e){let t;const o=n=>{d&&t?i.render(t(n),e):console.warn('"rerender" was called when the widget was already unmounted. This is a no-op. Did you forget to dispose of an event handler with "onUnmount"?')};t=n({setState:o,onUnmount:c,unmountNow:g}),d=!0,o(a),s.push((()=>{i.unmountComponentAtNode(e)}))}}function f(){if(!u||!("idOfThumbnailFreeNode"in u))return[];const e=document.getElementsByClassName(u.idOfThumbnailFreeNode);return Array.from(e).filter((e=>e instanceof HTMLElement))}const v=u&&"isTransversal"in u&&u.isTransversal,p=()=>{null===u||void 0===u||u.on(o.q.Mount,(()=>{m()})),null===u||void 0===u||u.on(o.q.Unmount,(()=>{g()}))};v?p():(null===h||void 0===h||h.on(r.m.Entering,(()=>{d||(m(),d||p())})),null===h||void 0===h||h.on(r.m.Exited,(()=>{d&&g()}))),null===h||void 0===h||h.on(r.m.ThumbnailMount,(()=>{!function(){if(!l||!u||!("idOfThumbnailFreeNode"in u))return;f().forEach((e=>{i.unmountComponentAtNode(e)}))}(),function(){if(!l||!u||!("idOfThumbnailFreeNode"in u))return;f().forEach((e=>{const{renderingSlideId:t}=e.dataset;i.render(l({renderingSlideId:t}),e)}))}()}))}}}}]);
//# sourceMappingURL=https://s3-static-genially.genially.com/view/static/js/56.2cf9af4d.chunk.js.map