2 lines
6.7 KiB
JavaScript
2 lines
6.7 KiB
JavaScript
"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[2803],{28060:function(e,t,n){var r=n(94159);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class a extends r.Component{constructor(e){let t;super(e),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),t=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:t}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame((()=>{this.reCalculateColumnCount()}))):this.reCalculateColumnCount()}reCalculateColumnCount(){const e=window&&window.innerWidth||1/0;let t=this.props.breakpointCols;"object"!=typeof t&&(t={default:parseInt(t)||2});let n=1/0,r=t.default||2;for(let o in t){const i=parseInt(o);i>0&&e<=i&&i<n&&(n=i,r=t[o])}r=Math.max(1,parseInt(r)||1),this.state.columnCount!==r&&this.setState({columnCount:r})}itemsInColumns(){const e=this.state.columnCount,t=new Array(e),n=r.Children.toArray(this.props.children);for(let r=0;r<n.length;r++){const o=r%e;t[o]||(t[o]=[]),t[o].push(n[r])}return t}renderColumns(){const{column:e,columnAttrs:t={},columnClassName:n}=this.props,i=this.itemsInColumns(),l=100/i.length+"%";let a=n;a&&"string"!=typeof a&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===a&&(a="my-masonry-grid_column"));const c=s(s(s({},e),t),{},{style:s(s({},t.style),{},{width:l}),className:a});return i.map(((e,t)=>r.createElement("div",o({},c,{key:t}),e)))}logDeprecated(e){console.error("[Masonry]",e)}render(){const e=this.props,{children:t,breakpointCols:n,columnClassName:i,columnAttrs:s,column:l,className:a}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let u=a;return"string"!=typeof a&&(this.logDeprecated('The property "className" requires a string'),void 0===a&&(u="my-masonry-grid")),r.createElement("div",o({},c,{className:u}),this.renderColumns())}}a.defaultProps={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0},t.Z=a},60669:function(e,t,n){var r=n(94159);const o=r.forwardRef((function({title:e,titleId:t,...n},o){return r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:o,"aria-labelledby":t},n),e?r.createElement("title",{id:t},e):null,r.createElement("path",{fillRule:"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z",clipRule:"evenodd"}))}));t.Z=o},38746:function(e,t,n){n.d(t,{$X:function(){return o}});var r=n(94159);function o(e){const t=r.useRef(new Set(e)),[,n]=r.useReducer((e=>e+1),0);return t.current.add=(...e)=>{const r=Set.prototype.add.apply(t.current,e);return n(),r},t.current.clear=(...e)=>{Set.prototype.clear.apply(t.current,e),n()},t.current.delete=(...e)=>{const r=Set.prototype.delete.apply(t.current,e);return n(),r},t.current}},62866:function(e,t,n){n.d(t,{YD:function(){return a}});var r=n(94159),o=(Object.defineProperty,new Map),i=new WeakMap,s=0;function l(e,t,n={},r){if(void 0===window.IntersectionObserver&&void 0!==r){const o=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"==typeof n.threshold?n.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}const{id:l,observer:a,elements:c}=function(e){const t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(i.has(n)||(s+=1,i.set(n,s.toString())),i.get(n)):"0"):e[t]}`;var n})).toString()}(e);let n=o.get(t);if(!n){const r=new Map;let i;const s=new IntersectionObserver((t=>{t.forEach((t=>{var n;const o=t.isIntersecting&&i.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(n=r.get(t.target))||n.forEach((e=>{e(o,t)}))}))}),e);i=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:s,elements:r},o.set(t,n)}return n}(n),u=c.get(e)||[];return c.has(e)||c.set(e,u),u.push(t),a.observe(e),function(){u.splice(u.indexOf(t),1),0===u.length&&(c.delete(e),a.unobserve(e)),0===c.size&&(a.disconnect(),o.delete(l))}}function a({threshold:e,delay:t,trackVisibility:n,rootMargin:o,root:i,triggerOnce:s,skip:a,initialInView:c,fallbackInView:u,onChange:d}={}){var p;const[m,h]=r.useState(null),f=r.useRef(),[C,b]=r.useState({inView:!!c,entry:void 0});f.current=d,r.useEffect((()=>{if(a||!m)return;let r;return r=l(m,((e,t)=>{b({inView:e,entry:t}),f.current&&f.current(e,t),t.isIntersecting&&s&&r&&(r(),r=void 0)}),{root:i,rootMargin:o,threshold:e,trackVisibility:n,delay:t},u),()=>{r&&r()}}),[Array.isArray(e)?e.toString():e,m,i,o,s,a,n,u,t]);const y=null==(p=C.entry)?void 0:p.target,w=r.useRef();m||!y||s||a||w.current===y||(w.current=y,b({inView:!!c,entry:void 0}));const g=[h,C.inView,C.entry];return g.ref=g[0],g.inView=g[1],g.entry=g[2],g}r.Component}}]);
|
|
//# sourceMappingURL=2803.054d98e0342e389b5bc7.js.map
|