@qratilabs/qrati-connect 1.15.0 → 1.16.0
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/CHANGELOG.md +15 -0
- package/README.md +7 -15
- package/element/{DqXVxTid.js → 5r6Bo7Ci.js} +2 -2
- package/element/{CrE4j9y6.js → BFcHkoRl.js} +1 -1
- package/element/{BEbMre38.js → BjKlqBL-.js} +1 -1
- package/element/{CaeKDtna.js → BnW-EUqJ.js} +1 -1
- package/element/{BuCCBRes.js → C02gdRf9.js} +1 -1
- package/element/{DewLJCUC.js → CFWkJhlI.js} +1 -1
- package/element/{DJHZz1P5.js → CqYxc13K.js} +1 -1
- package/element/{x59KzHY5.js → CwuxJzTJ.js} +2 -2
- package/element/{CiOfnyYR.js → D3O7Jz99.js} +1 -1
- package/element/{CMjPQUNc.js → D5BKb6G3.js} +1 -1
- package/element/{DRNBeTh8.js → DXlS0GxU.js} +1 -1
- package/element/{Bs-1YU4z.js → DbaeWrq1.js} +1 -1
- package/element/{BNT_djvv.js → DebJCf-b.js} +1 -1
- package/{react/BYHiYspU.js → element/DjwdBZY8.js} +1 -1
- package/element/{NBwrt_4o.js → DqlSFxal.js} +2 -2
- package/element/{uCSHGWHf.js → EAUqdkem.js} +1 -1
- package/element/NIpwEbln.js +1 -0
- package/element/element.es.js +1 -1
- package/element/{BeLfA8It.js → lQHVylBt.js} +1 -1
- package/element/{CR309DiO.js → ramrdd3J.js} +1 -1
- package/element/{OkOw-tbW.js → shC8dL7j.js} +1 -1
- package/element/wd4jVrYo.js +2 -0
- package/element/web.es.js +1 -1
- package/package.json +17 -8
- package/react/1gRsEgH1.js +2 -0
- package/react/{CdKcUfcM.js → BEWFeCIe.js} +1 -1
- package/react/{BlqNAolt.js → BIvilZpE.js} +1 -1
- package/react/{D933-b-E.js → Bc51PV4C.js} +1 -1
- package/react/BdF6puGl.js +1 -0
- package/react/{CGsOqrV7.js → BmrcbOrh.js} +1 -1
- package/react/{CjNwOTMl.js → BwEt3RWC.js} +1 -1
- package/react/{ByqoRKxG.js → C15VEJPf.js} +1 -1
- package/react/{8MACsDOW.js → C1g6xNix.js} +1 -1
- package/react/{CXjvy_Cg.js → CN8E09RO.js} +1 -1
- package/react/{nLGRNTSo.js → CNQI2_tF.js} +1 -1
- package/react/{B0BmmZ2O.js → CjnUB3g_.js} +1 -1
- package/{element/eKCindk5.js → react/CltQNscz.js} +1 -1
- package/react/{CTfez6qv.js → D5VK-CTF.js} +1 -1
- package/react/{bFy7yDoq.js → D8mo7i15.js} +1 -1
- package/react/{NzroFbiA.js → DAp-a9K8.js} +1 -1
- package/react/{BE5G0oMq.js → DCRWZha8.js} +1 -1
- package/react/{CCeCUu8e.js → DSYqwzgz.js} +1 -1
- package/react/{CrZGqb6e.js → WkALjB2i.js} +2 -2
- package/react/{CeW4BrR6.js → hnY8gF7Z.js} +2 -2
- package/react/index.es.js +1 -1
- package/react/{CxNVvRuW.js → ujsCrkeu.js} +1 -1
- package/umd/web.umd.js +255 -236
- package/element/BGXPmeqN.js +0 -2
- package/element/CF8NC-BL.js +0 -1
- package/react/D3njDxdE.js +0 -2
- package/react/ypHN0YhH.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [1.15.0](https://github.com/qrati-labs/qrati-connect-js/compare/v1.14.2...v1.15.0) (2025-04-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* remove unused release scripts from package.json ([c9d859b](https://github.com/qrati-labs/qrati-connect-js/commit/c9d859b7cda628594c1e3fad505c4e96cb87485f))
|
|
7
|
+
* update release script to pull latest changes from beta branch before merging ([16bb667](https://github.com/qrati-labs/qrati-connect-js/commit/16bb667663bc7d51826ab28cd5315aa869a7b01d))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add release script for beta branch management ([4445f97](https://github.com/qrati-labs/qrati-connect-js/commit/4445f97eab2e31de1a0c96865ef7727eb4815755))
|
|
13
|
+
* add release:production script for managing production releases ([6e824a3](https://github.com/qrati-labs/qrati-connect-js/commit/6e824a3d61e21adbef20171bd85bde0cea2796c0))
|
|
14
|
+
* update page navigation and enhance analytics tracking with new session management ([e77b5a2](https://github.com/qrati-labs/qrati-connect-js/commit/e77b5a2783677fa59273c3111ae5ecd9a7ebe202))
|
|
15
|
+
|
|
1
16
|
## [1.14.2](https://github.com/qrati-labs/qrati-connect-js/compare/v1.14.1...v1.14.2) (2025-04-07)
|
|
2
17
|
|
|
3
18
|
|
package/README.md
CHANGED
|
@@ -45,17 +45,17 @@ export default Page;
|
|
|
45
45
|
|
|
46
46
|
# Available props
|
|
47
47
|
|
|
48
|
+
* **router :** Custom router configuration for internal navigation ('memory or 'hash').
|
|
48
49
|
* **organizationId :** Unique identifier for your organization inside Qrati.
|
|
49
50
|
* **fontClassName :** Classes to control custom font for the component.
|
|
50
51
|
* **textClassName :** Classes to apply any additional styling to texts inside the component.
|
|
51
52
|
* **emptyStateImage :** Link or path to image which will be shown for any empty state in the component.
|
|
52
53
|
* **curateLabel :** Label to show in place of 'Curate' in header for contest type events.
|
|
53
54
|
* **leaderboardLabel :** Label to show in place of 'Leaders' in header for contest type events.
|
|
54
|
-
* **uid :** User id for your application user
|
|
55
|
-
* **fname :** First name for your application user
|
|
56
|
-
* **lname :** Last name for your application user
|
|
57
|
-
* **loginUrl :** The page url inside your web app where we should redirect when authentication is required for user intended action.
|
|
58
|
-
* **router :** Custom router configuration for internal navigation.
|
|
55
|
+
* **uid :** User id for your application user (applicable for custom auth only).
|
|
56
|
+
* **fname :** First name for your application user (applicable for custom auth only).
|
|
57
|
+
* **lname :** Last name for your application user (applicable for custom auth only).
|
|
58
|
+
* **loginUrl :** The page url inside your web app where we should redirect when authentication is required for user intended action (applicable for custom auth only).
|
|
59
59
|
|
|
60
60
|
# Qrati Connect Element (Web Component)
|
|
61
61
|
|
|
@@ -79,17 +79,9 @@ Once imported, you can use the custom element tag `<qrati-connect>` in your HTML
|
|
|
79
79
|
|
|
80
80
|
```html
|
|
81
81
|
<qrati-connect
|
|
82
|
+
router='hash'
|
|
82
83
|
organization-id="your-organization-id"
|
|
83
|
-
|
|
84
|
-
text-class-name="your-text-class"
|
|
85
|
-
curate-label="Contest"
|
|
86
|
-
leaderboard-label="Leaders"
|
|
87
|
-
empty-state-image="https://example.com/empty-state.png"
|
|
88
|
-
uid="user-id"
|
|
89
|
-
fname="John"
|
|
90
|
-
lname="Doe"
|
|
91
|
-
login-url="https://yourapp.com/login"
|
|
92
|
-
></qrati-connect>
|
|
84
|
+
/>
|
|
93
85
|
```
|
|
94
86
|
|
|
95
87
|
Note: When using the Web Component version, props are passed as HTML attributes with kebab-case naming (e.g., `organization-id` instead of `organizationId`).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Q as e,i as t,h as r,e as a,f as s,g as n,u as o,k as l,A as i,l as c,m as h,n as f,D as d,o as u,p,C as m,q as g,j as v,c as x,s as y,t as w,v as b,w as j,R as T,x as q,y as E,S,z as P,P as N,E as z}from"./
|
|
1
|
+
import{Q as e,i as t,h as r,e as a,f as s,g as n,u as o,k as l,A as i,l as c,m as h,n as f,D as d,o as u,p,C as m,q as g,j as v,c as x,s as y,t as w,v as b,w as j,R as T,x as q,y as E,S,z as P,P as N,E as z}from"./CwuxJzTJ.js";var C=class extends e{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:t()})}getOptimisticResult(e){return e.behavior=t(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var s,n;const{state:o}=e,l=super.createResult(e,t),{isFetching:i,isRefetching:c,isError:h,isRefetchError:f}=l,d=null==(n=null==(s=o.fetchMeta)?void 0:s.fetchMore)?void 0:n.direction,u=h&&"forward"===d,p=i&&"forward"===d,m=h&&"backward"===d,g=i&&"backward"===d;return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:a(t,o.data),hasPreviousPage:r(t,o.data),isFetchNextPageError:u,isFetchingNextPage:p,isFetchPreviousPageError:m,isFetchingPreviousPage:g,isRefetchError:f&&!u&&!m,isRefetching:c&&!p&&!g}}};const _=()=>{const e=n.useRef(),{props:{organizationId:t},sessionId:r,getAccessToken:a,user:s}=o(),d=async(r,a)=>{if(r&&a&&(e.current||(e.current=await h()),e.current))try{await l.post(i.UPDATE_AD_ANALYTICS,{json:{adId:r,type:a,browserFingerprint:e.current},headers:{"x-org-id":t}})}catch(e){console.error(e)}},u=async e=>{if(r)try{await l.post(i.UPDATE_SESSION,{headers:{"x-org-id":t},json:{sessionId:r,pageViews:e}})}catch(e){console.error(e)}};return{incrementEventView:async r=>{if(r&&(e.current||(e.current=await h()),e.current))try{await l.post(i.INCREMENT_EVENT_VIEW,{json:{eventSlug:r,accessToken:s?await a():null,browserFingerprint:e.current},headers:{"x-org-id":t}})}catch(e){console.error(e)}},captureAdImpression:e=>d(e,f.AD_IMPRESSION),captureAdEngagement:e=>d(e,f.AD_ENGAGEMENT),captureAdClick:(e,t,r)=>{switch(d(e,f.AD_CLICK),t){case c.LINK:window.open(r,"_blank");break;case c.EMAIL:window.location.href=`mailto:${r}`;break;case c.PHONE:window.location.href=`tel:${r}`;break;case c.SMS:window.location.href=`sms:${r}`;break;case c.WHATSAPP:window.location.href=`https://wa.me/${r}`;break;case c.MESSENGER:window.location.href=`https://m.me/${r}`;break;default:window.open(r,"_blank")}},trackPageView:e=>{if(currentPageRef.current&&pageEntryTimeRef.current){const e={page:currentPageRef.current,entryTime:pageEntryTimeRef.current,exitTime:Date.now()};u([e])}currentPageRef.current=e,pageEntryTimeRef.current=Date.now()},exportPageViewsData:u}},L=e=>{var t;return(null==(t=null==e?void 0:e.meta)?void 0:t.currentPage)>1&&e.meta.currentPage-1},M=e=>{var t,r;return(null==(t=null==e?void 0:e.meta)?void 0:t.currentPage)<(null==(r=null==e?void 0:e.meta)?void 0:r.totalPages)?e.meta.currentPage+1:void 0},D=({event:e,ads:t=[],sort:r=d,order:a=u,limit:c=20})=>{const{props:{organizationId:h},getAccessToken:f,loadingUser:v}=o(),{isLoading:x,data:y,hasNextPage:w,fetchNextPage:b,isFetchingNextPage:j}=function(e,t){return s(e,C,t)}({queryKey:[`content-list-by-event-${null==e?void 0:e._id}`,r,a],queryFn:async({pageParam:t=1})=>{try{return await l.get(i.GET_CONTENTS,{searchParams:{eventId:null==e?void 0:e._id,accessToken:await f(),page:t,sort:`${p[a].sortOrder}${m[r].sortField}`,limit:c},headers:{"x-org-id":h}}).json()}catch(e){throw new Error((null==e?void 0:e.message)||"Failed to fetch public events")}},enabled:!v&&!!e,initialPageParam:1,getPreviousPageParam:L,getNextPageParam:M}),T=n.useMemo((()=>{var e;return null==(e=null==y?void 0:y.pages)?void 0:e.flatMap((e=>null==e?void 0:e.data))}),[y]),q=n.useMemo((()=>((e,t,r)=>{if(r<=0)return e;let a=0;const s=[];for(let n=0;n<(null==e?void 0:e.length);n++)s.push(e[n]),t.length>0&&r>0&&(n+1)%r==0&&(s.push({...t[a],type:g.AD,adType:t[a].type}),a=(a+1)%t.length);return s})(T,t,null==e?void 0:e.adPosition)),[T]);return{contents:T,contentsWithAds:q,loading:x,hasNextPage:w,fetchNextPage:b,isFetchingNextPage:j}},R=y("qc-border-brand -qc-ml-px qc-inline-flex qc-h-fit qc-flex-auto qc-items-center qc-justify-center qc-border qc-transition-colors qc-duration-500 focus:qc-outline-none",{variants:{size:{sm:"qc-gap-1.5 qc-p-1.5 qc-text-xs",md:"qc-gap-3 qc-px-3 qc-py-2 qc-text-sm",lg:"qc-gap-3 qc-px-4 qc-py-3 qc-text-base"}},defaultVariants:{size:"md"}}),A=({size:e,buttons:t=[],onChange:r,selected:a,className:s})=>{const{props:{textClassName:n}}=o();return v.jsx("div",{className:x("qc-shadow-outer qc-z-0 qc-flex qc-h-fit qc-rounded",s),children:t.map(((s,o)=>{const l=0===o,i=o===t.length-1,c=s.value===a;return v.jsxs("button",{type:"button",onClick:()=>r&&r(s.value),className:x(R({size:e}),c?s.activeClassName?s.activeClassName:"qc-bg-brand qc-text-a11y":"qc-bg-primary qc-text-primary",l&&"qc-rounded-l",i&&"qc-rounded-r",n),children:[!s.icon&&v.jsx("span",{className:"qc-font-medium",children:s.text}),s.icon&&v.jsx("div",{className:"qc-size-5",children:s.icon})]},s.value)}))})},k=({engagementStyle:e,sort:t=d,order:r=u,onSortChange:a,onSortOrderChange:s})=>{const o=n.useMemo((()=>{const t=Object.keys(m).map((e=>({text:m[e].label,value:e,activeClassName:"qc-bg-brand qc-text-a11y"})));return e===w.CONTEST?t:t.filter((e=>e.value!==b.POPULAR))}),[e]);return v.jsxs("div",{className:"qc-relative qc-flex qc-w-auto qc-items-center qc-gap-2",children:[v.jsx("button",{type:"button",className:"qc-bg-primary qc-rounded qc-p-1",onClick:()=>s&&s(r===j.ASC?j.DESC:j.ASC),children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:x("qc-text-primary qc-size-7 -qc-scale-x-100 qc-transition-transform",r===j.ASC&&"-qc-scale-y-100"),viewBox:"0 0 24 24",children:v.jsx("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h4q.425 0 .713.288T9 17t-.288.713T8 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h10q.425 0 .713.288T15 12t-.288.713T14 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}),v.jsx(A,{className:"qc-flex-1 lg:qc-flex-none",selected:t,buttons:o,onChange:a})]})};
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -12,4 +12,4 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
12
12
|
|
|
13
13
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
14
14
|
and limitations under the License.
|
|
15
|
-
***************************************************************************** */var O=function(e,t){return(O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var Y=function(){return Y=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},Y.apply(this,arguments)};var F="Pixel",I="Percent",B={unit:I,value:.8};function H(e){return"number"==typeof e?{unit:I,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:F,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:I,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),B):(console.warn("scrollThreshold should be string or number"),B)}var $=function(e){function t(t){var r=e.call(this,t)||this;return r.lastScrollTop=0,r.actionTriggered=!1,r.startY=0,r.currentY=0,r.dragging=!1,r.maxPullDownDistance=0,r.getScrollableTarget=function(){return r.props.scrollableTarget instanceof HTMLElement?r.props.scrollableTarget:"string"==typeof r.props.scrollableTarget?document.getElementById(r.props.scrollableTarget):(null===r.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},r.onStart=function(e){r.lastScrollTop||(r.dragging=!0,e instanceof MouseEvent?r.startY=e.pageY:e instanceof TouchEvent&&(r.startY=e.touches[0].pageY),r.currentY=r.startY,r._infScroll&&(r._infScroll.style.willChange="transform",r._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},r.onMove=function(e){r.dragging&&(e instanceof MouseEvent?r.currentY=e.pageY:e instanceof TouchEvent&&(r.currentY=e.touches[0].pageY),!(r.currentY<r.startY)&&(r.currentY-r.startY>=Number(r.props.pullDownToRefreshThreshold)&&r.setState({pullToRefreshThresholdBreached:!0}),!(r.currentY-r.startY>1.5*r.maxPullDownDistance)&&r._infScroll&&(r._infScroll.style.overflow="visible",r._infScroll.style.transform="translate3d(0px, "+(r.currentY-r.startY)+"px, 0px)")))},r.onEnd=function(){r.startY=0,r.currentY=0,r.dragging=!1,r.state.pullToRefreshThresholdBreached&&(r.props.refreshFunction&&r.props.refreshFunction(),r.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame((function(){r._infScroll&&(r._infScroll.style.overflow="auto",r._infScroll.style.transform="none",r._infScroll.style.willChange="unset")}))},r.onScrollListener=function(e){"function"==typeof r.props.onScroll&&setTimeout((function(){return r.props.onScroll&&r.props.onScroll(e)}),0);var t=r.props.height||r._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;r.actionTriggered||((r.props.inverse?r.isElementAtTop(t,r.props.scrollThreshold):r.isElementAtBottom(t,r.props.scrollThreshold))&&r.props.hasMore&&(r.actionTriggered=!0,r.setState({showLoader:!0}),r.props.next&&r.props.next()),r.lastScrollTop=t.scrollTop)},r.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},r.throttledOnScrollListener=function(e,t,r,a){var s,n=!1,o=0;function l(){s&&clearTimeout(s)}function i(){var i=this,c=Date.now()-o,h=arguments;function f(){o=Date.now(),r.apply(i,h)}n||(a&&!s&&f(),l(),void 0===a&&c>e?f():!0!==t&&(s=setTimeout(a?function(){s=void 0}:f,void 0===a?e-c:e)))}return"boolean"!=typeof t&&(a=r,r=t,t=void 0),i.cancel=function(){l(),n=!0},i}(150,r.onScrollListener).bind(r),r.onStart=r.onStart.bind(r),r.onMove=r.onMove.bind(r),r.onEnd=r.onEnd.bind(r),r}return function(e,t){function r(){this.constructor=e}O(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?Y(Y({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var r=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,a=H(t);return a.unit===F?e.scrollTop<=a.value+r-e.scrollHeight+1:e.scrollTop<=a.value/100+r-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var r=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,a=H(t);return a.unit===F?e.scrollTop+r>=e.scrollHeight-a.value:e.scrollTop+r>=a.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=Y({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),r=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),a=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return T.createElement("div",{style:a,className:"infinite-scroll-component__outerdiv"},T.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&T.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},T.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!r&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(n.Component);const U=n.lazy((()=>import("./BGXPmeqN.js").then((e=>e.M)))),V=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const{eventSlug:e}=q(),{loadingUser:t}=o(),[r,a]=n.useState(d),[s,l]=n.useState(u),{event:i,ads:c}=E({eventSlug:e}),{loading:h,contentsWithAds:f,hasNextPage:p,fetchNextPage:m}=D({event:i,ads:c,sort:r,order:s}),{incrementEventView:g}=_();return n.useEffect((()=>{i&&g(null==i?void 0:i.slug)}),[i]),v.jsxs("div",{className:"qc-mx-auto qc-mt-6 qc-min-h-[80vh] qc-space-y-6",children:[v.jsx("div",{className:"qc-flex qc-justify-end",children:v.jsx(k,{sort:r,order:s,onSortChange:a,onSortOrderChange:l,engagementStyle:null==i?void 0:i.engagementStyle})}),t||h?v.jsx("div",{className:"qc-grid qc-grid-cols-1 qc-gap-4 sm:qc-grid-cols-3",children:Array.from({length:8}).map(((e,t)=>v.jsx(S,{className:"qc-h-72"},t)))}):(null==f?void 0:f.length)<=0?v.jsx("div",{children:v.jsx(P,{title:"No contents",description:"Be the first to upload in the event",iconSvg:v.jsxs("svg",{"data-name":"Layer 1",className:"qc-size-full",viewBox:"0 0 858.76 581.93",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.6 738.67a198.59 198.59 0 0 1 16.436-62.675q3.7094-8.2865 8.1655-16.208a1.2103 1.2103 0 0 0-2.0886-1.2208 201.33 201.33 0 0 0-22.403 61.805q-1.682 9.0855-2.5283 18.299c-0.14337 1.5493 2.2763 1.5396 2.4188 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"842.44",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m984.17 739.08a128.83 128.83 0 0 1 10.662-40.66q2.4064-5.3758 5.2973-10.515a0.78518 0.78518 0 0 0-1.355-0.792 130.61 130.61 0 0 0-14.534 40.096q-1.0912 5.8942-1.6402 11.872c-0.093 1.0051 1.4768 0.99878 1.5692 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"833.31",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.19 738.14a128.83 128.83 0 0 1-16.601-38.618q-1.409-5.7188-2.2905-11.549a0.78518 0.78518 0 0 0-1.5555 0.2089 130.61 130.61 0 0 0 13.202 40.554q2.7649 5.3186 6.0085 10.369c0.54487 0.84972 1.7787-0.12078 1.2373-0.96515z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"791.11",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.05 738.67a198.59 198.59 0 0 0-16.436-62.675q-3.7094-8.2865-8.1655-16.208a1.2103 1.2103 0 0 1 2.0886-1.2208 201.33 201.33 0 0 1 22.403 61.805q1.682 9.0855 2.5283 18.299c0.14338 1.5493-2.2763 1.5396-2.4188 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"139.97",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m339.48 739.08a128.83 128.83 0 0 0-10.662-40.66q-2.4064-5.3758-5.2973-10.515a0.78518 0.78518 0 0 1 1.355-0.792 130.61 130.61 0 0 1 14.534 40.096q1.0912 5.8942 1.6402 11.872c0.093 1.0051-1.4768 0.99878-1.5692 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"149.1",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.46 738.14a128.83 128.83 0 0 0 16.601-38.618q1.409-5.7188 2.2905-11.549a0.78518 0.78518 0 0 1 1.5555 0.2089 130.61 130.61 0 0 1-13.202 40.554q-2.7649 5.3186-6.0084 10.369c-0.54487 0.84972-1.7787-0.12078-1.2373-0.96515z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"191.3",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m925.02 538.41 0.2391 180.11a12.626 12.626 0 0 1-12.593 12.63l-74.817 0.10967c21.062-39.4 32.987-101.41 32.917-149.22a281.27 281.27 0 0 0-5.721-56.161l47.345-0.0694a12.626 12.626 0 0 1 12.63 12.593z",fill:"currentColor"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m1028.2 740.97h-738.29a1.1907 1.1907 0 0 1 0-2.3814h738.29a1.1907 1.1907 0 0 1 0 2.3814z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m815.39 513.79-133.34-0.52295 12.966-43.137a16.599 16.599 0 0 1 15.804-11.75h0.06274l76.106 0.29883a16.597 16.597 0 0 1 15.774 11.875z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m889.83 499.03a14 14 0 0 0-14 14h28a14 14 0 0 0-14-14z",fill:"currentColor"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m932.83 740.03h-368a17.019 17.019 0 0 1-17-17v-194a17.019 17.019 0 0 1 17-17h368a17.019 17.019 0 0 1 17 17v194a17.019 17.019 0 0 1-17 17zm-368-226a15.017 15.017 0 0 0-15 15v194a15.017 15.017 0 0 0 15 15h368a15.017 15.017 0 0 0 15-15v-194a15.017 15.017 0 0 0-15-15z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m764.83 497.53h-32a8.5 8.5 0 0 1 0-17h32a8.5 8.5 0 0 1 0 17z",fill:"#fff"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 702.03a76 76 0 1 1 76-76 76.086 76.086 0 0 1-76 76zm0-150a74 74 0 1 0 74 74 74.084 74.084 0 0 0-74-74z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 676.03a50 50 0 1 1 50-50 50.056 50.056 0 0 1-50 50zm0-98a48 48 0 1 0 48 48 48.054 48.054 0 0 0-48-48z",fill:"#3f3d56"}),v.jsx("circle",{cx:"578.2",cy:"467",r:"38",fill:"#ccc"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m725.83 626.03a25.001 25.001 0 0 1 21.5-24.751 25 25 0 1 0 0 49.502 25.001 25.001 0 0 1-21.5-24.751z",fill:"#fff"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m914.83 514.03h-50v-1a25 25 0 0 1 50 0zm-47.979-2h45.957a23 23 0 0 0-45.957 0z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m572.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("circle",{cx:"402.2",cy:"373",r:"5",fill:"currentColor"}),v.jsx("circle",{cx:"428.2",cy:"373",r:"5",fill:"#ccc"}),v.jsx("circle",{cx:"454.2",cy:"373",r:"5",fill:"#ccc"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m598.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m624.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("rect",{x:"378.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"378.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"648.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"651.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m443.45 401.51c-8.1095-3.7255-13.44-14.377-13.137-24.881s5.8315-20.329 13.456-25.338a26.649 26.649 0 0 1 25.219-1.9056c8.1825 3.483 19.169 4.4318 24.087 13.089 3.7796 6.6528 2.4181 21.495-0.25792 28.892-2.3129 6.394-7.9684 9.9966-13.483 12.013a45.34 45.34 0 0 1-37.511-3.0216",fill:"#2f2e41"}),v.jsx("polygon",{points:"223.38 568.71 211.72 564.91 220.8 518.14 238.01 523.74",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(72.575 -240.02) rotate(18.021)",d:"m372.58 718.9h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),v.jsx("polygon",{points:"327.75 568.96 315.49 568.96 309.66 521.67 327.75 521.67",fill:"#ffb8b8"}),v.jsx("path",{d:"m306.73 565.46h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m497.75 708.65c-0.07373 0-0.14746-2e-3 -0.22168-0.00585l-13.586-0.64747a4.5061 4.5061 0 0 1-4.2854-4.4326l-1.8411-134.39a1.5 1.5 0 0 0-2.8267-0.67871l-71.958 136.44a4.4762 4.4762 0 0 1-4.822 2.3213l-13.521-2.5752a4.4992 4.4992 0 0 1-3.4014-5.918l52.43-148.55 4.0344-43.943a4.4698 4.4698 0 0 1 3.936-4.0498c15.277-1.877 36.624-14.395 45.092-19.689a4.446 4.446 0 0 1 3.5305-0.53125 4.5558 4.5558 0 0 1 2.8308 2.2451 202.75 202.75 0 0 1 22.277 123.98l-13.217 96.54a4.4752 4.4752 0 0 1-4.4507 3.8907z",fill:"#2f2e41"}),v.jsx("circle",{cx:"290.56",cy:"228.24",r:"24.561",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m436.71 516.82-7.3955-52.845a31.045 31.045 0 0 1 60.574-13.635c2.106 9.7686 6.385 21.66 4.8218 34.479-10.953 30.399-30.835 39.772-58 32z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m469.21 434.82h-18a4.5051 4.5051 0 0 1-4.5-4.5v-6a4.5051 4.5051 0 0 1 4.5-4.5h18a4.5051 4.5051 0 0 1 4.5 4.5v6a4.5051 4.5051 0 0 1-4.5 4.5z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m560.44 534.7a10.743 10.743 0 0 0-8.7149-13.979l-56.029-80.214-16.614 16.425 60.299 73.683a10.801 10.801 0 0 0 21.059 4.0847z",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m513.22 465.05-20.234 13.507a4.8169 4.8169 0 0 1-7.0291-1.9475l-10.365-21.928a13.377 13.377 0 0 1 22.295-14.789l16.229 17.919a4.8169 4.8169 0 0 1-0.8968 7.2386z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m362.5 426.92a10.526 10.526 0 0 1 0.2393 1.6401l42.957 24.782 10.441-6.0109 11.131 14.572-17.45 12.438a8 8 0 0 1-9.5982-0.23384l-44.297-34.946a10.497 10.497 0 1 1 6.5757-12.241z",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m418.18 471.35-10.794-21.802a4.8169 4.8169 0 0 1 2.835-6.7204l23.078-7.4597a13.377 13.377 0 0 1 11.8 24.012l-19.857 13.79a4.8169 4.8169 0 0 1-7.0632-1.82z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m477.67 356.34a4.0633 4.0633 0 0 0 4.3168-2.4094 5.8506 5.8506 0 0 0-0.41558-5.1377 10.736 10.736 0 0 0-3.7759-3.7034 12.406 12.406 0 0 0-5.9816-2.0579 7.4612 7.4612 0 0 0-5.7939 2.1993 5.3768 5.3768 0 0 0-0.97171 5.9276c0.89811 1.7319 2.7825 2.7031 4.6186 3.3625a27.094 27.094 0 0 0 11.378 1.4944",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m485.52 398.45c-4.2928 0.20179-3.5536-8.9072-4.8971-12.989s-3.1955-8.9513-7.4212-9.734c-3.463-0.6414-6.5925 1.8908-9.609 3.7086-5.3764 3.24-12.336 4.4352-17.981 1.6906s-9.0786-10.078-6.3329-15.723a12.876 12.876 0 0 1 8.049-6.3415 25.906 25.906 0 0 1 10.462-0.50253 53.527 53.527 0 0 1 21.886 7.7574c4.5819 2.8736 8.9417 6.7864 10.306 12.02s1.9198 19.465-3.413 20.366z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m474.29 343.67c-3.2427-4.1108-2.0213-10.588 1.7582-14.211s9.3995-4.7529 14.615-4.292a29.621 29.621 0 0 1 24.025 17.275c3.2959 7.5393 3.2687 16.163 6.2494 23.832a32.137 32.137 0 0 0 43.41 17.543c5.1881-2.3921 10.128-7.0763 9.8321-12.782 3.2802 12.646-2.6276 27.112-13.823 33.847-6.5573 3.9448-14.323 5.284-21.92 6.2056-4.9507 0.60059-10.039 1.0474-14.87-0.18987-6.7592-1.731-12.418-6.7198-15.845-12.798s-4.7748-13.161-4.827-20.138c-0.04071-5.4353 0.67085-10.873 0.29483-16.296s-2.0061-11.031-5.9367-14.785-10.564-4.9899-14.878-1.6831c-1.7337 1.329-3.0043 3.2697-4.9563 4.2502s-5.036 0.21793-5.1666-1.9626z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m380.18 427.1h-202.58a6.9935 6.9935 0 0 1-6.9854-6.9854v-114.1a6.9936 6.9936 0 0 1 6.9854-6.9854h202.58a6.9933 6.9933 0 0 1 6.9854 6.9854v114.1a6.9933 6.9933 0 0 1-6.9854 6.9854zm-202.58-126.51a5.4392 5.4392 0 0 0-5.4331 5.4331v114.1a5.4392 5.4392 0 0 0 5.4331 5.4331h202.58a5.4395 5.4395 0 0 0 5.4331-5.4331v-114.1a5.4394 5.4394 0 0 0-5.4331-5.4331z",fill:"#3f3d56"}),v.jsx("circle",{cx:"73.768",cy:"191.12",r:"28.967",fill:"#e6e6e6"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m356.01 401.31-34.003-58.895a2.4215 2.4215 0 0 0-4.1941 0l-20.751 35.942-30.936-53.582a3.1047 3.1047 0 0 0-5.3774 0l-43.596 75.511a3.1046 3.1046 0 0 0 2.6887 4.657h134.07a2.4215 2.4215 0 0 0 2.0971-3.6322z",fill:"currentColor"}),v.jsx("rect",{x:"14.747",y:"153.97",width:"12.419",height:"12.419",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m459.04 259.1h-158.29a5.4645 5.4645 0 0 1-5.4581-5.4582v-89.15a5.4645 5.4645 0 0 1 5.4581-5.4582h158.29a5.4643 5.4643 0 0 1 5.4582 5.4582v89.15a5.4643 5.4643 0 0 1-5.4582 5.4582zm-158.29-98.853a4.25 4.25 0 0 0-4.2452 4.2452v89.15a4.25 4.25 0 0 0 4.2452 4.2452h158.29a4.2502 4.2502 0 0 0 4.2452-4.2452v-89.15a4.2502 4.2502 0 0 0-4.2452-4.2452z",fill:"#ccc"}),v.jsx("circle",{cx:"182.31",cy:"39.947",r:"22.634",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m440.15 238.95-26.569-46.018a1.892 1.892 0 0 0-3.2771 0l-16.214 28.084-24.172-41.867a2.4259 2.4259 0 0 0-4.2017 0l-34.064 59.001a2.4258 2.4258 0 0 0 2.1008 3.6388h104.76a1.8921 1.8921 0 0 0 1.6386-2.8381z",fill:"#e6e6e6"}),v.jsx("rect",{x:"136.2",y:"10.916",width:"9.7034",height:"9.7034",fill:"#ccc"})]})})}):v.jsx($,{dataLength:(null==f?void 0:f.length)||0,next:m,hasMore:p||!1,loader:v.jsx("div",{className:"qc-mx-auto qc-my-3 qc-w-fit",children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-size-12",viewBox:"0 0 24 24",children:[v.jsx("circle",{cx:18,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:.67,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),v.jsx("circle",{cx:12,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:.33,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),v.jsx("circle",{cx:6,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:0,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})})]})}),children:v.jsx("div",{className:x(""),children:v.jsx(U,{event:i,contents:f,curateLink:(null==i?void 0:i.engagementStyle)===w.CONTEST&&i.status===z.OPEN?N.CURATE(null==i?void 0:i.slug):null})})})]})}},Symbol.toStringTag,{value:"Module"}));export{V as C,_ as u};
|
|
15
|
+
***************************************************************************** */var O=function(e,t){return(O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var Y=function(){return Y=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},Y.apply(this,arguments)};var F="Pixel",I="Percent",B={unit:I,value:.8};function H(e){return"number"==typeof e?{unit:I,value:100*e}:"string"==typeof e?e.match(/^(\d*(\.\d+)?)px$/)?{unit:F,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:I,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),B):(console.warn("scrollThreshold should be string or number"),B)}var $=function(e){function t(t){var r=e.call(this,t)||this;return r.lastScrollTop=0,r.actionTriggered=!1,r.startY=0,r.currentY=0,r.dragging=!1,r.maxPullDownDistance=0,r.getScrollableTarget=function(){return r.props.scrollableTarget instanceof HTMLElement?r.props.scrollableTarget:"string"==typeof r.props.scrollableTarget?document.getElementById(r.props.scrollableTarget):(null===r.props.scrollableTarget&&console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n "),null)},r.onStart=function(e){r.lastScrollTop||(r.dragging=!0,e instanceof MouseEvent?r.startY=e.pageY:e instanceof TouchEvent&&(r.startY=e.touches[0].pageY),r.currentY=r.startY,r._infScroll&&(r._infScroll.style.willChange="transform",r._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},r.onMove=function(e){r.dragging&&(e instanceof MouseEvent?r.currentY=e.pageY:e instanceof TouchEvent&&(r.currentY=e.touches[0].pageY),!(r.currentY<r.startY)&&(r.currentY-r.startY>=Number(r.props.pullDownToRefreshThreshold)&&r.setState({pullToRefreshThresholdBreached:!0}),!(r.currentY-r.startY>1.5*r.maxPullDownDistance)&&r._infScroll&&(r._infScroll.style.overflow="visible",r._infScroll.style.transform="translate3d(0px, "+(r.currentY-r.startY)+"px, 0px)")))},r.onEnd=function(){r.startY=0,r.currentY=0,r.dragging=!1,r.state.pullToRefreshThresholdBreached&&(r.props.refreshFunction&&r.props.refreshFunction(),r.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame((function(){r._infScroll&&(r._infScroll.style.overflow="auto",r._infScroll.style.transform="none",r._infScroll.style.willChange="unset")}))},r.onScrollListener=function(e){"function"==typeof r.props.onScroll&&setTimeout((function(){return r.props.onScroll&&r.props.onScroll(e)}),0);var t=r.props.height||r._scrollableNode?e.target:document.documentElement.scrollTop?document.documentElement:document.body;r.actionTriggered||((r.props.inverse?r.isElementAtTop(t,r.props.scrollThreshold):r.isElementAtBottom(t,r.props.scrollThreshold))&&r.props.hasMore&&(r.actionTriggered=!0,r.setState({showLoader:!0}),r.props.next&&r.props.next()),r.lastScrollTop=t.scrollTop)},r.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:t.dataLength},r.throttledOnScrollListener=function(e,t,r,a){var s,n=!1,o=0;function l(){s&&clearTimeout(s)}function i(){var i=this,c=Date.now()-o,h=arguments;function f(){o=Date.now(),r.apply(i,h)}n||(a&&!s&&f(),l(),void 0===a&&c>e?f():!0!==t&&(s=setTimeout(a?function(){s=void 0}:f,void 0===a?e-c:e)))}return"boolean"!=typeof t&&(a=r,r=t,t=void 0),i.cancel=function(){l(),n=!0},i}(150,r.onScrollListener).bind(r),r.onStart=r.onStart.bind(r),r.onMove=r.onMove.bind(r),r.onEnd=r.onEnd.bind(r),r}return function(e,t){function r(){this.constructor=e}O(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),"number"==typeof this.props.initialScrollY&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),"function"!=typeof this.props.refreshFunction))throw new Error('Mandatory prop "refreshFunction" missing.\n Pull Down To Refresh functionality will not work\n as expected. Check README.md for usage\'')},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(e){this.props.dataLength!==e.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(e,t){return e.dataLength!==t.prevDataLength?Y(Y({},t),{prevDataLength:e.dataLength}):null},t.prototype.isElementAtTop=function(e,t){void 0===t&&(t=.8);var r=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,a=H(t);return a.unit===F?e.scrollTop<=a.value+r-e.scrollHeight+1:e.scrollTop<=a.value/100+r-e.scrollHeight+1},t.prototype.isElementAtBottom=function(e,t){void 0===t&&(t=.8);var r=e===document.body||e===document.documentElement?window.screen.availHeight:e.clientHeight,a=H(t);return a.unit===F?e.scrollTop+r>=e.scrollHeight-a.value:e.scrollTop+r>=a.value/100*e.scrollHeight},t.prototype.render=function(){var e=this,t=Y({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),r=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),a=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return T.createElement("div",{style:a,className:"infinite-scroll-component__outerdiv"},T.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(t){return e._infScroll=t},style:t},this.props.pullDownToRefresh&&T.createElement("div",{style:{position:"relative"},ref:function(t){return e._pullDown=t}},T.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!r&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(n.Component);const U=n.lazy((()=>import("./wd4jVrYo.js").then((e=>e.M)))),V=Object.freeze(Object.defineProperty({__proto__:null,default:()=>{const{eventSlug:e}=q(),{loadingUser:t}=o(),[r,a]=n.useState(d),[s,l]=n.useState(u),{event:i,ads:c}=E({eventSlug:e}),{loading:h,contentsWithAds:f,hasNextPage:p,fetchNextPage:m}=D({event:i,ads:c,sort:r,order:s}),{incrementEventView:g}=_();return n.useEffect((()=>{i&&g(null==i?void 0:i.slug)}),[i]),v.jsxs("div",{className:"qc-mx-auto qc-mt-6 qc-min-h-[80vh] qc-space-y-6",children:[v.jsx("div",{className:"qc-flex qc-justify-end",children:v.jsx(k,{sort:r,order:s,onSortChange:a,onSortOrderChange:l,engagementStyle:null==i?void 0:i.engagementStyle})}),t||h?v.jsx("div",{className:"qc-grid qc-grid-cols-1 qc-gap-4 sm:qc-grid-cols-3",children:Array.from({length:8}).map(((e,t)=>v.jsx(S,{className:"qc-h-72"},t)))}):(null==f?void 0:f.length)<=0?v.jsx("div",{children:v.jsx(P,{title:"No contents",description:"Be the first to upload in the event",iconSvg:v.jsxs("svg",{"data-name":"Layer 1",className:"qc-size-full",viewBox:"0 0 858.76 581.93",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.6 738.67a198.59 198.59 0 0 1 16.436-62.675q3.7094-8.2865 8.1655-16.208a1.2103 1.2103 0 0 0-2.0886-1.2208 201.33 201.33 0 0 0-22.403 61.805q-1.682 9.0855-2.5283 18.299c-0.14337 1.5493 2.2763 1.5396 2.4188 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"842.44",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m984.17 739.08a128.83 128.83 0 0 1 10.662-40.66q2.4064-5.3758 5.2973-10.515a0.78518 0.78518 0 0 0-1.355-0.792 130.61 130.61 0 0 0-14.534 40.096q-1.0912 5.8942-1.6402 11.872c-0.093 1.0051 1.4768 0.99878 1.5692 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"833.31",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m982.19 738.14a128.83 128.83 0 0 1-16.601-38.618q-1.409-5.7188-2.2905-11.549a0.78518 0.78518 0 0 0-1.5555 0.2089 130.61 130.61 0 0 0 13.202 40.554q2.7649 5.3186 6.0085 10.369c0.54487 0.84972 1.7787-0.12078 1.2373-0.96515z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"791.11",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.05 738.67a198.59 198.59 0 0 0-16.436-62.675q-3.7094-8.2865-8.1655-16.208a1.2103 1.2103 0 0 1 2.0886-1.2208 201.33 201.33 0 0 1 22.403 61.805q1.682 9.0855 2.5283 18.299c0.14338 1.5493-2.2763 1.5396-2.4188 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"139.97",cy:"489.32",r:"15.319",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m339.48 739.08a128.83 128.83 0 0 0-10.662-40.66q-2.4064-5.3758-5.2973-10.515a0.78518 0.78518 0 0 1 1.355-0.792 130.61 130.61 0 0 1 14.534 40.096q1.0912 5.8942 1.6402 11.872c0.093 1.0051-1.4768 0.99878-1.5692 0z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"149.1",cy:"521.45",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m341.46 738.14a128.83 128.83 0 0 0 16.601-38.618q1.409-5.7188 2.2905-11.549a0.78518 0.78518 0 0 1 1.5555 0.2089 130.61 130.61 0 0 1-13.202 40.554q-2.7649 5.3186-6.0084 10.369c-0.54487 0.84972-1.7787-0.12078-1.2373-0.96515z",fill:"#f2f2f2"}),v.jsx("circle",{cx:"191.3",cy:"520.75",r:"9.9382",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m925.02 538.41 0.2391 180.11a12.626 12.626 0 0 1-12.593 12.63l-74.817 0.10967c21.062-39.4 32.987-101.41 32.917-149.22a281.27 281.27 0 0 0-5.721-56.161l47.345-0.0694a12.626 12.626 0 0 1 12.63 12.593z",fill:"currentColor"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m1028.2 740.97h-738.29a1.1907 1.1907 0 0 1 0-2.3814h738.29a1.1907 1.1907 0 0 1 0 2.3814z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m815.39 513.79-133.34-0.52295 12.966-43.137a16.599 16.599 0 0 1 15.804-11.75h0.06274l76.106 0.29883a16.597 16.597 0 0 1 15.774 11.875z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m889.83 499.03a14 14 0 0 0-14 14h28a14 14 0 0 0-14-14z",fill:"currentColor"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m932.83 740.03h-368a17.019 17.019 0 0 1-17-17v-194a17.019 17.019 0 0 1 17-17h368a17.019 17.019 0 0 1 17 17v194a17.019 17.019 0 0 1-17 17zm-368-226a15.017 15.017 0 0 0-15 15v194a15.017 15.017 0 0 0 15 15h368a15.017 15.017 0 0 0 15-15v-194a15.017 15.017 0 0 0-15-15z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m764.83 497.53h-32a8.5 8.5 0 0 1 0-17h32a8.5 8.5 0 0 1 0 17z",fill:"#fff"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 702.03a76 76 0 1 1 76-76 76.086 76.086 0 0 1-76 76zm0-150a74 74 0 1 0 74 74 74.084 74.084 0 0 0-74-74z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m748.83 676.03a50 50 0 1 1 50-50 50.056 50.056 0 0 1-50 50zm0-98a48 48 0 1 0 48 48 48.054 48.054 0 0 0-48-48z",fill:"#3f3d56"}),v.jsx("circle",{cx:"578.2",cy:"467",r:"38",fill:"#ccc"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m725.83 626.03a25.001 25.001 0 0 1 21.5-24.751 25 25 0 1 0 0 49.502 25.001 25.001 0 0 1-21.5-24.751z",fill:"#fff"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m914.83 514.03h-50v-1a25 25 0 0 1 50 0zm-47.979-2h45.957a23 23 0 0 0-45.957 0z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m572.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("circle",{cx:"402.2",cy:"373",r:"5",fill:"currentColor"}),v.jsx("circle",{cx:"428.2",cy:"373",r:"5",fill:"#ccc"}),v.jsx("circle",{cx:"454.2",cy:"373",r:"5",fill:"#ccc"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m598.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m624.83 542.03a10 10 0 1 1 10-10 10.011 10.011 0 0 1-10 10zm0-18a8 8 0 1 0 8 8 8.0092 8.0092 0 0 0-8-8z",fill:"#3f3d56"}),v.jsx("rect",{x:"378.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"378.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"648.2",y:"439.87",width:"130",height:"2",fill:"#3f3d56"}),v.jsx("rect",{x:"651.2",y:"480.13",width:"126.77",height:"2",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m443.45 401.51c-8.1095-3.7255-13.44-14.377-13.137-24.881s5.8315-20.329 13.456-25.338a26.649 26.649 0 0 1 25.219-1.9056c8.1825 3.483 19.169 4.4318 24.087 13.089 3.7796 6.6528 2.4181 21.495-0.25792 28.892-2.3129 6.394-7.9684 9.9966-13.483 12.013a45.34 45.34 0 0 1-37.511-3.0216",fill:"#2f2e41"}),v.jsx("polygon",{points:"223.38 568.71 211.72 564.91 220.8 518.14 238.01 523.74",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(72.575 -240.02) rotate(18.021)",d:"m372.58 718.9h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),v.jsx("polygon",{points:"327.75 568.96 315.49 568.96 309.66 521.67 327.75 521.67",fill:"#ffb8b8"}),v.jsx("path",{d:"m306.73 565.46h23.644v14.887h-38.531a14.887 14.887 0 0 1 14.887-14.887z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m497.75 708.65c-0.07373 0-0.14746-2e-3 -0.22168-0.00585l-13.586-0.64747a4.5061 4.5061 0 0 1-4.2854-4.4326l-1.8411-134.39a1.5 1.5 0 0 0-2.8267-0.67871l-71.958 136.44a4.4762 4.4762 0 0 1-4.822 2.3213l-13.521-2.5752a4.4992 4.4992 0 0 1-3.4014-5.918l52.43-148.55 4.0344-43.943a4.4698 4.4698 0 0 1 3.936-4.0498c15.277-1.877 36.624-14.395 45.092-19.689a4.446 4.446 0 0 1 3.5305-0.53125 4.5558 4.5558 0 0 1 2.8308 2.2451 202.75 202.75 0 0 1 22.277 123.98l-13.217 96.54a4.4752 4.4752 0 0 1-4.4507 3.8907z",fill:"#2f2e41"}),v.jsx("circle",{cx:"290.56",cy:"228.24",r:"24.561",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m436.71 516.82-7.3955-52.845a31.045 31.045 0 0 1 60.574-13.635c2.106 9.7686 6.385 21.66 4.8218 34.479-10.953 30.399-30.835 39.772-58 32z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m469.21 434.82h-18a4.5051 4.5051 0 0 1-4.5-4.5v-6a4.5051 4.5051 0 0 1 4.5-4.5h18a4.5051 4.5051 0 0 1 4.5 4.5v6a4.5051 4.5051 0 0 1-4.5 4.5z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m560.44 534.7a10.743 10.743 0 0 0-8.7149-13.979l-56.029-80.214-16.614 16.425 60.299 73.683a10.801 10.801 0 0 0 21.059 4.0847z",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m513.22 465.05-20.234 13.507a4.8169 4.8169 0 0 1-7.0291-1.9475l-10.365-21.928a13.377 13.377 0 0 1 22.295-14.789l16.229 17.919a4.8169 4.8169 0 0 1-0.8968 7.2386z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m362.5 426.92a10.526 10.526 0 0 1 0.2393 1.6401l42.957 24.782 10.441-6.0109 11.131 14.572-17.45 12.438a8 8 0 0 1-9.5982-0.23384l-44.297-34.946a10.497 10.497 0 1 1 6.5757-12.241z",fill:"#ffb8b8"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m418.18 471.35-10.794-21.802a4.8169 4.8169 0 0 1 2.835-6.7204l23.078-7.4597a13.377 13.377 0 0 1 11.8 24.012l-19.857 13.79a4.8169 4.8169 0 0 1-7.0632-1.82z",fill:"#b3b3b3"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m477.67 356.34a4.0633 4.0633 0 0 0 4.3168-2.4094 5.8506 5.8506 0 0 0-0.41558-5.1377 10.736 10.736 0 0 0-3.7759-3.7034 12.406 12.406 0 0 0-5.9816-2.0579 7.4612 7.4612 0 0 0-5.7939 2.1993 5.3768 5.3768 0 0 0-0.97171 5.9276c0.89811 1.7319 2.7825 2.7031 4.6186 3.3625a27.094 27.094 0 0 0 11.378 1.4944",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m485.52 398.45c-4.2928 0.20179-3.5536-8.9072-4.8971-12.989s-3.1955-8.9513-7.4212-9.734c-3.463-0.6414-6.5925 1.8908-9.609 3.7086-5.3764 3.24-12.336 4.4352-17.981 1.6906s-9.0786-10.078-6.3329-15.723a12.876 12.876 0 0 1 8.049-6.3415 25.906 25.906 0 0 1 10.462-0.50253 53.527 53.527 0 0 1 21.886 7.7574c4.5819 2.8736 8.9417 6.7864 10.306 12.02s1.9198 19.465-3.413 20.366z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m474.29 343.67c-3.2427-4.1108-2.0213-10.588 1.7582-14.211s9.3995-4.7529 14.615-4.292a29.621 29.621 0 0 1 24.025 17.275c3.2959 7.5393 3.2687 16.163 6.2494 23.832a32.137 32.137 0 0 0 43.41 17.543c5.1881-2.3921 10.128-7.0763 9.8321-12.782 3.2802 12.646-2.6276 27.112-13.823 33.847-6.5573 3.9448-14.323 5.284-21.92 6.2056-4.9507 0.60059-10.039 1.0474-14.87-0.18987-6.7592-1.731-12.418-6.7198-15.845-12.798s-4.7748-13.161-4.827-20.138c-0.04071-5.4353 0.67085-10.873 0.29483-16.296s-2.0061-11.031-5.9367-14.785-10.564-4.9899-14.878-1.6831c-1.7337 1.329-3.0043 3.2697-4.9563 4.2502s-5.036 0.21793-5.1666-1.9626z",fill:"#2f2e41"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m380.18 427.1h-202.58a6.9935 6.9935 0 0 1-6.9854-6.9854v-114.1a6.9936 6.9936 0 0 1 6.9854-6.9854h202.58a6.9933 6.9933 0 0 1 6.9854 6.9854v114.1a6.9933 6.9933 0 0 1-6.9854 6.9854zm-202.58-126.51a5.4392 5.4392 0 0 0-5.4331 5.4331v114.1a5.4392 5.4392 0 0 0 5.4331 5.4331h202.58a5.4395 5.4395 0 0 0 5.4331-5.4331v-114.1a5.4394 5.4394 0 0 0-5.4331-5.4331z",fill:"#3f3d56"}),v.jsx("circle",{cx:"73.768",cy:"191.12",r:"28.967",fill:"#e6e6e6"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m356.01 401.31-34.003-58.895a2.4215 2.4215 0 0 0-4.1941 0l-20.751 35.942-30.936-53.582a3.1047 3.1047 0 0 0-5.3774 0l-43.596 75.511a3.1046 3.1046 0 0 0 2.6887 4.657h134.07a2.4215 2.4215 0 0 0 2.0971-3.6322z",fill:"currentColor"}),v.jsx("rect",{x:"14.747",y:"153.97",width:"12.419",height:"12.419",fill:"#3f3d56"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m459.04 259.1h-158.29a5.4645 5.4645 0 0 1-5.4581-5.4582v-89.15a5.4645 5.4645 0 0 1 5.4581-5.4582h158.29a5.4643 5.4643 0 0 1 5.4582 5.4582v89.15a5.4643 5.4643 0 0 1-5.4582 5.4582zm-158.29-98.853a4.25 4.25 0 0 0-4.2452 4.2452v89.15a4.25 4.25 0 0 0 4.2452 4.2452h158.29a4.2502 4.2502 0 0 0 4.2452-4.2452v-89.15a4.2502 4.2502 0 0 0-4.2452-4.2452z",fill:"#ccc"}),v.jsx("circle",{cx:"182.31",cy:"39.947",r:"22.634",fill:"#f2f2f2"}),v.jsx("path",{transform:"translate(-170.62 -159.03)",d:"m440.15 238.95-26.569-46.018a1.892 1.892 0 0 0-3.2771 0l-16.214 28.084-24.172-41.867a2.4259 2.4259 0 0 0-4.2017 0l-34.064 59.001a2.4258 2.4258 0 0 0 2.1008 3.6388h104.76a1.8921 1.8921 0 0 0 1.6386-2.8381z",fill:"#e6e6e6"}),v.jsx("rect",{x:"136.2",y:"10.916",width:"9.7034",height:"9.7034",fill:"#ccc"})]})})}):v.jsx($,{dataLength:(null==f?void 0:f.length)||0,next:m,hasMore:p||!1,loader:v.jsx("div",{className:"qc-mx-auto qc-my-3 qc-w-fit",children:v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"qc-size-12",viewBox:"0 0 24 24",children:[v.jsx("circle",{cx:18,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:.67,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),v.jsx("circle",{cx:12,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:.33,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),v.jsx("circle",{cx:6,cy:12,r:0,fill:"currentColor",children:v.jsx("animate",{attributeName:"r",begin:0,calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})})]})}),children:v.jsx("div",{className:x(""),children:v.jsx(U,{event:i,contents:f,curateLink:(null==i?void 0:i.engagementStyle)===w.CONTEST&&i.status===z.OPEN?N.CURATE(null==i?void 0:i.slug):null})})})]})}},Symbol.toStringTag,{value:"Module"}));export{V as C,_ as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,j as t,c as r}from"./
|
|
1
|
+
import{g as e,j as t,c as r}from"./CwuxJzTJ.js";var o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],s=e=>{let t=0;for(let r=0;r<e.length;r++){let s=e[r];t=83*t+o.indexOf(s)}return t},i=e=>{let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},n=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(12.92*t*255+.5):Math.trunc(255*(1.055*Math.pow(t,.4166666666666667)-.055)+.5)},h=(e,t)=>(e=>e<0?-1:1)(e)*Math.pow(Math.abs(e),t),l=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e}},a=e=>{let t=e>>8&255,r=255&e;return[i(e>>16),i(t),i(r)]},c=(e,t)=>{let r=Math.floor(e/361),o=Math.floor(e/19)%19,s=e%19;return[h((r-9)/9,2)*t,h((o-9)/9,2)*t,h((s-9)/9,2)*t]},u=(e,t,r,o)=>{(e=>{if(!e||e.length<6)throw new l("The blurhash string must be at least 6 characters");let t=s(e[0]),r=Math.floor(t/9)+1,o=t%9+1;if(e.length!==4+2*o*r)throw new l(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*o*r}`)})(e),o|=1;let i=s(e[0]),h=Math.floor(i/9)+1,u=i%9+1,p=(s(e[1])+1)/166,d=new Array(u*h);for(let t=0;t<d.length;t++)if(0===t){let r=s(e.substring(2,6));d[t]=a(r)}else{let r=s(e.substring(4+2*t,6+2*t));d[t]=c(r,p*o)}let b=4*t,f=new Uint8ClampedArray(b*r);for(let e=0;e<r;e++)for(let o=0;o<t;o++){let s=0,i=0,l=0;for(let n=0;n<h;n++)for(let h=0;h<u;h++){let a=Math.cos(Math.PI*o*h/t)*Math.cos(Math.PI*e*n/r),c=d[h+n*u];s+=c[0]*a,i+=c[1]*a,l+=c[2]*a}let a=n(s),c=n(i),p=n(l);f[4*o+0+e*b]=a,f[4*o+1+e*b]=c,f[4*o+2+e*b]=p,f[4*o+3+e*b]=255}return f},p=Object.defineProperty,d=Object.defineProperties,b=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))g.call(t,r)&&v(e,r,t[r]);if(f)for(var r of f(t))m.call(t,r)&&v(e,r,t[r]);return e},y=(e,t)=>d(e,b(t)),M=(e,t)=>{var r={};for(var o in e)g.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&f)for(var o of f(e))t.indexOf(o)<0&&m.call(e,o)&&(r[o]=e[o]);return r},q=class extends e.PureComponent{constructor(){super(...arguments),this.canvas=null,this.handleRef=e=>{this.canvas=e,this.draw()},this.draw=()=>{let{hash:e,height:t,punch:r,width:o}=this.props;if(this.canvas){let s=u(e,o,t,r),i=this.canvas.getContext("2d"),n=i.createImageData(o,t);n.data.set(s),i.putImageData(n,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:r,height:o,width:s}=t,i=M(t,["hash","height","width"]);return e.createElement("canvas",y(w({},i),{height:o,width:s,ref:this.handleRef}))}};q.defaultProps={height:128,width:128};var C={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends e.PureComponent{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:r,height:o,width:s,punch:i,resolutionX:n,resolutionY:h,style:l}=t,a=M(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return e.createElement("div",y(w({},a),{style:y(w({display:"inline-block",height:o,width:s},l),{position:"relative"})}),e.createElement(q,{hash:r,height:h,width:n,punch:i,style:C}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=Object.defineProperty,k=(e,t,r)=>((e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),O=new Map,V=new WeakMap,x=0;function I(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>`${t}_${"root"===t?function(e){return e?(V.has(e)||(x+=1,V.set(e,x.toString())),V.get(e)):"0"}(e.root):e[t]}`)).toString()}function E(e,t,r={},o=undefined){if(typeof window.IntersectionObserver>"u"&&void 0!==o){const s=e.getBoundingClientRect();return t(o,{isIntersecting:o,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}),()=>{}}const{id:s,observer:i,elements:n}=function(e){const t=I(e);let r=O.get(t);if(!r){const o=new Map;let s;const i=new IntersectionObserver((t=>{t.forEach((t=>{var r;const i=t.isIntersecting&&s.some((e=>t.intersectionRatio>=e));e.trackVisibility&&typeof t.isVisible>"u"&&(t.isVisible=i),null==(r=o.get(t.target))||r.forEach((e=>{e(i,t)}))}))}),e);s=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:i,elements:o},O.set(t,r)}return r}(r),h=n.get(e)||[];return n.has(e)||n.set(e,h),h.push(t),i.observe(e),function(){h.splice(h.indexOf(t),1),0===h.length&&(n.delete(e),i.unobserve(e)),0===n.size&&(i.disconnect(),O.delete(s))}}var P=class extends e.Component{constructor(e){super(e),k(this,"node",null),k(this,"_unobserveCb",null),k(this,"handleNode",(e=>{this.node&&(this.unobserve(),!e&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()})),k(this,"handleChange",((e,t)=>{e&&this.props.triggerOnce&&this.unobserve(),function(e){return"function"!=typeof e.children}(this.props)||this.setState({inView:e,entry:t}),this.props.onChange&&this.props.onChange(e,t)})),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:r,trackVisibility:o,delay:s,fallbackInView:i}=this.props;this._unobserveCb=E(this.node,this.handleChange,{threshold:e,root:t,rootMargin:r,trackVisibility:o,delay:s},i)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if("function"==typeof t){const{inView:e,entry:r}=this.state;return t({inView:e,entry:r,ref:this.handleNode})}const{as:r,triggerOnce:o,threshold:s,root:i,rootMargin:n,onChange:h,skip:l,trackVisibility:a,delay:c,initialInView:u,fallbackInView:p,...d}=this.props;return e.createElement(r||"div",{ref:this.handleNode,...d},t)}};const N=({src:o,alt:s,delayTime:i=0,threshold:n=.5,blurhash:h="LEHV6nWB2yk8pyo0adR*.7kCMdnj",wrapperClassName:l="qc-size-full",sizeMode:a="cover",position:c="center",onClick:u})=>{const p=e.useRef(null),d=e.useRef(null),[b,f]=e.useState(!1),[g,m]=e.useState(!1);return t.jsxs(P,{as:"div",className:r(l,"qc-relative qc-overflow-hidden"),threshold:n,onChange:e=>{e?d.current||(i<=0?f(!0):d.current=setTimeout((()=>f(!0)),i)):d.current&&(clearTimeout(d.current),d.current=null)},children:[t.jsx(q,{className:"qc-size-full qc-blur-2xl",hash:h}),t.jsx("img",{alt:s,ref:p,src:b?o:null,onLoad:()=>m(!0),className:r("qc-bg-primary qc-absolute qc-left-0 qc-top-0 qc-size-full qc-object-center qc-transition-all qc-duration-300",g?"qc-scale-100 qc-opacity-100":"qc-scale-95 qc-opacity-0","contain"===a?"qc-object-contain":"qc-object-cover","top"===c?"qc-object-top":"bottom"===c?"qc-object-bottom":"qc-object-center"),onClick:u})]})};export{P as I,N as L};
|