-
Notifications
You must be signed in to change notification settings - Fork 9
/
app.js
1 lines (1 loc) · 10.6 KB
/
app.js
1
(()=>{var e={318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},8:e=>{function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},149:(e,t,n)=>{"use strict";var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.EqualHeightConsumer=t.EqualHeightProvider=t.EqualHeightContext=void 0;var o,i=(o=n(689))&&o.__esModule?o:{default:o},u=n(32),a=r({setTemporarySizes:function(){},setOriginalChildrenCount:function(){},setChildrenCount:function(){},setForceUpdate:function(){}},u.defaults),l=i.default.createContext({sizes:a&&a.sizes,temporarySizes:a&&a.temporarySizes,update:a&&a.update,animationSpeed:a&&a.animationSpeed,forceUpdate:a&&a.forceUpdate,originalChildrenCount:a&&a.originalChildrenCount,childrenCount:a&&a.childrenCount,setTemporarySizes:a&&a.setTemporarySizes,setOriginalChildrenCount:a&&a.setOriginalChildrenCount,setChildrenCount:a&&a.setChildrenCount,setForceUpdate:a&&a.setForceUpdate,updateOnChange:a&&a.updateOnChange});t.EqualHeightContext=l;var s=l.Provider;t.EqualHeightProvider=s;var c=l.Consumer;t.EqualHeightConsumer=c},899:(e,t,n)=>{"use strict";var r=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},i=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var u,a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t}(n(689)),l=n(149),s=(u=n(326))&&u.__esModule?u:{default:u},c=(0,a.memo)((function(e){var t=e.children,n=void 0===t?"":t,r=e.name,o=e.tag,u=void 0===o?"div":o,c=e.placeholder,d=void 0!==c&&c,f=e.disable,p=void 0!==f&&f,h=(0,a.useContext)(l.EqualHeightContext),v=h.sizes,m=h.update,g=h.setTemporarySizes,y=h.setOriginalChildrenCount,b=h.setChildrenCount,C=h.animationSpeed,x=(0,a.useState)(),O=x[0],S=x[1],E=(0,a.useRef)(null);(0,a.useEffect)((function(){if(!p)return y((function(e){return e+1})),function(){y((function(e){return e-1}))}}),[p,d]),(0,a.useEffect)((function(){p||function(){if(E.current&&!p){var e=E.current.style.getPropertyValue("height");E.current.style.removeProperty("height");var t=E.current.offsetHeight;E.current.style.setProperty("height",e),g((function(e){return i(i([],e,!0),[{name:r,height:t}],!1)})),p||b((function(e){return e+1}))}}()}),[m,p,d]),(0,a.useMemo)((function(){if(!p){var e=v.findIndex((function(e){return e.name===r}));v&&v[e]&&v[e].height&&S(v[e].height)}}),[v]);var _={height:O+"px",transitionDuration:0===C?"":C+"s"};return d||n?a.default.createElement(a.default.Fragment,null,p?n:a.default.createElement(u,{ref:E,className:s.default.wrapper,style:_},!d&&n)):null}));t.default=c},32:(e,t,n)=>{"use strict";var r=n(318)(n(8)),o=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},i=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},u=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.defaults=void 0;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t}(n(689)),l=n(149);t.defaults={sizes:[],temporarySizes:[],update:!1,forceUpdate:!1,originalChildrenCount:0,childrenCount:0,animationSpeed:.25,timeout:200,updateOnChange:void 0};var s=(0,a.memo)((function(e){var n=e.children,o=e.timeout,i=void 0===o?t.defaults.timeout:o,s=e.animationSpeed,c=void 0===s?t.defaults.animationSpeed:s,d=e.updateOnChange,f=void 0===d?t.defaults.updateOnChange:d,p=(0,a.useState)(t.defaults.sizes),h=p[0],v=p[1],m=(0,a.useState)(t.defaults.temporarySizes),g=m[0],y=m[1],b=(0,a.useState)(t.defaults.update),C=b[0],x=b[1],O=(0,a.useState)(t.defaults.forceUpdate),S=O[0],E=O[1],_=(0,a.useState)(t.defaults.originalChildrenCount),P=_[0],w=_[1],j=(0,a.useState)(t.defaults.childrenCount),M=j[0],q=j[1],H=(0,a.useCallback)((function(){return x((function(e){return!e}))}),[]);return(0,a.useEffect)((function(){var e,t;if("object"===("undefined"==typeof window?"undefined":(0,r.default)(window))&&"object"===(0,r.default)(window.document))return window.addEventListener("resize",i?function(){clearTimeout(e),e=window.setTimeout(H,i)}:H),window.addEventListener("orientationchange",i?function(){clearTimeout(t),t=window.setTimeout(H,i)}:H),function(){window.removeEventListener("resize",H),window.removeEventListener("orientationchange",H)}}),[]),(0,a.useMemo)((function(){H()}),[S,P,f]),(0,a.useMemo)((function(){if(P<=M){var e=[];g.map((function(t){var n=t.name,r=t.height,o=e.findIndex((function(e){return e.name===n}));o>-1?e[o].height<r&&(e[o].height=r):e=u(u([],e,!0),[{name:n,height:r}],!1)})),v(e),y([]),q(0)}}),[M]),a.default.createElement(l.EqualHeightProvider,{value:{sizes:h,temporarySizes:g,update:C,animationSpeed:c,forceUpdate:S,originalChildrenCount:P,childrenCount:M,setTemporarySizes:y,setOriginalChildrenCount:w,setChildrenCount:q,setForceUpdate:E,updateOnChange:f}},n)}));t.default=s},561:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(645),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,".equal-height_JlocK {\n overflow: hidden;\n transition-property: height;\n display: block;\n}\n",""]),o.locals={wrapper:"equal-height_JlocK"};const i=o},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var u=this[i][0];null!=u&&(o[u]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);r&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},326:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(379),o=n.n(r),i=n(795),u=n.n(i),a=n(569),l=n.n(a),s=n(565),c=n.n(s),d=n(216),f=n.n(d),p=n(589),h=n.n(p),v=n(561),m={};m.styleTagTransform=h(),m.setAttributes=c(),m.insert=l().bind(null,"head"),m.domAPI=u(),m.insertStyleElement=f(),o()(v.Z,m);const g=v.Z&&v.Z.locals?v.Z.locals:void 0},379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},u=[],a=0;a<e.length;a++){var l=e[a],s=r.base?l[0]+r.base:l[0],c=i[s]||0,d="".concat(s," ").concat(c);i[s]=c+1;var f=n(d),p={css:l[1],media:l[2],sourceMap:l[3]};-1!==f?(t[f].references++,t[f].updater(p)):t.push({identifier:d,updater:o(p,r),references:1}),u.push(d)}return u}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var u=0;u<i.length;u++){var a=n(i[u]);t[a].references--}for(var l=r(e,o),s=0;s<i.length;s++){var c=n(i[s]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}i=l}}},569:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t),t}},565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},689:e=>{"use strict";e.exports=require("react")}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";var e=r,t=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.EqualHeightConsumer=e.EqualHeightProvider=e.EqualHeightContext=e.EqualHeightElement=e.EqualHeight=void 0;var o=n(32);Object.defineProperty(e,"EqualHeight",{enumerable:!0,get:function(){return t(o).default}});var i=n(899);Object.defineProperty(e,"EqualHeightElement",{enumerable:!0,get:function(){return t(i).default}});var u=n(149);Object.defineProperty(e,"EqualHeightContext",{enumerable:!0,get:function(){return u.EqualHeightContext}}),Object.defineProperty(e,"EqualHeightProvider",{enumerable:!0,get:function(){return u.EqualHeightProvider}}),Object.defineProperty(e,"EqualHeightConsumer",{enumerable:!0,get:function(){return u.EqualHeightConsumer}})})(),module.exports=r})();