-
Notifications
You must be signed in to change notification settings - Fork 0
/
price_table.esm.js
1 lines (1 loc) · 23 KB
/
price_table.esm.js
1
var e,t,n,_,r,o={},l=[],i=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function u(e,t){for(var n in t)e[n]=t[n];return e}function a(e){var t=e.parentNode;t&&t.removeChild(e)}function c(t,n,_){var r,o,l,i={};for(l in n)"key"==l?r=n[l]:"ref"==l?o=n[l]:i[l]=n[l];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof t&&null!=t.defaultProps)for(l in t.defaultProps)void 0===i[l]&&(i[l]=t.defaultProps[l]);return s(t,i,r,o,null)}function s(e,_,r,o,l){var i={type:e,props:_,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++n:l};return null==l&&null!=t.vnode&&t.vnode(i),i}function f(e){return e.children}function p(e,t){this.props=e,this.context=t}function d(e,t){if(null==t)return e.__?d(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?d(e):null}function v(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return v(e)}}function m(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!y.__r++||r!==t.debounceRendering)&&((r=t.debounceRendering)||setTimeout)(y)}function y(){for(var e;y.__r=_.length;)e=_.sort(function(e,t){return e.__v.__b-t.__v.__b}),_=[],e.some(function(e){var t,n,_,r,o,l;e.__d&&(o=(r=(t=e).__v).__e,(l=t.__P)&&(n=[],(_=u({},r)).__v=r.__v+1,x(l,r,_,t.__n,void 0!==l.ownerSVGElement,null!=r.__h?[o]:null,n,null==o?d(r):o,r.__h),C(n,r),r.__e!=o&&v(r)))})}function g(e,t,n,_,r,i,u,a,c,p){var h,v,m,y,g,k,N,S=_&&_.__k||l,E=S.length;for(n.__k=[],h=0;h<t.length;h++)if(null!=(y=n.__k[h]=null==(y=t[h])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?s(null,y,null,null,y):Array.isArray(y)?s(f,{children:y},null,null,null):y.__b>0?s(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(m=S[h])||m&&y.key==m.key&&y.type===m.type)S[h]=void 0;else for(v=0;v<E;v++){if((m=S[v])&&y.key==m.key&&y.type===m.type){S[v]=void 0;break}m=null}x(e,y,m=m||o,r,i,u,a,c,p),g=y.__e,(v=y.ref)&&m.ref!=v&&(N||(N=[]),m.ref&&N.push(m.ref,null,y),N.push(v,y.__c||g,y)),null!=g?(null==k&&(k=g),"function"==typeof y.type&&y.__k===m.__k?y.__d=c=b(y,c,e):c=w(e,y,m,S,g,c),"function"==typeof n.type&&(n.__d=c)):c&&m.__e==c&&c.parentNode!=e&&(c=d(m))}for(n.__e=k,h=E;h--;)null!=S[h]&&T(S[h],S[h]);if(N)for(h=0;h<N.length;h++)H(N[h],N[++h],N[++h])}function b(e,t,n){for(var _,r=e.__k,o=0;r&&o<r.length;o++)(_=r[o])&&(_.__=e,t="function"==typeof _.type?b(_,t,n):w(n,_,_,r,_.__e,t));return t}function k(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some(function(e){k(e,t)}):t.push(e)),t}function w(e,t,n,_,r,o){var l,i,u;if(void 0!==t.__d)l=t.__d,t.__d=void 0;else if(null==n||r!=o||null==r.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(r),l=null;else{for(i=o,u=0;(i=i.nextSibling)&&u<_.length;u+=2)if(i==r)break e;e.insertBefore(r,o),l=o}return void 0!==l?l:r.nextSibling}function N(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||i.test(t)?n:n+"px"}function S(e,t,n,_,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(t in _)n&&t in n||N(e.style,t,"");if(n)for(t in n)_&&n[t]===_[t]||N(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?_||e.addEventListener(t,o?P:E,o):e.removeEventListener(t,o?P:E,o);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function E(e){this.l[e.type+!1](t.event?t.event(e):e)}function P(e){this.l[e.type+!0](t.event?t.event(e):e)}function x(e,n,_,r,o,l,i,a,c){var s,d,h,v,m,y,b,k,w,N,S,E,P,x=n.type;if(void 0!==n.constructor)return null;null!=_.__h&&(c=_.__h,a=n.__e=_.__e,n.__h=null,l=[a]),(s=t.__b)&&s(n);try{e:if("function"==typeof x){k=n.props,w=(s=x.contextType)&&r[s.__c],N=s?w?w.props.value:s.__:r,_.__c?b=(d=n.__c=_.__c).__=d.__E:("prototype"in x&&x.prototype.render?n.__c=d=new x(k,N):(n.__c=d=new p(k,N),d.constructor=x,d.render=O),w&&w.sub(d),d.props=k,d.state||(d.state={}),d.context=N,d.__n=r,h=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=x.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=u({},d.__s)),u(d.__s,x.getDerivedStateFromProps(k,d.__s))),v=d.props,m=d.state;for(s=0;s<d._sb.length;s++)d.__h.push(d._sb[s]),d._sb=[];if(h)null==x.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==x.getDerivedStateFromProps&&k!==v&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(k,N),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(k,d.__s,N)||n.__v===_.__v){d.props=k,d.state=d.__s,n.__v!==_.__v&&(d.__d=!1),d.__v=n,n.__e=_.__e,n.__k=_.__k,n.__k.forEach(function(e){e&&(e.__=n)}),d.__h.length&&i.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(k,d.__s,N),null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(v,m,y)})}if(d.context=N,d.props=k,d.__v=n,d.__P=e,S=t.__r,E=0,"prototype"in x&&x.prototype.render)d.state=d.__s,d.__d=!1,S&&S(n),s=d.render(d.props,d.state,d.context);else do{d.__d=!1,S&&S(n),s=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++E<25);d.state=d.__s,null!=d.getChildContext&&(r=u(u({},r),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(y=d.getSnapshotBeforeUpdate(v,m)),P=null!=s&&s.type===f&&null==s.key?s.props.children:s,g(e,Array.isArray(P)?P:[P],n,_,r,o,l,i,a,c),d.base=n.__e,n.__h=null,d.__h.length&&i.push(d),b&&(d.__E=d.__=null),d.__e=!1}else null==l&&n.__v===_.__v?(n.__k=_.__k,n.__e=_.__e):n.__e=A(_.__e,n,_,r,o,l,i,c);(s=t.diffed)&&s(n)}catch(e){n.__v=null,(c||null!=l)&&(n.__e=a,n.__h=!!c,l[l.indexOf(a)]=null),t.__e(e,n,_)}}function C(e,n){t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(e){t.__e(e,n.__v)}})}function A(t,n,_,r,l,i,u,c){var s,f,p,h=_.props,v=n.props,m=n.type,y=0;if("svg"===m&&(l=!0),null!=i)for(;y<i.length;y++)if((s=i[y])&&"setAttribute"in s==!!m&&(m?s.localName===m:3===s.nodeType)){t=s,i[y]=null;break}if(null==t){if(null===m)return document.createTextNode(v);t=l?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,v.is&&v),i=null,c=!1}if(null===m)h===v||c&&t.data===v||(t.data=v);else{if(i=i&&e.call(t.childNodes),f=(h=_.props||o).dangerouslySetInnerHTML,p=v.dangerouslySetInnerHTML,!c){if(null!=i)for(h={},y=0;y<t.attributes.length;y++)h[t.attributes[y].name]=t.attributes[y].value;(p||f)&&(p&&(f&&p.__html==f.__html||p.__html===t.innerHTML)||(t.innerHTML=p&&p.__html||""))}if(function(e,t,n,_,r){var o;for(o in n)"children"===o||"key"===o||o in t||S(e,o,null,n[o],_);for(o in t)r&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||S(e,o,t[o],n[o],_)}(t,v,h,l,c),p)n.__k=[];else if(y=n.props.children,g(t,Array.isArray(y)?y:[y],n,_,r,l&&"foreignObject"!==m,i,u,i?i[0]:_.__k&&d(_,0),c),null!=i)for(y=i.length;y--;)null!=i[y]&&a(i[y]);c||("value"in v&&void 0!==(y=v.value)&&(y!==t.value||"progress"===m&&!y||"option"===m&&y!==h.value)&&S(t,"value",y,h.value,!1),"checked"in v&&void 0!==(y=v.checked)&&y!==t.checked&&S(t,"checked",y,h.checked,!1))}return t}function H(e,n,_){try{"function"==typeof e?e(n):e.current=n}catch(e){t.__e(e,_)}}function T(e,n,_){var r,o;if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||H(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){t.__e(e,n)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&T(r[o],n,_||"function"!=typeof e.type);_||null==e.__e||a(e.__e),e.__=e.__e=e.__d=void 0}function O(e,t,n){return this.constructor(e,n)}function F(n,_,r){var l,i,u;t.__&&t.__(n,_),i=(l="function"==typeof r)?null:r&&r.__k||_.__k,u=[],x(_,n=(!l&&r||_).__k=c(f,null,[n]),i||o,o,void 0!==_.ownerSVGElement,!l&&r?[r]:i?null:_.firstChild?e.call(_.childNodes):null,u,!l&&r?r:i?i.__e:_.firstChild,l),C(u,n)}e=l.slice,t={__e:function(e,t,n,_){for(var r,o,l;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,_||{}),l=r.__d),l)return r.__E=r}catch(t){e=t}throw e}},n=0,p.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=u({},this.state),"function"==typeof e&&(e=e(u({},n),this.props)),e&&u(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),m(this))},p.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),m(this))},p.prototype.render=f,_=[],y.__r=0;var L,U,M,D,R=0,W=[],j=[],V=t.__b,B=t.__r,$=t.diffed,z=t.__c,q=t.unmount;function I(e,n){t.__h&&t.__h(U,e,R||n),R=0;var _=U.__H||(U.__H={__:[],__h:[]});return e>=_.__.length&&_.__.push({__V:j}),_.__[e]}function G(e){return R=1,function(e,t,n){var _=I(L++,2);if(_.t=e,!_.__c&&(_.__=[ee(void 0,t),function(e){var t=_.__N?_.__N[0]:_.__[0],n=_.t(t,e);t!==n&&(_.__N=[n,_.__[1]],_.__c.setState({}))}],_.__c=U,!U.u)){U.u=!0;var r=U.shouldComponentUpdate;U.shouldComponentUpdate=function(e,t,n){if(!_.__c.__H)return!0;var o=_.__c.__H.__.filter(function(e){return e.__c});if(o.every(function(e){return!e.__N}))return!r||r.call(this,e,t,n);var l=!1;return o.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(l=!0)}}),!(!l&&_.__c.props===e)&&(!r||r.call(this,e,t,n))}}return _.__N||_.__}(ee,e)}function Z(e,n){var _=I(L++,3);!t.__s&&function(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}(_.__H,n)&&(_.__=e,_.i=n,U.__H.__h.push(_))}function J(){for(var e;e=W.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(X),e.__H.__h.forEach(Y),e.__H.__h=[]}catch(n){e.__H.__h=[],t.__e(n,e.__v)}}t.__b=function(e){"function"!=typeof e.type||e.__m||e.type===f?e.__m||(e.__m=e.__&&e.__.__m?e.__.__m:""):e.__m=(e.__&&e.__.__m?e.__.__m:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),U=null,V&&V(e)},t.__r=function(e){B&&B(e),L=0;var t=(U=e.__c).__H;t&&(M===U?(t.__h=[],U.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=j,e.__N=e.i=void 0})):(t.__h.forEach(X),t.__h.forEach(Y),t.__h=[])),M=U},t.diffed=function(e){$&&$(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==W.push(n)&&D===t.requestAnimationFrame||((D=t.requestAnimationFrame)||Q)(J)),n.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==j&&(e.__=e.__V),e.i=void 0,e.__V=j})),M=U=null},t.__c=function(e,n){n.some(function(e){try{e.__h.forEach(X),e.__h=e.__h.filter(function(e){return!e.__||Y(e)})}catch(_){n.some(function(e){e.__h&&(e.__h=[])}),n=[],t.__e(_,e.__v)}}),z&&z(e,n)},t.unmount=function(e){q&&q(e);var n,_=e.__c;_&&_.__H&&(_.__H.__.forEach(function(e){try{X(e)}catch(e){n=e}}),_.__H=void 0,n&&t.__e(n,_.__v))};var K="function"==typeof requestAnimationFrame;function Q(e){var t,n=function(){clearTimeout(_),K&&cancelAnimationFrame(t),setTimeout(e)},_=setTimeout(n,100);K&&(t=requestAnimationFrame(n))}function X(e){var t=U,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),U=t}function Y(e){var t=U;e.__c=e.__(),U=t}function ee(e,t){return"function"==typeof t?t(e):t}var te={en:{link_text:"Press here",table_h1:"Pipedrive plan features"},fi:{link_text:"Paina tästä",table_h1:"Pipedriven ominaisuudet"}};function ne(e,t){return te[e]?te[e][t]?te[e][t]:"No Translation available for key":"No translation available"}function _e(e){var t=e.children,n=e.onClose,_="zimple_table";return h("dialog",{id:_,onClick:function(e){e.target&&e.target.id===_&&n()},open:!0,className:"price_dialog"},h("div",{className:"price_dialog_content "+(e.mobileMode?"price_dialog_content_mobile":"")},h("div",{onClick:function(){return n()},className:"price_dialog_header",style:{display:"flex",alignItems:"center",verticalAlign:"center"}},h("span",{className:"table_h1_text"}," ",ne("en","table_h1")),h("span",{className:"close"})),t))}function re(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var _ in t)if("__source"!==_&&e[_]!==t[_])return!0;return!1}function oe(e){this.props=e}(oe.prototype=new p).isPureReactComponent=!0,oe.prototype.shouldComponentUpdate=function(e,t){return re(this.props,e)||re(this.state,t)};var le=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),le&&le(e)};var ie=t.__e;t.__e=function(e,t,n,_){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);ie(e,t,n,_)};var ue=t.unmount;function ae(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=function(e,t){for(var n in t)e[n]=t[n];return e}({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return ae(e,t,n)})),e}function ce(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return ce(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function se(){this.__u=0,this.t=null,this.__b=null}function fe(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function pe(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),ue&&ue(e)},(se.prototype=new p).__c=function(e,t){var n=t.__c,_=this;null==_.t&&(_.t=[]),_.t.push(n);var r=fe(_.__v),o=!1,l=function(){o||(o=!0,n.__R=null,r?r(i):i())};n.__R=l;var i=function(){if(!--_.__u){if(_.state.__a){var e=_.state.__a;_.__v.__k[0]=ce(e,e.__c.__P,e.__c.__O)}var t;for(_.setState({__a:_.__b=null});t=_.t.pop();)t.forceUpdate()}},u=!0===t.__h;_.__u++||u||_.setState({__a:_.__b=_.__v.__k[0]}),e.then(l,l)},se.prototype.componentWillUnmount=function(){this.t=[]},se.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),_=this.__v.__k[0].__c;this.__v.__k[0]=ae(this.__b,n,_.__O=_.__P)}this.__b=null}var r=t.__a&&c(f,null,e.fallback);return r&&(r.__h=null),[c(f,null,t.__a?null:e.children),r]};var de=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(pe.prototype=new p).__a=function(e){var t=this,n=fe(t.__v),_=t.o.get(e);return _[0]++,function(r){var o=function(){t.props.revealOrder?(_.push(r),de(t,e,_)):r()};n?n(o):o()}},pe.prototype.render=function(e){this.u=null,this.o=new Map;var t=k(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},pe.prototype.componentDidUpdate=pe.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){de(e,n,t)})};var he="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ve=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,me="undefined"!=typeof document,ye=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};p.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(p.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ge=t.event;function be(){}function ke(){return this.cancelBubble}function we(){return this.defaultPrevented}t.event=function(e){return ge&&(e=ge(e)),e.persist=be,e.isPropagationStopped=ke,e.isDefaultPrevented=we,e.nativeEvent=e};var Ne={configurable:!0,get:function(){return this.class}},Se=t.vnode;t.vnode=function(e){var t=e.type,n=e.props,_=n;if("string"==typeof t){var r=-1===t.indexOf("-");for(var o in _={},n){var l=n[o];me&&"children"===o&&"noscript"===t||"value"===o&&"defaultValue"in n&&null==l||("defaultValue"===o&&"value"in n&&null==n.value?o="value":"download"===o&&!0===l?l="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+t)&&!ye(n.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():r&&ve.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===l&&(l=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),_[o]&&(o="oninputCapture")),_[o]=l)}"select"==t&&_.multiple&&Array.isArray(_.value)&&(_.value=k(n.children).forEach(function(e){e.props.selected=-1!=_.value.indexOf(e.props.value)})),"select"==t&&null!=_.defaultValue&&(_.value=k(n.children).forEach(function(e){e.props.selected=_.multiple?-1!=_.defaultValue.indexOf(e.props.value):_.defaultValue==e.props.value})),e.props=_,n.class!=n.className&&(Ne.enumerable="className"in n,null!=n.className&&(_.class=n.className),Object.defineProperty(_,"className",Ne))}e.$$typeof=he,Se&&Se(e)};var Ee=t.__r;function Pe(e){return h("div",{className:"grid_row "+(e.isHeader?"grid_row_header":"")},e.children)}function xe(e){return h("div",{className:"grid_cell"},e.children)}function Ce(e){var t=e.tableConfig,n=e.mobileMode,_=t?t.icons.f:"",r=t?t.icons.s:"",o=G(""),l=o[0],i=o[1];return t?n?h(Fragment,null,h("div",{className:"price_dialog_header_mobile"},t.colTitles.map(function(e){return h("div",null,e)})),t.blocks.map(function(e,t){return h("div",null,h("div",{className:"price_table_value_category_header"},h("h4",null,e.blockHeader)),e.rows.map(function(e,n){var o=t+"_"+n;return h("div",null,h("div",{className:"price_table_value_label_mobile",onClick:function(){return i(function(e){return e===o?"":o})}},e.header,h("i",{className:"arrow "+(o===l?"up":"down")})),o===l&&h("div",{className:"price_table_value_row_mobile"},e.values.map(function(e){return h("div",null,e.isSvg&&h("svg",{style:{width:24,height:24},fill:"f"==e.value?"#4BA44F":"#9592A1"},h("path",{d:"f"===e.value?_:r})),!e.isSvg&&e.value&&h("span",{className:"value_without_svg"},e.value),e.additionalText&&h("span",{className:"value_additional_text"},e.additionalText))})))}))})):h("div",{style:{position:"relative"}},t.blocks.map(function(e,n){return h(Fragment,null,!n&&h(Pe,{isHeader:!0},h(xe,null),t.colTitles.map(function(e,t){return h(xe,null,e)})),h("h3",{className:"zimple_table_h3"},e.blockHeader),e.rows.map(function(e,t){return h(Pe,null,h(xe,null,e.header),e.values.map(function(e){return h(xe,null,e.isSvg&&h("svg",{style:{width:24,height:24},fill:"f"==e.value?"#4BA44F":"#9592A1"},h("path",{d:"f"===e.value?_:r})),!e.isSvg&&e.value&&h("span",{className:"value_without_svg"},e.value),e.additionalText&&h("span",{className:"value_additional_text"},e.additionalText))}))}))})):h("div",null,"Loading...")}function Ae(){return Ae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var _ in n)Object.prototype.hasOwnProperty.call(n,_)&&(e[_]=n[_])}return e},Ae.apply(this,arguments)}t.__r=function(e){Ee&&Ee(e)};const He=e=>e instanceof ShadowRoot,Te=e=>{const t=e.getRootNode()instanceof ShadowRoot?e.getRootNode().host:e,{dataset:n}=t,_={};for(var r in n){if(!1===n.hasOwnProperty(r))return;const e=`${(o=r.split(/(props?)/).pop()||"").charAt(0).toLowerCase()}${o.slice(1)}`;e&&(_[e]=n[r])}var o;return _},Oe=e=>["text/props","application/json"].includes(e.getAttribute("type")||""),Fe=e=>He(e)?[]:Array.from(e.getElementsByTagName("script")).filter(Oe),Le=e=>Array.from(document.querySelectorAll(e)).filter(Oe),Ue=e=>{let t={};return e.forEach(e=>{try{t=Ae({},t,JSON.parse(e.innerHTML))}catch(e){}}),t},Me=(e,t,n={},_)=>{const r=Te(t),o=e._executedScript?Te(e._executedScript):{},l=Ue(Fe(t));return Ae({},n,r,o,_?Ue(Le(_)):{},l)};function De(e,t){var n=(t=[].concat(t))[t.length-1].nextSibling;function _(t,_){e.insertBefore(t,_||n)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:_,appendChild:_,removeChild:function(t){e.removeChild(t)}}}const Re=({island:e,widget:t,rootFragment:n,props:_})=>{e.props=_,F(c(t,_),n)};function We(){var e=c("div",{});console.log(e);var t=G(!1),n=t[0],_=t[1],r=G(!1),o=r[0],l=r[1],i=G(null),u=i[0],a=i[1],s=function(){var e=window.innerWidth<620;l(e)};return Z(function(){if(!u&&n)try{return Promise.resolve(function(e){try{return console.log("Price table fetch call"),Promise.resolve(function(e,t){try{var n=(console.log("Tries to fetch data"),Promise.resolve(fetch("https://pipedrive-pricing-uzujf6nj3q-lz.a.run.app?lang=en",{method:"GET"})).then(function(e){return Promise.resolve(e.json())}))}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}(0,function(e){throw console.warn(e),Error("Error while trying to fetch data")}))}catch(e){return Promise.reject(e)}}()).then(function(e){e&&a(e)})}catch(e){Promise.reject(e)}},[n]),Z(function(){return s(),window.addEventListener("resize",s),function(){window.removeEventListener("resize",s)}},[]),c(Fragment,null,c("a",{href:"#",onClick:function(e){console.log("Open modal"),e.preventDefault(),_(!0)}},ne("en","link_text")),n&&c(_e,{mobileMode:o,onClose:function(){return _(!1)}},c(Ce,{mobileMode:o,tableConfig:u})))}var je=(e=>{const t={_rootsToObservers:new WeakMap,_roots:[],_executedScript:document.currentScript,props:{},render:({selector:n,clean:_=!1,replace:r=!1,inline:o=!1,initialProps:l={},propsSelector:i})=>{let u=!1;const a=()=>{if(!0===u)return;const a=(({selector:e,inline:t})=>{const n=document.currentScript;if(t&&null!=n&&n.parentNode)return[n.parentNode];const _=null==n?void 0:n.dataset.mountIn;return _?Array.from(document.querySelectorAll(_)):e?Array.from(document.querySelectorAll(e)).map(e=>null!=e.shadowRoot?e.shadowRoot:e):[]})({selector:n,inline:o});if(0===a.length)return;const{rootFragments:c}=(({island:e,widget:t,hostElements:n,clean:_,replace:r,initialProps:o,propsSelector:l})=>{const i=[];return n.forEach(n=>{const u=Me(e,n,o,l);let a;if(_&&n.replaceChildren(),r)a=De(n.parentElement||document.body,n);else{const e=document.createElement("div");n.appendChild(e),a=De(n,e)}i.push(a),Re({island:e,widget:t,rootFragment:a,props:u});const c=(({island:e,hostElement:t,initialProps:n,onNewProps:_,propsSelector:r})=>{const o=new MutationObserver(function(o){o.forEach(function(){_(Me(e,t,n,r))})}),l={attributes:!0,childList:!0,characterData:!0};return e._executedScript&&o.observe(e._executedScript,l),Fe(t).forEach(e=>{o.observe(e,Ae({},l,{subtree:!0}))}),r&&Le(r).forEach(e=>{o.observe(e,Ae({},l,{subtree:!0}))}),o.observe(He(t)?t.host:t,l),o})({island:e,hostElement:n,initialProps:o,onNewProps:n=>{Re({island:e,widget:t,rootFragment:a,props:n})},propsSelector:l});e._rootsToObservers.set(a,c)}),{rootFragments:i}})({island:t,widget:e,clean:_,hostElements:a,replace:r,initialProps:l,propsSelector:i});t._roots=t._roots.concat(c),u=!0};a(),document.addEventListener("DOMContentLoaded",a),document.addEventListener("load",a)},rerender:n=>{t._roots.forEach(_=>{Re({island:t,widget:e,rootFragment:_,props:Ae({},t.props,n)})})},destroy:()=>{t._roots.forEach(e=>{var n;null==(n=t._rootsToObservers.get(e))||n.disconnect(),F(null,e)})}};return t})(We);je.render({selector:'[data-island="zimple_price_table"]'});export{We as App};