PageSourceSearch

https://www.oscainc.org/_next/static/chunks/197-b8dab7c6fe04a0d3.js

js oscainc.org collected 2026-10-04 13:26:10 UTC 148,759 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[197],{30380:function(e,t,n){"use strict";n.d(t,{v:function(){return r}});var i=n(1817);let r={getPostUrl(e){var t,n,r;let o=!!((null===(t=e.group)||void 0===t?void 0:t._id)||e.groupId),s=o?"/community/post/".concat(e.objectID):"/post/".concat(e.objectID);switch(e.postType){case i.J5.BLOG:return"/blog/".concat(e.blog._id);case i.J5.POLL:return"/poll/".concat(e.poll._id);case i.J5.POST:break;case i.J5.QUESTION:return"/question/".concat(e.question._id);case i.J5.ANSWER:return(null===(r=e.answer)||void 0===r?void 0:null===(n=r.question)||void 0===n?void 0:n._id)?"/question/".concat(e.answer.question._id):s;case i.J5.COMMENT:if(!e.post||"object"!=typeof e.post||!("type"in e.post))break;switch(e.post.type){case i.J5.BLOG:return"/blog/".concat(e.post.blog._id,"?comment=").concat(e.objectID);case i.J5.POLL:return"/poll/".concat(e.post.poll._id,"?comment=").concat(e.objectID);case i.J5.POST:{let t=o?"/community/post/".concat(e.post._id):"/post/".concat(e.post._id);return"".concat(t,"?comment=").concat(e.objectID)}case i.J5.QUESTION:return"/question/".concat(e.post.question._id,"?comment=").concat(e.objectID);case i.J5.ANSWER:return"/question/".concat(e.post.answer.questionId,"?comment=").concat(e.objectID);default:return s}}return s},getMemberUrl:e=>e.userId?"/members/".concat(e.userId):"/members/".concat(e.objectID),getEventUrl(e){let t={[i.SL.CONFERENCE]:"/events/conferences/".concat(e.objectID),[i.SL.SIMPLE]:"/events/".concat(e.objectID)}[e.eventType];return t||"/events/".concat(e.objectID)},getFileUrl(e){var t;let n=Array.isArray(e.scope)?e.scope:"string"==typeof e.scope?[e.scope]:[],i=e.groupId?e.groupId:null===(t=n.filter(e=>e.startsWith("group_")).at(0))||void 0===t?void 0:t.split("_").at(-1);return i?"/community/groups/".concat(i,"/resources?versionFileId=").concat(e.objectID):e.originalPostId?"/post/".concat(e.originalPostId):"/community"}}},1817:function(e,t,n){"use strict";var i,r,o,s,l,a;n.d(t,{J5:function(){return r},SL:function(){return o}}),(s=i||(i={})).VIEW_ADMIN_SITE="VIEW_ADMIN_SITE",s.MODERATE="MODERATE",s.ADMIN="ADMIN",s.MORGOTH="MORGOTH",s.SPONSOR_ADMIN="SPONSOR_ADMIN",(l=r||(r={})).POST="POST",l.BLOG="BLOG",l.POLL="POLL",l.QUESTION="QUESTION",l.ANSWER="ANSWER",l.COMMENT="COMMENT",(a=o||(o={})).CONFERENCE="CONFERENCE",a.SIMPLE="SIMPLE"},86630:function(e,t,n){"use strict";n.d(t,{HS:function(){return s},IU:function(){return getAlgoliaHighlightPropertyValue},bw:function(){return parseAlgoliaHighlightHtml}});var i=n(85893),r=n(38655);n(67294);var o=n(23852);let getAttributeValue=(e,t)=>{if(!t)return"";let n=t.split(".").reduce((e,t)=>null!=e?e[t]:void 0,e);return null==n?"":"string"==typeof n?n:String(n)},getAlgoliaHighlightPropertyValue=(e,t,n)=>{if(!n)return;let i=n.split(".").reduce((e,t)=>null!=e?e[t]:void 0,null==e?void 0:e[t]);if(i&&"object"==typeof i&&"value"in i)return"string"==typeof i.value?i.value:void 0},parseAlgoliaHighlightHtml=e=>{let t=e.replace(/<ais-highlight-[^>]*>/g,"<em>").replace(/<\/ais-highlight-[^>]*>/g,"</em>").replace(/<mark[^>]*>/gi,"<em>").replace(/<\/mark>/gi,"</em>");return t.includes("<em>")?t.split(/(<em>.*?<\/em>)/g).filter(Boolean).map(e=>({value:e.replace(/<\/?em>/g,""),isHighlighted:e.startsWith("<em>")&&e.endsWith("</em>")})):[{value:t,isHighlighted:!1}]},s=(0,o.Z)(e=>{let{highlight:t,attribute:n,hit:o}=e,s="string"==typeof n?n:"";if(!s)return null;let l=[];try{l=t({highlightProperty:"_highlightResult",attribute:s,hit:o})}catch(e){l=[]}let a=getAlgoliaHighlightPropertyValue(o,"_highlightResult",s);return(a&&(l=parseAlgoliaHighlightHtml(a)),l.length)?(0,i.jsx)("span",{children:l.map((e,t)=>e.isHighlighted?(0,i.jsx)(r.m$.span,{bg:"blue.100",children:e.value},t):(0,i.jsx)("span",{children:e.value},t))}):(0,i.jsx)("span",{children:getAttributeValue(o,s)})})},79812:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var i=n(85893),r=n(38655);n(67294);var o=n(23852);let getAttributeValue=(e,t)=>{if(!t)return"";let n=t.split(".").reduce((e,t)=>null!=e?e[t]:void 0,e);return null==n?"":"string"==typeof n?n:String(n)}
1,getResultValue=(e,t,n)=>{if(!n)return;let i=n.split(".").reduce((e,t)=>null!=e?e[t]:void 0,null==e?void 0:e[t]);if(i&&"object"==typeof i&&"value"in i)return"string"==typeof i.value?i.value:void 0},parseHighlightedHtml=e=>{let t=e.replace(/<ais-highlight-[^>]*>/g,"<em>").replace(/<\/ais-highlight-[^>]*>/g,"</em>");return t.includes("<em>")?t.split(/(<em>.*?<\/em>)/g).filter(Boolean).map(e=>({value:e.replace(/<\/?em>/g,""),isHighlighted:e.startsWith("<em>")&&e.endsWith("</em>")})):[{value:t,isHighlighted:!1}]},s=(0,o.Z)(e=>{let{highlight:t,attribute:n,hit:o}=e,s="string"==typeof n?n:"";if(!s)return null;let l=[];try{l=t({highlightProperty:"_snippetResult",attribute:s,hit:o})}catch(e){l=[]}let a=getResultValue(o,"_snippetResult",s)||getResultValue(o,"_highlightResult",s);return(null!=a&&(l=parseHighlightedHtml(a)),l.length)?(0,i.jsx)("span",{children:l.map((e,t)=>e.isHighlighted?(0,i.jsx)(r.m$.span,{bg:"blue.100",children:e.value},t):(0,i.jsx)("span",{children:e.value},t))}):(0,i.jsx)("span",{children:getAttributeValue(o,s)})})},12685:function(e,t,n){"use strict";n.d(t,{Z:function(){return FormattedUserName}});var i=n(85893),r=n(38655);n(67294);var o=n(86630),s=n(93064);function getHighlightResultNode(e,t){let n=e._highlightResult;if(n)return t.split(".").reduce((e,t)=>{if(null!=e&&"object"==typeof e)return e[t]},n)}function addMatchedWordsFromNode(e,t){if(!e||"object"!=typeof e)return;let n=e.matchedWords;if(Array.isArray(n))for(let e of n)"string"==typeof e&&e.trim()&&t.add(e.trim())}let l=["preferredName","firstName","lastName","prefix","suffix","nameTitle"],FormattedUserName=e=>{let{hit:t,viewableAttributesField:n,highlightAttributesField:a,preferMemberFullNameMatchedWordHighlights:c,fallbackDisplayName:u}=e;if(c)return(0,i.jsx)(i.Fragment,{children:function(e,t,n,a){var c;let u=e[t],d=u?(0,s.IQ)({preferredName:u.preferredName,prefix:u.prefix,firstName:u.firstName,lastName:u.lastName,suffix:u.suffix,nameTitle:u.nameTitle}):null!==(c=null!=a?a:e.displayName)&&void 0!==c?c:"",m=null!=n?n:t,p=function(e,t,n){let i=new Set;addMatchedWordsFromNode(getHighlightResultNode(e,"displayName"),i);let r=[...new Set([t,n].filter(Boolean))];for(let t of r)for(let n of l)addMatchedWordsFromNode(getHighlightResultNode(e,"".concat(t,".").concat(n)),i);return[...i]}(e,m,t);if(p.length>0){let e=function(e,t){let n=e.toLowerCase(),i=[],r=[...t].sort((e,t)=>t.length-e.length);for(let t of r){let r=t.trim();if(!r)continue;let o=r.toLowerCase(),s=0;for(;s<=e.length-o.length;){let e=n.indexOf(o,s);if(-1===e)break;i.push({start:e,end:e+r.length}),s=e+1}}return function(e){if(!e.length)return[];let t=[...e].sort((e,t)=>e.start-t.start),n=[{...t[0]}];for(let e=1;e<t.length;e++){let i=t[e],r=n[n.length-1];i.start<r.end?r.end=Math.max(r.end,i.end):n.push({...i})}return n}(i)}(d,p);if(e.length>0){let t=function(e,t){if(!t.length)return[{value:e,isHighlighted:!1}];let n=[],i=0;for(let r of t)r.start>i&&n.push({value:e.slice(i,r.start),isHighlighted:!1}),n.push({value:e.slice(r.start,r.end),isHighlighted:!0}),i=r.end;return i<e.length&&n.push({value:e.slice(i),isHighlighted:!1}),n}(d,e);return(0,i.jsx)(i.Fragment,{children:t.map((e,t)=>e.isHighlighted?(0,i.jsx)(r.m$.span,{bg:"blue.100",children:e.value},t):(0,i.jsx)("span",{children:e.value},t))})}}let h=(0,o.IU)(e,"_highlightResult","displayName");if(h&&/<(em|mark|ais-highlight)/i.test(h)){let e=(0,o.bw)(h);return(0,i.jsx)(i.Fragment,{children:e.map((e,t)=>e.isHighlighted?(0,i.jsx)(r.m$.span,{bg:"blue.100",children:e.value},t):(0,i.jsx)("span",{children:e.value},t))})}return(0,i.jsx)("span",{children:d})}(t,n,a,u)});let d=t[n],m=null!=a?a:n;return(0,i.jsx)(i.Fragment,{children:(()=>{if(null==d?void 0:d.preferredName)return(0,i.jsx)(o.HS,{attribute:"".concat(m,".preferredName"),hit:t});let e=[];return((null==d?void 0:d.prefix)&&""!==d.prefix&&(e.push((0,i.jsx)(o.HS,{attribute:"".concat(m,".prefix"),hit:t},"prefix")),d.prefix.endsWith(".")||e.push(".")),(null==d?void 0:d.firstName)&&e.push((0,i.jsx)(o.HS,{attribute:"".concat(m,".firstName"),hit:t},"firstName")),(null==d?void 0:d.lastName)&&(e.push(" "),e.push((0,i.jsx)(o.HS,{attribute:"".concat(m,".lastName"),hit:t},"lastName")),e.push(" ")),(null==d?void 0:d.suffix)&&""!==d.suffix&&(e.push((0,i.jsx)(o.HS,{attribute:"".concat(m,".suffix"),hit:t},"suffix")),d.suffix.endsWith(".")||e.push(".")),(null==d?void 0:d.nameTitle)&&""!==d.nameTitle&&(e.push(", "),e.push((0,i.jsx)(o.HS,{attribute:"".concat(m,".nameTitle"),hit:t},"nameTitle"))),0===e.length)?(0,i.jsx)(o.HS,{attribute:"displayName",hit:t}):(0,i.jsx)(i.Fragment,{children:e})})()})}},69122:function(e,t,n){"use strict";n.d(t,{J:function(){return r},a:function(){return i}});let i=20,r={role:"assistant",mode:"streaming",answer:"",sources:[],references:[],results:[],debug:{},responseType:null,queryToken:"",originalQuery:"",count:null,entityType:"",indexName:"",filters:{},queryFilter:[],idsTruncated:!1,viewResultsError:null}},75517:function(e,t,n){"use strict";n.d(t,{$2:function(){return s},Cy:function(){return a},Me:function(){return u},OW:function(){return d},YU:function(){return c},d6:function(){return p},ng:function(){return m},zG:function(){return l}});var i=n(82729),r=n(50456),o=n(95695);
1function _templateObject(){let e=(0,i._)(['\n  query SearchAIResults_UsersByIds($input: UsersByIdsInput!) {\n    usersByIdsForAiAsk(input: $input) {\n      results {\n        _id\n        displayName\n        jobTitle\n        company\n        firstName\n        lastName\n        preferredName\n        prefix\n        suffix\n        nameTitle\n        proxyProfilePictureUrl(\n          input: { w: 140, h: 140, fit: "facearea", facepad: 10.0 }\n        )\n      }\n    }\n  }\n']);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,i._)(['\n  query SearchAIResults_OrganizationsByIds($organizationIds: [String!]!) {\n    sponsorsByIds(input: { organizationIds: $organizationIds }) {\n      results {\n        _id\n        name\n        displayName\n        dateCreated\n        isSponsor\n        aboutUs\n        profilePicture {\n          imageProxy(input: { w: 160, h: 160, fit: "fill" })\n        }\n        sponsorship {\n          currentTier {\n            name\n          }\n        }\n      }\n    }\n  }\n']);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,i._)(['\n  query SearchAIResults_postsByIdsForAiAsk($input: PostsByIdsForAiAskInput!) {\n    postsByIdsForAiAsk(input: $input) {\n      results {\n        _id\n        title\n        bodyPlainText\n        datePublished\n        reactionCount\n        commentCount\n        authorId\n        author {\n          _id\n          displayName\n          firstName\n          lastName\n          preferredName\n          prefix\n          suffix\n          nameTitle\n          proxyProfilePictureUrl(\n            input: { w: 140, h: 140, fit: "facearea", facepad: 10.0 }\n          )\n        }\n        group {\n          _id\n          name\n        }\n        organization {\n          _id\n          name\n        }\n        blog {\n          _id\n          title\n          content\n        }\n        poll {\n          _id\n          title\n          description\n          responseCount\n          descriptionContentState {\n            blocks {\n              text\n            }\n          }\n        }\n        question {\n          _id\n          title\n          answerCount\n          body\n          bodyContentState {\n            blocks {\n              text\n            }\n          }\n        }\n        answer {\n          _id\n          questionId\n          body\n          bodyContentState {\n            blocks {\n              text\n            }\n          }\n          question {\n            _id\n            title\n          }\n        }\n      }\n    }\n  }\n']);return _templateObject2=function(){return e},e}function _templateObject3(){let e=(0,i._)(['\n  query SearchAIResults_EventsByIds($ids: [String!]!) {\n    eventsByIds(input: { ids: $ids }) {\n      results {\n        __typename\n        _id\n        name\n        shortDescription\n        description\n        startDate\n        endDate\n        timeZone\n        status\n        isCourseWorkshop\n        isXproConferenceEvent\n        xproEventBanner\n        bannerImage {\n          imageProxy(input: { w: 320, h: 180, fit: "fill" })\n        }\n        ... on ConferenceEventV2 {\n          venueType\n        }\n        ... on SimpleEventV2 {\n          venue {\n            type\n          }\n        }\n      }\n    }\n  }\n']);return _templateObject3=function(){return e},e}function _templateObject4(){let e=(0,i._)(['\n  query SearchAIResults_VersionFilesByIds(\n    $input: VersionFilesByIdsForAiAskInput!\n  ) {\n    versionFilesByIdsForAiAsk(input: $input) {\n      results {\n        _id\n        dateCreated\n        file {\n          _id\n          name\n          isVideo\n          isImage\n          url\n          imageProxy(input: {})\n        }\n        author {\n          _id\n          displayName\n          proxyProfilePictureUrl(\n            input: { w: 40, h: 40, fit: "facearea", facepad: 10.0 }\n          )\n        }\n        originalPost {\n          _id\n          title\n          bodyPlainText\n        }\n        originalComment {\n          _id\n          postV2 {\n            _id\n          }\n        }\n      }\n    }\n  }\n']);
1return _templateObject4=function(){return e},e}function _templateObject5(){let e=(0,i._)(["\n  query SearchAIResults_VersionFilePreview(\n    $input: VersionFilesByIdsForAiAskInput!\n  ) {\n    versionFilesByIdsForAiAsk(input: $input) {\n      results {\n        ...PreviewRenderer_VersionFileFragment\n      }\n    }\n  }\n  ","\n"]);return _templateObject5=function(){return e},e}function _templateObject6(){let e=(0,i._)(['\n  query SearchAIResults_GroupsByIds($input: GroupsByIdsInput!) {\n    groupsByIds(input: $input) {\n      results {\n        _id\n        name\n        description\n        totalMembers\n        profileImage {\n          imageProxy(input: { w: 80, h: 80, fit: "fill" })\n        }\n      }\n    }\n  }\n']);return _templateObject6=function(){return e},e}function _templateObject7(){let e=(0,i._)(["\n  query SearchAIResults_TagsByIds($input: TagsByIdsInput!) {\n    tagsByIds(input: $input) {\n      results {\n        _id\n        name\n      }\n    }\n  }\n"]);return _templateObject7=function(){return e},e}let s=(0,r.Ps)(_templateObject()),l=(0,r.Ps)(_templateObject1()),a=(0,r.Ps)(_templateObject2()),c=(0,r.Ps)(_templateObject3()),u=(0,r.Ps)(_templateObject4()),d=(0,r.Ps)(_templateObject5(),o.L),m=(0,r.Ps)(_templateObject6()),p=(0,r.Ps)(_templateObject7())},15414:function(e,t,n){"use strict";n.d(t,{H:function(){return GlobalSearch}});var i=n(85893),r=n(90195),o=n(97026),s=n(47741),l=n(11163),a=n(67294),c=n(26808),u=n(34859),d=n(8296),m=n(63205),p=n(6491),h=n(76741),g=n(69243),x=n(2821),f=n(20979),v=n(35610),y=n(98617),b=n(74575),j=n(16502),_=n(51992);let I=(0,y.Z)(e=>{let{refine:t,isSearchStalled:n,placeholder:r,searching:o}=e,[s,l]=a.useState(""),c=(0,_.c)(s,500),u=a.useRef("");a.useEffect(()=>{t(c),c&&c!==u.current&&((0,j.Gx)({entity:{id:(0,j.t1)(),type:"search_query"},search:{query:c,searchType:"global",resultCount:0,hasResults:!0,queryLength:c.length}}),u.current=c)},[t,c]);let d=!!s.trim()&&s!==c,m=d||o||!!c.trim()&&n;return(0,i.jsxs)(f.BZ,{children:[(0,i.jsx)(f.Z8,{pointerEvents:"none",children:(0,i.jsx)(p.W1M,{color:"gray.600"})}),(0,i.jsx)(f.II,{variant:"filled",borderRadius:"full",placeholder:r,type:"search",value:s,onChange:e=>l(e.target.value),"aria-busy":m,pr:m?10:void 0}),m?(0,i.jsx)(f.xH,{pointerEvents:"none",children:(0,i.jsx)(v.$,{size:"sm",color:"blue.500",thickness:"3px",speed:"0.65s"})}):null]})}),T=(0,b.Z)(e=>{let{refine:t,placeholder:n}=e;return(0,i.jsx)(I,{refine:t,placeholder:n})});var S=n(41664),N=n.n(S);let C=(0,y.Z)(e=>{var t;let n=Object.keys(e.allSearchResults).reduce((t,n)=>t+e.allSearchResults[n].nbHits,0);if(!n)return null;let r=(null!==(t=e.searchState.query)&&void 0!==t?t:"").trim();return(0,i.jsx)(x.mz,{children:(0,i.jsx)(N(),{href:"/search?query=".concat(encodeURIComponent(r)),children:(0,i.jsx)(s.zx,{variant:"outline",colorScheme:"gray",w:"full",onClick:e.onClose,children:"See All"})})})});var A=n(48641);let O=(0,y.Z)(e=>{var t;let n=Object.keys(e.allSearchResults).reduce((t,n)=>t+e.allSearchResults[n].nbHits,0);return e.searching?null:(null===(t=e.searchState.query)||void 0===t?void 0:t.length)&&!n?(0,i.jsx)(x.fe,{borderTop:"1px",borderColor:"gray.200",children:(0,i.jsx)(A.M5,{children:(0,i.jsx)(A.xv,{color:"gray.500",children:"No Results"})})}):null});var w=n(82729),E=n(50456),P=n(37887),k=n(47849),M=n(23887),R=n(30380),L=n(86630),F=n(79812),q=n(68295);let Event=e=>{var t;let{hit:n,query:r,position:o}=e;return(0,i.jsxs)(A.fG,{as:A.Kq,direction:"row",spacing:"2",alignItems:"center",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",onClick:()=>{(0,j.Du)({entity:{id:n.objectID,type:"event"},search:{query:r||"",searchType:"events"},engagement:{position:o}})},children:[(0,i.jsx)(M.Ee,{boxSize:"8",objectFit:"cover",src:null!==(t=n.bannerImageUrl)&&void 0!==t?t:void 0,alt:"",borderRadius:"base",fallback:(0,i.jsx)(q.o,{boxSize:"8",borderRadius:"base"})}),(0,i.jsxs)(A.xu,{children:[(0,i.jsx)(A.AB,{as:N(),href:R.v.getEventUrl(n),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:(0,i.jsx)(L.HS,{attribute:"name",hit:n})})}),(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.600",children:(0,i.jsx)(F.t,{attribute:"descriptionPlainText",hit:n})}),(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.600",children:(0,i.jsx)(F.t,{attribute:"shortDescription",hit:n})})]})]})},File=e=>{var t,n,r;let{hit:o,query:s,position:l}=e,c=null!==(r=null===(n=o._highlightResult)||void 0===n?void 0:null===(t=n.bodyPlainText)||void 0===t?void 0:t.matchedWords)&&void 0!==r?r:[];return(0,i.jsxs)(A.fG,{as:A.Kq,direction:"row",spacing:"2",alignItems:"center",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",onClick:()=>{(0,j.Du)({entity:{id:o.objectID,type:"file"},search:{query:s||"",searchType:"files"},engagement:{position:l}})},children:[(0,i.jsx)(p.aAW,{boxSize:"8"}),(0,i.jsxs)(A.xu,{children:[(0,i.jsx)(A.AB,{as:N(),href:R.v.getFileUrl(o),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:(0,i.jsx)(L.HS,{attribute:"file.name",hit:o})})}),o.displayName&&(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.700",children:o.displayName}),c.length>0&&(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.600",children:c.map((e,t)=>(0,i.jsxs)(a.Fragment,{children:[t>0?" ":"",(0,i.jsx)(A.xu,{as:"span",bg:"blue.100",borderRadius:"sm",px:"0.5",children:e})]},"".concat(e,"-").concat(t)))})]})]})},Organization=e=>{var t;let{hit:n,query:r,position:o}=e;return(0,i.jsxs)(A.fG,{as:A.Kq,direction:"row",spacing:"2",alignItems:"center",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",onClick:()=>{(0,j.Du)({entity:{id:n.objectID,type:"organization"},search:{query:r||"",searchType:"organizations"},engagement:{position:o}})},children:[(0,i.jsx)(M.Ee,{boxSize:"8",objectFit:"cover",src:null!==(t=n.profilePictureUrl)&&void 0!==t?t:void 0,alt:"",borderRadius:"base",fallback:(0,i.jsx)(q.o,{boxSize:"8",borderRadius:"base"})}),(0,i.jsxs)(A.xu,{children:[(0,i.jsx)(A.AB,{as:N(),href:"/companies/".concat(n.objectID),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:(0,i.jsx)(L.HS,{attribute:"name",hit:n})})}),(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.600",children:(0,i.jsx)(F.t,{attribute:"aboutUs",hit:n})})]})]})};var D=n(3812),H=n(1817),U=n(12685),z=n(93064);let B={[H.J5.BLOG]:"posted an article",[H.J5.POLL]:"posted a poll",[H.J5.POST]:"posted",[H.J5.COMMENT]:"replied",[H.J5.QUESTION]:"asked a question",[H.J5.ANSWER]:"posted an answer"},W={[H.J5.BLOG]:"blog.title",[H.J5.POLL]:"poll.title",[H.J5.POST]:"title",[H.J5.QUESTION]:"question.title"},getCommentTitle=e=>{if(!e.post||"object"!=typeof e.post||!("type"in e.post))return e.title||e.bodyPlainText||"Comment";switch(e.post.type){case H.J5.BLOG:return e.post.blog.title;case H.J5.POLL:return e.post.poll.title;case H.J5.POST:return e.post.title;case H.J5.ANSWER:return e.post.answer.body;case H.J5.QUESTION:return e.post.question.title;default:return e.title||e.bodyPlainText||"Comment"}}
1,G={[H.J5.BLOG]:"blog.content",[H.J5.POLL]:"poll.description",[H.J5.POST]:"bodyPlainText",[H.J5.COMMENT]:"bodyPlainText",[H.J5.QUESTION]:"question.body",[H.J5.ANSWER]:"answer.body"},getAnswerQuestionTitle=e=>{var t,n;return(null===(n=e.answer)||void 0===n?void 0:null===(t=n.question)||void 0===t?void 0:t.title)||e.title||""},Post=e=>{let{hit:t,query:n,position:r}=e,o=t.adminGlobalViewable&&"adminGlobalViewable"||t.membersWithMemberStatusGlobalViewable&&"membersWithMemberStatusGlobalViewable"||t.loggedInGlobalViewable&&"loggedInGlobalViewable"||"loggedInGlobalViewable",s=t[o],l=a.useMemo(()=>s?(0,z.IQ)({preferredName:s.preferredName,prefix:s.prefix,firstName:s.firstName,lastName:s.lastName,suffix:s.suffix,nameTitle:s.nameTitle}):t.displayName||"",[s,t.displayName]);return(0,i.jsxs)(A.fG,{as:A.Kq,spacing:"1",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",onClick:()=>{(0,j.Du)({entity:{id:t.objectID,type:"post"},search:{query:n||"",searchType:"posts"},engagement:{position:r}})},children:[(0,i.jsxs)(A.Kq,{direction:"row",alignItems:"center",children:[(0,i.jsx)(D.qE,{size:"xs",src:"".concat(o,".profilePictureUrl")||0,name:l}),(0,i.jsxs)(A.xv,{textStyle:"compact",color:"gray.600",children:[(0,i.jsx)(A.rU,{as:N(),href:"/members/".concat(t.authorId),children:(0,i.jsx)(U.Z,{hit:t,viewableAttributesField:o,fallbackDisplayName:t.displayName})})," ",B[t.postType]," in"," ",t.group&&(0,i.jsx)(A.rU,{as:N(),href:"/community/groups/".concat(t.group._id,"/activity"),children:t.group.name}),t.organization&&(0,i.jsx)(A.rU,{as:N(),href:"/companies/".concat(t.organization._id),children:t.organization.name})]})]}),(0,i.jsxs)(A.Kq,{spacing:"0",children:[(0,i.jsx)(A.AB,{as:N(),href:R.v.getPostUrl(t),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:t.postType===H.J5.COMMENT?getCommentTitle(t):t.postType===H.J5.ANSWER?getAnswerQuestionTitle(t):(0,i.jsx)(L.HS,{attribute:W[t.postType],hit:t})})}),(0,i.jsx)(A.xv,{noOfLines:2,textStyle:"compact",color:"gray.600",children:(0,i.jsx)(F.t,{attribute:G[t.postType],hit:t})})]})]})},User=e=>{let{hit:t,memberIndexViewableField:n,memberIndexSearchableField:r,query:o,position:s}=e,l=t[n],c=t[n],u=a.useMemo(()=>c?(0,z.IQ)({preferredName:c.preferredName,prefix:c.prefix,firstName:c.firstName,lastName:c.lastName,suffix:c.suffix,nameTitle:c.nameTitle}):t.displayName||"",[c,t.displayName]);return(0,i.jsxs)(A.fG,{as:A.Kq,direction:"row",spacing:"2",alignItems:"center",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",onClick:()=>{(0,j.Du)({entity:{id:t.objectID,type:"member"},search:{query:o||"",searchType:"members"},engagement:{position:s}})},children:[(0,i.jsx)(D.qE,{size:"sm",name:u,src:t.profilePictureUrl||void 0}),(0,i.jsxs)(A.xu,{children:[(0,i.jsx)(A.AB,{as:N(),href:R.v.getMemberUrl(t),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:(0,i.jsx)(U.Z,{hit:t,viewableAttributesField:n,highlightAttributesField:r,preferMemberFullNameMatchedWordHighlights:!0,fallbackDisplayName:t.displayName})})}),((null==l?void 0:l.jobTitle)||(null==l?void 0:l.company))&&(0,i.jsxs)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.600",children:[l.jobTitle&&l.jobTitle,l.jobTitle&&l.company&&" at ",l.company&&l.company]})]})]})};function hasTextMatch(e){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e))return e.some(hasTextMatch);let t="string"==typeof e.matchLevel?e.matchLevel:"";return""!==t.trim().toLowerCase()&&"none"!==t.trim().toLowerCase()||Object.values(e).some(hasTextMatch)}function hitRelevance(e){var t,n;let i=null!==(n=null!==(t=e._relevanceScore)&&void 0!==t?t:e._score)&&void 0!==n?n:0,r="number"==typeof i?i:Number(i);return Number.isFinite(r)?r:0}function hitMatchPriority(e){var t;let n=e._highlightResult||{},i=e._snippetResult||{},r=hasTextMatch(n.title)||hasTextMatch(n.name)||hasTextMatch(n.displayName)||hasTextMatch(null===(t=n.file)||void 0===t?void 0:t.name)||hasTextMatch(n["file.name"]);return r?0:hasTextMatch(n)||hasTextMatch(i)?1:2}function blockMatchPriority(e){var t;return(null===(t=e.hits)||void 0===t?void 0:t.length)?Math.min(...e.hits.map(hitMatchPriority)):3}function blockTopScore(e){var t;return(null===(t=e.hits)||void 0===t?void 0:t.length)?Math.max(...e.hits.map(hitRelevance)):0}function sortGlobalSearchSectionsByRelevance(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[...e].sort((e,n)=>{var i,r;let o=blockMatchPriority(e)-blockMatchPriority(n);if(0!==o)return o;let s=blockTopScore(n)-blockTopScore(e);if(0!==s)return s;let l=null!==(i=t[e.index])&&void 0!==i?i:Number.MAX_SAFE_INTEGER,a=null!==(r=t[n.index])&&void 0!==r?r:Number.MAX_SAFE_INTEGER;return l-a})}
1function _templateObject(){let e=(0,w._)(["\n  query GlobalSearchModalBody_Tenant {\n    tenant {\n      result {\n        _id\n        organizationEntityName\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let V=(0,E.Ps)(_templateObject()),K=(0,k.Z)(e=>{var t;(0,P.a)(V);let{indexData:n,indexFilterData:r}=(0,g.Mx)();if(!n||!e.hits.some(e=>{let{hits:t}=e;return t.length}))return null;let o=null!==(t=null==r?void 0:r.orgIndexFilter)&&void 0!==t?t:"",s=/(^|\s)isSponsor\s*:\s*true(\s|$)/.test(o)?"Sponsors":"Organizations",l={[n.memberIndexName]:1,[n.orgIndexName]:2,[n.eventIndexName]:3,[n.fileIndexName]:4,[n.postIndexName]:5},a={[n.memberIndexName]:"Members",[n.orgIndexName]:s,[n.eventIndexName]:"Events",[n.fileIndexName]:"Files",[n.postIndexName]:"Posts"},c=sortGlobalSearchSectionsByRelevance(e.hits,l);return(0,i.jsx)(x.fe,{borderTop:"1px",borderBottom:"1px",borderColor:"gray.200",children:(0,i.jsx)(A.Kq,{children:c.map(t=>{var r;let{index:o,hits:s}=t;return s.length?(0,i.jsxs)(A.Kq,{children:[(0,i.jsx)(A.xv,{textStyle:"detailStrong",textTransform:"uppercase",color:"gray.500",children:null!==(r=a[o])&&void 0!==r?r:o}),s.map((t,r)=>{let s=r+1,l=e.currentRefinement;return o===n.memberIndexName?(0,i.jsx)(User,{hit:t,memberIndexViewableField:n.memberIndexViewableField,memberIndexSearchableField:n.memberIndexSearchableField,query:l,position:s},t.objectID):o===n.fileIndexName?(0,i.jsx)(File,{hit:t,query:l,position:s},t.objectID):o===n.postIndexName?(0,i.jsx)(Post,{hit:t,query:l,position:s},t.objectID):o===n.eventIndexName?(0,i.jsx)(Event,{hit:t,query:l,position:s},t.objectID):o===n.orgIndexName?(0,i.jsx)(Organization,{hit:t,query:l,position:s},t.objectID):null})]},o):null})})})}),getNestedValue=(e,t)=>t.split(".").reduce((e,t)=>null!=e?e[t]:void 0,e),getFirstString=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let e of t)if("string"==typeof e&&e.trim())return e;return""},getHighlightValue=(e,t,n)=>{let i=getNestedValue(e[n],t);return i&&"object"==typeof i&&"string"==typeof i.value?i.value:getFirstString(getNestedValue(e,t))},getOpenSearchPostTitle=e=>{var t,n,i,r,o,s;return getFirstString(e.title,null===(t=e.blog)||void 0===t?void 0:t.title,null===(n=e.poll)||void 0===n?void 0:n.title,null===(i=e.question)||void 0===i?void 0:i.title,null===(o=e.answer)||void 0===o?void 0:null===(r=o.question)||void 0===r?void 0:r.title,null===(s=e.answer)||void 0===s?void 0:s.body,e.bodyPlainText,"Post")},getOpenSearchPostBodyAttribute=e=>{switch(e.postType){case"BLOG":return"blog.content";case"POLL":return"poll.description";case"QUESTION":return"question.body";case"ANSWER":return"answer.body";default:return"bodyPlainText"}},getOpenSearchSimplePostPath=(e,t)=>{var n,i;let r=!!getFirstString(e.groupId,null===(n=e.group)||void 0===n?void 0:n._id,null===(i=e.group)||void 0===i?void 0:i.id);return r?"/community/post/".concat(t):"/post/".concat(t)},getOpenSearchPostUrl=e=>{var t,n,i,r,o,s,l,a,c,u;let d=getFirstString(e.postId,e.sourceId,e.objectID),m=getOpenSearchSimplePostPath(e,d);switch(e.postType){case"BLOG":return(null===(t=e.blog)||void 0===t?void 0:t._id)||(null===(n=e.blog)||void 0===n?void 0:n.id)?"/blog/".concat(e.blog._id||e.blog.id):m;case"POLL":return(null===(i=e.poll)||void 0===i?void 0:i._id)||(null===(r=e.poll)||void 0===r?void 0:r.id)?"/poll/".concat(e.poll._id||e.poll.id):m;case"QUESTION":return(null===(o=e.question)||void 0===o?void 0:o._id)||(null===(s=e.question)||void 0===s?void 0:s.id)?"/question/".concat(e.question._id||e.question.id):m;case"ANSWER":return(null===(a=e.answer)||void 0===a?void 0:null===(l=a.question)||void 0===l?void 0:l._id)||(null===(u=e.answer)||void 0===u?void 0:null===(c=u.question)||void 0===c?void 0:c.id)?"/question/".concat(e.answer.question._id||e.answer.question.id):m;default:return m}},getOpenSearchFileUrl=e=>{let t=getFirstString(e.versionFileId,e.sourceId,e.objectID),n=getFirstString(e.groupId);if(n)return"/community/groups/".concat(n,"/resources?versionFileId=").concat(t);let i=getFirstString(e.originalPostId);return i?"/post/".concat(i):"/community"};var Q=n(38655);let parseHighlightedHtml=e=>{let t=e.replace(/<ais-highlight-[^>]*>/g,"<em>").replace(/<\/ais-highlight-[^>]*>/g,"</em>").replace(/<mark[^>]*>/gi,"<em>").replace(/<\/mark>/gi,"</em>");return t.includes("<em>")?t.split(/(<em>.*?<\/em>
1)/g).filter(Boolean).map(e=>({value:e.replace(/<\/?em>/g,""),isHighlighted:e.startsWith("<em>")&&e.endsWith("</em>")})):[{value:t,isHighlighted:!1}]},OpenSearchText=e=>{let{value:t}=e;return(0,i.jsx)("span",{children:parseHighlightedHtml(t).map((e,t)=>e.isHighlighted?(0,i.jsx)(Q.m$.span,{bg:"blue.100",children:e.value},t):(0,i.jsx)("span",{children:e.value},t))})},OpenSearchEvent=e=>{let{hit:t}=e,n=getFirstString(t.sourceId,t.objectID),r=getFirstString(t.eventType);return(0,i.jsxs)(A.fG,{as:A.Kq,direction:"row",spacing:"2",alignItems:"center",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",children:[(0,i.jsx)(M.Ee,{boxSize:"8",objectFit:"cover",src:getFirstString(t.bannerImageUrl)||void 0,alt:"",borderRadius:"base",fallback:(0,i.jsx)(q.o,{boxSize:"8",borderRadius:"base"})}),(0,i.jsxs)(A.xu,{children:[(0,i.jsx)(A.AB,{as:N(),href:"CONFERENCE"===r?"/events/conferences/".concat(n):"/events/".concat(n),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:(0,i.jsx)(OpenSearchText,{value:getHighlightValue(t,"name","_highlightResult")||"Event"})})}),(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.600",children:(0,i.jsx)(OpenSearchText,{value:getHighlightValue(t,"descriptionPlainText","_snippetResult")})})]})]})},OpenSearchFile=e=>{var t;let{hit:n}=e,r=getHighlightValue(n,"file.name","_highlightResult")||(null===(t=n.file)||void 0===t?void 0:t.name)||n.fileName||n.name||"File";return(0,i.jsxs)(A.fG,{as:A.Kq,direction:"row",spacing:"2",alignItems:"center",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",children:[(0,i.jsx)(p.aAW,{boxSize:"8"}),(0,i.jsxs)(A.xu,{children:[(0,i.jsx)(A.AB,{as:N(),href:getOpenSearchFileUrl(n),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:(0,i.jsx)(OpenSearchText,{value:r})})}),n.displayName&&(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.700",children:n.displayName})]})]})},OpenSearchOrganization=e=>{let{hit:t}=e,n=getFirstString(t.sourceId,t.objectID);return(0,i.jsxs)(A.fG,{as:A.Kq,direction:"row",spacing:"2",alignItems:"center",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",children:[(0,i.jsx)(M.Ee,{boxSize:"8",objectFit:"cover",src:getFirstString(t.profilePictureUrl)||void 0,alt:"",borderRadius:"base",fallback:(0,i.jsx)(q.o,{boxSize:"8",borderRadius:"base"})}),(0,i.jsxs)(A.xu,{children:[(0,i.jsx)(A.AB,{as:N(),href:"/companies/".concat(n),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:(0,i.jsx)(OpenSearchText,{value:getHighlightValue(t,"name","_highlightResult")||"Organization"})})}),(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.600",children:(0,i.jsx)(OpenSearchText,{value:getHighlightValue(t,"aboutUs","_snippetResult")})})]})]})},J={BLOG:"posted an article",POLL:"posted a poll",POST:"posted",SIMPLE_POST:"posted",COMMENT:"replied",QUESTION:"asked a question",ANSWER:"posted an answer"},titleAttribute=e=>{switch(e.postType){case"BLOG":return"blog.title";case"POLL":return"poll.title";case"QUESTION":return"question.title";default:return"title"}},OpenSearchPost=e=>{var t,n,r,o;let{hit:s}=e,l=s.displayName||s.authorDisplayName||"",a=(null===(t=s.group)||void 0===t?void 0:t._id)||s.groupId,c=(null===(n=s.group)||void 0===n?void 0:n.name)||s.groupName,u=(null===(r=s.organization)||void 0===r?void 0:r._id)||s.organizationId,d=(null===(o=s.organization)||void 0===o?void 0:o.name)||s.organizationName,m=getHighlightValue(s,titleAttribute(s),"_highlightResult")||getOpenSearchPostTitle(s),p=getHighlightValue(s,getOpenSearchPostBodyAttribute(s),"_snippetResult");return(0,i.jsxs)(A.fG,{as:A.Kq,spacing:"1",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",children:[(0,i.jsxs)(A.Kq,{direction:"row",alignItems:"center",children:[(0,i.jsx)(D.qE,{size:"xs",name:l}),(0,i.jsxs)(A.xv,{textStyle:"compact",color:"gray.600",children:[s.authorId?(0,i.jsx)(A.rU,{as:N(),href:"/members/".concat(s.authorId),children:l}):l," ",J[s.postType||"POST"]||"posted"," in"," ",a&&c?(0,i.jsx)(A.rU,{as:N(),href:"/community/groups/".concat(a,"/activity"),children:c}):u&&d?(0,i.jsx)(A.rU,{as:N(),href:"/companies/".concat(u),children:d}):null]})]}),(0,i.jsxs)(A.Kq,{spacing:"0",children:[(0,i.jsx)(A.AB,{as:N(),href:getOpenSearchPostUrl(s),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:(0,i.jsx)(OpenSearchText,{value:m})})}),p&&(0,i.jsx)(A.xv,{noOfLines:2,textStyle:"compact",color:"gray.600",children:(0,i.jsx)(OpenSearchText,{value:p})})]})]})},OpenSearchUser=e=>{let{hit:t,viewableAttributeField:n}=e,r=getNestedValue(t,n)||{},o=getFirstString(getHighlightValue(t,"displayName","_highlightResult"),t.displayName,[r.firstName,r.lastName].filter(
1Boolean).join(" "),"Member"),s=getFirstString(t.userId,t.sourceId,t.objectID);return(0,i.jsxs)(A.fG,{as:A.Kq,direction:"row",spacing:"2",alignItems:"center",p:"2",bg:"white",_hover:{bg:"gray.100"},borderRadius:"xl",cursor:"pointer",children:[(0,i.jsx)(D.qE,{size:"sm",name:o.replace(/<\/?em>/g,""),src:getFirstString(t.profilePictureUrl,r.profilePictureUrl)||void 0}),(0,i.jsxs)(A.xu,{children:[(0,i.jsx)(A.AB,{as:N(),href:"/members/".concat(s),children:(0,i.jsx)(A.xv,{noOfLines:1,textStyle:"bodyStrong",children:(0,i.jsx)(OpenSearchText,{value:o})})}),(r.jobTitle||r.company)&&(0,i.jsxs)(A.xv,{noOfLines:1,textStyle:"compact",color:"gray.600",children:[r.jobTitle,r.jobTitle&&r.company?" at ":"",r.company]})]})]})},$=(0,k.Z)(e=>{let{indexData:t}=(0,g.Mx)();if(!t||!e.hits.some(e=>{let{hits:t}=e;return t.length}))return null;let n={[t.memberIndexName]:"Members",[t.orgIndexName]:"Organizations",[t.eventIndexName]:"Events",[t.fileIndexName]:"Files",[t.postIndexName]:"Posts"},r={[t.memberIndexName]:1,[t.orgIndexName]:2,[t.eventIndexName]:3,[t.fileIndexName]:4,[t.postIndexName]:5},o=sortGlobalSearchSectionsByRelevance(e.hits,r);return(0,i.jsx)(x.fe,{borderTop:"1px",borderBottom:"1px",borderColor:"gray.200",children:(0,i.jsx)(A.Kq,{children:o.map(e=>{var r;let{index:o,hits:s}=e;return s.length?(0,i.jsxs)(A.Kq,{children:[(0,i.jsx)(A.xv,{textStyle:"detailStrong",textTransform:"uppercase",color:"gray.500",children:null!==(r=n[o])&&void 0!==r?r:o}),s.map(e=>o===t.postIndexName?(0,i.jsx)(OpenSearchPost,{hit:e},e.objectID):o===t.fileIndexName?(0,i.jsx)(OpenSearchFile,{hit:e},e.objectID):o===t.memberIndexName?(0,i.jsx)(OpenSearchUser,{hit:e,viewableAttributeField:t.memberIndexViewableField},e.objectID):o===t.eventIndexName?(0,i.jsx)(OpenSearchEvent,{hit:e},e.objectID):o===t.orgIndexName?(0,i.jsx)(OpenSearchOrganization,{hit:e},e.objectID):null)]},o):null})})})}),GlobalSearchModal=e=>{let{searchMode:t}=(0,g.Mx)();return(0,i.jsxs)(x.u_,{isOpen:e.isOpen,onClose:e.onClose,size:"xl",scrollBehavior:"inside",children:[(0,i.jsx)(x.ZA,{}),(0,i.jsxs)(x.hz,{borderRadius:"xl",children:[(0,i.jsx)(x.xB,{children:(0,i.jsx)(T,{placeholder:"Search Community"})}),"opensearch"===t?(0,i.jsx)($,{}):(0,i.jsx)(K,{}),(0,i.jsx)(O,{}),(0,i.jsx)(C,{onClose:e.onClose})]})]})},GlobalSearch=e=>{var t,n;let x=(0,g.Mx)(),f=(0,m.U)(),v=(0,r.qY)(),y=v.onClose,b=(0,l.useRouter)();return((0,d._)("metaKey","k",v.onOpen),a.useEffect(()=>{y()},[y,b.asPath]),x.client&&x.indexData&&!f.loading&&b.isReady)?(0,i.jsxs)(h.r,{searchClient:x.client,indexName:x.indexData.postIndexName,children:[(0,i.jsx)(c.Z,{indexName:x.indexData.memberIndexName,children:(0,i.jsx)(u.Z,{hitsPerPage:5,restrictSearchableAttributes:["displayName",x.indexData.memberIndexSearchableField],filters:null===(t=x.indexFilterData)||void 0===t?void 0:t.memberIndexFilter,attributesToRetrieve:["displayName",x.indexData.memberIndexViewableField,"userId","profilePictureUrl"]})}),(0,i.jsx)(c.Z,{indexName:x.indexData.orgIndexName,children:(0,i.jsx)(u.Z,{hitsPerPage:5,filters:null===(n=x.indexFilterData)||void 0===n?void 0:n.orgIndexFilter})}),(0,i.jsx)(c.Z,{indexName:x.indexData.eventIndexName,children:(0,i.jsx)(u.Z,{hitsPerPage:5})}),(0,i.jsx)(c.Z,{indexName:x.indexData.fileIndexName,children:(0,i.jsx)(u.Z,{hitsPerPage:5,attributesToRetrieve:["objectID","file.name","file.type","file.size","file.dateCreated","libraryFolderId","libraryId","scope","displayName","author","bodyPlainText",x.indexData.memberIndexViewableField]})}),(0,i.jsx)(c.Z,{indexName:x.indexData.postIndexName,children:(0,i.jsx)(u.Z,{hitsPerPage:5,attributesToRetrieve:["displayName","authorId","profilePictureUrl","postType","title","bodyPlainText","datePublished","numComments","reactionCount","organization","group","blog","poll","question","answer","post",x.indexData.memberIndexViewableField]})}),(0,i.jsx)(s.hU,{"aria-label":"Search",icon:(0,i.jsx)(p.W1M,{}),variant:"outline",colorScheme:"gray",isRound:!0,onClick:v.onOpen}),(0,i.jsx)(GlobalSearchModal,{isOpen:v.isOpen,onClose:v.onClose})]}):(0,i.jsx)(o.u,{label:"Your device is unable to connect to search service",isDisabled:f.loading,children:(0,i.jsx)(s.hU,{"aria-label":"Search",icon:(0,i.jsx)(p.W1M,{}),variant:"outline",colorScheme:"gray",isRound:!0,isDisabled:!0})})}},60346:function(e,t,n){"use strict";n.d(t,{n:function(){return NewClientAvailable}});var i=n(85893),r=n(48641),o=n(47741),s=n(27484),l=n.n(s),a=n(84110),c=n.n(a),u=n(83608),d=n.n(u),m=n(67294),p=n(5678),h=n(73567),g=n(9669),x=n.n(g),f=n(84318),v=n.n(f),y=n(49517),b=n(83454);let j=v()(b.env.NEXT_PUBLIC_CLIENT_BUNDLE_VERSION_POLLING_ENABLED),useNewClientIsAvailable=()=>{let[e,t]=m.useState(!1);return m.useEffect(()=>{if(j){let e=setInterval(async()=>{let e="/version.txt";try{let n=await x().get(e,{responseType:"text"}),i=await n.data;i?i.trim()!=="1".trim()?((0,y.PN)("Detected new client bundle. This version ".concat("1".trim()," and detected version: ").concat(i.trim())),t(!0)):t(!1):(0,y.KE)("Detected falsey client bundle version: ".concat(i,". url: ").concat(e))}catch(t){(0,y.PN)("Error occurred while polling for new client bundle.url ".concat(e)),(0,y.H)(t)}},3e5);return()=>clearInterval(e)}},[]),{newClientIsAvailable:e}};l().extend(c());let NewClientAlert=e=>{let t=m.useRef(l()().add(1,"hour").add(d()(45),"minute").toDate()),[n,s]=m.useState(()=>l()().to(t.current));return(0,p.Yz)(()=>
1{l()().isAfter(t.current)?window.location.reload():s(l()().to(t.current))},1e3),(0,i.jsxs)(r.Kq,{p:"4",spacing:"4",direction:{base:"column",md:"row"},shadow:"base",bg:"white",...e,children:[(0,i.jsxs)(r.xv,{flex:"1",children:[(0,i.jsx)(h.n,{children:"A new version of the site is available."})," You can manually refresh the page or let it automatically refresh ",n,"."]}),(0,i.jsx)(o.zx,{variant:"outline",flexShrink:"0",size:"xs",colorScheme:"gray",onClick:()=>{window.location.reload()},children:"Refresh Page"})]})},NewClientAvailable=e=>{let{newClientIsAvailable:t}=useNewClientIsAvailable();return t?(0,i.jsx)(NewClientAlert,{...e}):null}},95695:function(e,t,n){"use strict";n.d(t,{L:function(){return o}});var i=n(82729),r=n(50456);function _templateObject(){let e=(0,i._)(['\n  fragment PreviewRenderer_VersionFileFragment on VersionFile {\n    _id\n    file {\n      _id\n      name\n      url\n      type\n      imageProxy(input: {})\n    }\n    dateCreated\n    originalPost {\n      _id\n    }\n    originalComment {\n      _id\n    }\n    author {\n      _id\n      displayName\n      proxyProfilePictureUrl(\n        input: { w: 40, h: 40, fit: "facearea", facepad: 10.0 }\n      )\n    }\n  }\n']);return _templateObject=function(){return e},e}let o=(0,r.Ps)(_templateObject())},91143:function(e,t,n){"use strict";n.d(t,{c:function(){return o}});var i=n(82729),r=n(50456);function _templateObject(){let e=(0,i._)(["\n  fragment RawDraftContentStateFragment on DraftJS_ContentState {\n    blocks {\n      key\n      text\n      type\n      depth\n      inlineStyleRanges {\n        offset\n        length\n        style\n        __typename\n      }\n      entityRanges {\n        offset\n        length\n        key\n        __typename\n      }\n    }\n    entityMap {\n      type\n      mutability\n      data {\n        ... on DraftJS_ContentState_Entity_Data_LinkData {\n          explicit\n          url\n          targetOption\n          hideLinkPreview\n          __typename\n        }\n        ... on DraftJS_ContentState_Entity_Data_MentionData {\n          mention {\n            userId\n            user {\n              displayName\n              __typename\n            }\n            userCanView\n            __typename\n          }\n          __typename\n        }\n        ... on DraftJS_ContentState_Entity_Data_ImageData {\n          src\n          alt\n          height\n          width\n          alignment\n          __typename\n        }\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n"]);return _templateObject=function(){return e},e}let o=(0,r.Ps)(_templateObject())},71076:function(e,t,n){"use strict";n.d(t,{T:function(){return useElementHeight}});var i=n(67294);let useElementHeight=()=>{let e=i.useRef(null),[t,n]=i.useState(0);return i.useEffect(()=>{let t=new ResizeObserver(e=>{let t=e[0].borderBoxSize?e[0].borderBoxSize[0].blockSize:e[0].contentRect.height;n(t)});return e.current&&t.observe(e.current),()=>{t.disconnect()}},[]),{ref:e,height:t}}},85101:function(e,t,n){"use strict";n.d(t,{R:function(){return useIntutoLearningNavVisible}});var i=n(82729),r=n(50456),o=n(37887),s=n(47503);function _templateObject(){let e=(0,i._)(["\n  query IntutoLearningNavVisible_Query {\n    intutoIntegrationGetStatus {\n      status\n    }\n  }\n"]);return _templateObject=function(){return e},e}let l=(0,r.Ps)(_templateObject());function useIntutoLearningNavVisible(){var e;let{data:t,loading:n}=(0,o.a)(l,{fetchPolicy:"cache-and-network"}),i=null==t?void 0:null===(e=t.intutoIntegrationGetStatus)||void 0===e?void 0:e.status,r=i===s.aH.INITIALIZED;return{isVisible:r,isLoading:n&&null==i}}},8296:function(e,t,n){"use strict";n.d(t,{_:function(){return useKeyCommand}});var i=n(67294);let useKeyCommand=(e,t,n)=>{let r=i.useRef(n);i.useLayoutEffect(()=>{r.current=n});let o=i.useCallback(n=>{n[e]&&n.key===t&&r.current(n)},[e,t]);i.useEffect(()=>(document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)),[o])}},53897:function(e,t,n){"use strict";n.d(t,{X:function(){return useMemberLearningContextOnSimpleEventRoute}});var i=n(82729),r=n(50456),o=n(37887),s=n(11163),l=n(67294);
1function _templateObject(){let e=(0,i._)(["\n  query MemberLearningContextOnEventRoute_EventQuery($input: EventInput!) {\n    event(input: $input) {\n      eventV2 {\n        __typename\n        ... on SimpleEventV2 {\n          isCourseWorkshop\n        }\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let a=(0,r.Ps)(_templateObject()),useMemberLearningContextOnSimpleEventRoute=()=>{var e,t;let n=(0,s.useRouter)(),i=null!==(t=n.asPath.split("?")[0])&&void 0!==t?t:"",r="string"==typeof n.query.eventId?n.query.eventId:void 0,c=l.useMemo(()=>!(!r||i.startsWith("/events/conferences"))&&i.startsWith("/events/".concat(r)),[r,i]),u=(0,o.a)(a,{variables:{input:{_id:null!=r?r:""}},skip:!c||!r}),d=null===(e=u.data)||void 0===e?void 0:e.event.eventV2;return!!c&&!!r&&(null==d?void 0:d.__typename)==="SimpleEventV2"&&!0===d.isCourseWorkshop}},65442:function(e,t,n){"use strict";n.d(t,{P:function(){return CartNavLinkIconDisplay}});var i=n(85893),r=n(48641),o=n(47741),s=n(41664),l=n.n(s),a=n(11163),c=n(67294),u=n(27311),d=n(46320),m=n(47503);let CartNavLinkIconDisplay=()=>{let{itemCount:e=0,items:t=[]}=(0,d.j)();(0,a.useRouter)();let n=(0,c.useMemo)(()=>t.some(e=>e.type===m.Bb.MEMBERSHIP),[t]);return(0,i.jsxs)(r.xu,{position:"relative",children:[(0,i.jsx)(l(),{href:"/cart",passHref:!0,children:(0,i.jsx)(o.hU,{"aria-label":"Shopping Cart",icon:(0,i.jsx)(u.Q,{}),variant:"outline",colorScheme:"gray",isRound:!0})}),e>0&&(0,i.jsx)(r.Cd,{position:"absolute",top:-1,right:-1,size:4,backgroundColor:"red.600",zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",children:(0,i.jsx)(r.xv,{color:"white",fontSize:10,lineHeight:"1em",children:e>9?"9+":e})}),n&&(0,i.jsx)(r.Cd,{position:"absolute",bottom:-1,right:-1,size:3,backgroundColor:"purple.500",zIndex:2,border:"1.5px solid white",display:"flex",alignItems:"center",justifyContent:"center",children:(0,i.jsx)(r.xv,{color:"white",fontSize:8,lineHeight:"1em",fontWeight:"bold",children:"M"})})]})}},86398:function(e,t,n){"use strict";n.d(t,{A:function(){return ChatNavLinkIconDisplay}});var i=n(85893),r=n(48641),o=n(47741),s=n(11163);n(67294);var l=n(6491),a=n(74716);let ChatNavLinkIconDisplay=()=>{let e=(0,s.useRouter)(),{totalUnreadCount:t}=(0,a.y_)();return(0,i.jsxs)(r.xu,{position:"relative",children:[(0,i.jsx)(o.hU,{onClick:()=>e.push("/messages"),"aria-label":"Chat",icon:(0,i.jsx)(l.Bzd,{}),variant:"outline",colorScheme:"gray",isRound:!0}),t>0?(0,i.jsx)(r.Cd,{position:"absolute",top:-1,right:-1,size:4,backgroundColor:"red.600",display:"flex",alignItems:"center",justifyContent:"center",children:(0,i.jsx)(r.xv,{color:"white",fontSize:10,lineHeight:"1em",children:t>9?"9+":t})}):null]})}},93548:function(e,t,n){"use strict";n.d(t,{s:function(){return ActivityGroupMultiAvatar}});var i,r,o=n(85893),s=n(48641);n(67294);var l=n(6491),a=n(9879),c=n(3812);let ActorAvatar=e=>{let{actor:t,...n}=e;return(0,o.jsx)(c.qE,{src:t.proxyProfilePictureUrl||void 0,name:t.displayName,...n})};var u=n(52494);let d=new Map([[a.T.POST_LIKE,l.lbB],[a.T.COMMENT_LIKE,l.lbB],[a.T.PARENT_POST_COMMENT,l.NJ3],[a.T.PARENT_COMMENT_COMMENT,l.NJ3],[a.T.SIBLING_COMMENT,l.NJ3],[a.T.QUESTION_ANSWER,l.NJ3],[a.T.COMMENT_AT_MENTION,l.KmJ],[a.T.POST_AT_MENTION,l.KmJ],[a.T.POLL_VOTE,l.HQu]]),NotificationIcon=e=>{let{enrichedActivityGroup:t}=e;return(0,o.jsx)(u.JO,{as:d.get(t.activityGroupType),boxSize:4,margin:"0 auto",strokeWidth:"1.5"})};(i=r||(r={})).AT_MENTION="AT_MENTION",i.LIKE="LIKE",i.COMMENT="COMMENT",i.VOTE="VOTE";let ActivityGroupMultiAvatar=e=>{let{enrichedActivityGroup:t}=e;return(0,o.jsxs)(s.xu,{position:"relative",pr:4,pb:t.secondActor?2:0,children:[t.activityGroupType===a.T.POLL_VOTE?t.secondActor?(0,o.jsxs)(s.xu,{boxSize:16,position:"relative",children:[(0,o.jsx)(s.Cd,{backgroundColor:"primary.500",size:10,position:"absolute",top:0,left:0,boxShadow:"base",children:(0,o.jsx)(l.ngI,{boxSize:8,margin:"0 auto",strokeWidth:"1.5"})}),(0,o.jsx)(s.Cd,{backgroundColor:"primary.500",size:10,position:"absolute",bottom:0,right:0,boxShadow:"base",children:(0,o.jsx)(l.ngI,{boxSize:8,margin:"0 auto",strokeWidth:"1.5"})})]}):(0,o.jsx)(s.xu,{boxSize:16,position:"relative",children:(0,o.jsx)(s.Cd,{backgroundColor:"primary.500",size:16,position:"absolute",boxShadow:"base",children:(0,o.jsx)(l.ngI,{boxSize:10,margin:"0 auto",strokeWidth:"1.5"})})}):t.secondActor?(0,o.jsxs)(s.xu,{boxSize:16,position:"relative",children:[(0,o.jsx)(ActorAvatar,{actor:t.firstActor,boxShadow:"base",boxSize:10,top:0,left:0,position:"absolute"}),(0,o.jsx)(ActorAvatar,{actor:t.secondActor,bottom:0,right:0,boxShadow:"base",position:"absolute",boxSize:10})]}):(0,o.jsx)(ActorAvatar,{actor:t.firstActor,boxShadow:"base",boxSize:16}),(0,o.jsx)(s.Cd,{backgroundColor:"white",size:8,bottom:0,right:0,position:"absolute",boxShadow:"base",children:(0,o.jsx)(NotificationIcon,{enrichedActivityGroup:t})})]})}},43929:function(e,t,n){"use strict";n.d(t,{b:function(){return ActivityGroupTextContent}});var i=n(85893);n(67294);var r=n(49517),o=n(9879),s=n(48641),l=n(73567);let CommentAtMentionTextContent=e=>{let{data:t,...n}=e;return(0,i.jsxs)(s.xv,{...n,children:[(0,i.jsx)(l.n,{children:t.firstActor.displayName})," ",t.numUniqueCommenters>1?"and ".concat(t.numUniqueCommenters-1," other").concat(t.numUniqueCommenters>2?"s":""," "):"","mentioned you in comment",(0,i.jsx)(l.n,{children:"".concat(t.comment.bodyPlainText?": ".concat(t.comment.bodyPlainText):"")})]})},CommentLikeTextContent=e=>{let{data:t,...n}=e;return(0,i.jsxs)(s.xv,{...n,children:[(0,i.jsx)(l.n,{children:t.firstActor.displayName})," ",t.numUniqueActors>1?"and ".concat(t.numUniqueActors-1," other").concat(t.numUniqueActors>2?"s":""," "):"","liked your comment",(0,i.jsx)(l.n,{children:"".concat(t.comment.bodyPlainText?": ".concat(t.comment.bodyPlainText):"")})]})},ParentCommentCommentTextContent=e=>{let{data:t,...n}=e;return(0,i.jsxs)(s.xv,{...n,children:[(0,i.jsx)(l.n,{children:t.firstActor.displayName})," ",t.numUniqueCommenters>1?"and ".concat(t.numUniqueCommenters-1," other").concat(t.numUniqueCommenters>2?"s":""," "):"","replied to your comment",(0,i.jsx)(l.n,{children:"".concat(t.comment.bodyPlainText?": ".concat(t.comment.bodyPlainText):"")})]})};var a=n(13781);let ParentPostCommentTextContent=e=>{let{data:t,...n}=e,r=(0,a.Cf)(t.post);return(0,i.jsxs)(s.xv,{...n,children:[(0,i.jsx)(l.n,{children:t.firstActor.displayName})," ",t.numUniqueCommenters>1?"and ".concat(t.numUniqueCommenters-1," other").concat(t.numUniqueCommenters>
12?"s":""," "):"","commented on your ",(0,a.Aj)(t.postType),(0,i.jsx)(l.n,{children:"".concat(r?": ".concat(r):"")})]})},PollVoteTextContent=e=>{let{data:t,...n}=e,r=(0,a.Cf)(t.post);return(0,i.jsxs)(s.xv,{...n,children:[t.numUniqueActors>1?"".concat(t.numUniqueActors," people "):"Someone ","voted on your poll",(0,i.jsx)(l.n,{children:"".concat(r?": ".concat(r):"")})]})},PostAtMentionTextContent=e=>{let{data:t,...n}=e,r=(0,a.Cf)(t.post);return(0,i.jsxs)(s.xv,{...n,children:[(0,i.jsx)(l.n,{children:t.firstActor.displayName})," ",t.numUniquePosters>1?"and ".concat(t.numUniquePosters-1," other").concat(t.numUniquePosters>2?"s":""," "):"","mentioned you in ",(0,a.Aj)(t.postType),(0,i.jsx)(l.n,{children:"".concat(r?": ".concat(r):"")})]})},PostLikeTextContent=e=>{let{data:t,...n}=e,r=(0,a.Cf)(t.post);return(0,i.jsxs)(s.xv,{...n,children:[(0,i.jsx)(l.n,{children:t.firstActor.displayName})," ",t.numUniqueActors>1?"and ".concat(t.numUniqueActors-1," other").concat(t.numUniqueActors>2?"s":""," "):"","liked your ",(0,a.Aj)(t.postType),(0,i.jsx)(l.n,{children:"".concat(r?": ".concat(r):"")})]})},QuestionAnswerTextContent=e=>{let{data:t,...n}=e,r=(0,a.Cf)(t.post);return(0,i.jsxs)(s.xv,{...n,children:[(0,i.jsx)(l.n,{children:t.firstActor.displayName})," ",t.numUniqueActors>1?"and ".concat(t.numUniqueActors-1," other").concat(t.numUniqueActors>2?"s":""," "):"","answered your question",(0,i.jsx)(l.n,{children:"".concat(r?": ".concat(r):"")})]})},SiblingCommentTextContent=e=>{let{data:t,...n}=e;return(0,i.jsxs)(s.xv,{...n,children:[(0,i.jsx)(l.n,{children:t.firstActor.displayName})," ",t.numUniqueCommenters>1?"and ".concat(t.numUniqueCommenters-1," other").concat(t.numUniqueCommenters>2?"s":""," "):"","replied to your comment"]})},ActivityGroupTextContent=e=>{let{enrichedActivityGroup:t,...n}=e;switch(t.activityGroupType){case o.T.POST_LIKE:return(0,i.jsx)(PostLikeTextContent,{data:t,...n});case o.T.PARENT_POST_COMMENT:return(0,i.jsx)(ParentPostCommentTextContent,{data:t,...n});case o.T.PARENT_COMMENT_COMMENT:return(0,i.jsx)(ParentCommentCommentTextContent,{data:t,...n});case o.T.SIBLING_COMMENT:return(0,i.jsx)(SiblingCommentTextContent,{data:t,...n});case o.T.COMMENT_AT_MENTION:return(0,i.jsx)(CommentAtMentionTextContent,{data:t,...n});case o.T.POST_AT_MENTION:return(0,i.jsx)(PostAtMentionTextContent,{data:t,...n});case o.T.QUESTION_ANSWER:return(0,i.jsx)(QuestionAnswerTextContent,{data:t,...n});case o.T.COMMENT_LIKE:return(0,i.jsx)(CommentLikeTextContent,{data:t,...n});case o.T.POLL_VOTE:return(0,i.jsx)(PollVoteTextContent,{data:t,...n});default:return(0,r.US)("Could not get valid activity group type from activity group ".concat(JSON.stringify(t))),null}}},9879:function(e,t,n){"use strict";var i,r,o,s;n.d(t,{T:function(){return r},Y:function(){return i}}),(o=i||(i={})).POST="POST",o.ANSWER="ANSWER",o.POLL="POLL",o.BLOG="BLOG",o.QUESTION="QUESTION",o.EVENT_ALERT="EVENT_ALERT",(s=r||(r={})).POST_LIKE="POST_LIKE",s.PARENT_POST_COMMENT="PARENT_POST_COMMENT",s.PARENT_COMMENT_COMMENT="PARENT_COMMENT_COMMENT",s.SIBLING_COMMENT="SIBLING_COMMENT",s.COMMENT_AT_MENTION="COMMENT_AT_MENTION",s.POST_AT_MENTION="POST_AT_MENTION",s.QUESTION_ANSWER="QUESTION_ANSWER",s.COMMENT_LIKE="COMMENT_LIKE",s.POLL_VOTE="POLL_VOTE"},13781:function(e,t,n){"use strict";n.d(t,{Aj:function(){return getPostTypeReadableName},Cf:function(){return getTextContentForPost},Dg:function(){return collectEntityIdsFromActivityGroup},_t:function(){return stitchEntitiesWithActivityGroup},uJ:function(){return getClickHandlerForActivityGroup}});var i=n(9041),r=n(80129),o=n.n(r),s=n(49517),l=n(9879);let getPostTypeFromPost=e=>{var t,n,i,r;let o=(null===(t=e.blog)||void 0===t?void 0:t._id)?l.Y.BLOG:(null===(n=e.poll)||void 0===n?void 0:n._id)?l.Y.POLL:(null===(i=e.question)||void 0===i?void 0:i._id)?l.Y.QUESTION:(null===(r=e.answer)||void 0===r?void 0:r._id)?l.Y.ANSWER:e.eventAlertId?l.Y.EVENT_ALERT:l.Y.POST;return o},getPostTypeReadableName=e=>{switch(e){case l.Y.ANSWER:return"answer";case l.Y.QUESTION:return"question";case l.Y.POST:return"post";case l.Y.BLOG:return"article";case l.Y.POLL:return"poll";case l.Y.EVENT_ALERT:return"event"}},getTextContentForPost=e=>{var t,n,r,o,s,a;let c=getPostTypeFromPost(e);switch(c){case l.Y.ANSWER:return(null===(t=e.answer)||void 0===t?void 0:t.body)?(0,i.c
1onvertFromRaw)(e.answer.body).getPlainText():null;case l.Y.QUESTION:return(null===(n=e.question)||void 0===n?void 0:n.title)||((null===(r=e.question)||void 0===r?void 0:r.body)?(0,i.convertFromRaw)(e.question.body).getPlainText():null);case l.Y.POST:return e.title||e.bodyPlainText||null;case l.Y.BLOG:return(null===(o=e.blog)||void 0===o?void 0:o.title)||null;case l.Y.POLL:return(null===(s=e.poll)||void 0===s?void 0:s.title)||((null===(a=e.poll)||void 0===a?void 0:a.descriptionContentState)?(0,i.convertFromRaw)(e.poll.descriptionContentState).getPlainText():null);case l.Y.EVENT_ALERT:return null}},getIdDetenantifier=e=>t=>{let n=t.split("".concat(e).concat("-"))[1];if(!n)throw Error("Invalid tenanted id ".concat(t));return n},getActivityGroupTypeFromActivityGroup=e=>{let{group:t}=e,n=t.split(":")[0];switch(n){case"PARENT_POST_COMMENT":return l.T.PARENT_POST_COMMENT;case"POST_LIKE":return l.T.POST_LIKE;case"PARENT_COMMENT_COMMENT":return l.T.PARENT_COMMENT_COMMENT;case"SIBLING_COMMENT":return l.T.SIBLING_COMMENT;case"COMMENT_AT_MENTION":return l.T.COMMENT_AT_MENTION;case"POST_AT_MENTION":return l.T.POST_AT_MENTION;case"QUESTION_ANSWER":return l.T.QUESTION_ANSWER;case"COMMENT_LIKE":return l.T.COMMENT_LIKE;case"POLL_VOTE":return l.T.POLL_VOTE;default:return(0,s.US)("Could not parse activity group type for ".concat(JSON.stringify(e))),null}},getClickHandlerForActivityGroup=(e,t,n)=>{switch(e.activityGroupType){case l.T.PARENT_POST_COMMENT:return getClickHandlerForParentPostComment(e,t,n);case l.T.PARENT_COMMENT_COMMENT:return getClickHandlerForParentCommentComment(e,t,n);case l.T.SIBLING_COMMENT:return getClickHandlerForSiblingComment(e,t,n);case l.T.COMMENT_AT_MENTION:return getClickHandlerForCommentAtMention(e,t,n);case l.T.POST_AT_MENTION:return getClickHandlerForPostAtMention(e,t,n);case l.T.POST_LIKE:return getClickHandlerForPostLike(e,t,n);case l.T.QUESTION_ANSWER:return getClickHandlerForQuestionAnswer(e,t,n);case l.T.COMMENT_LIKE:return getClickHandlerForCommentLike(e,t,n);case l.T.POLL_VOTE:return getClickHandlerForPollVote(e,t,n);default:return()=>{}}},getPostUrl=e=>{var t,n,i,r,o;let s=!!(null===(t=e.group)||void 0===t?void 0:t._id),l=s?"/community/post/".concat(e._id):"/post/".concat(e._id),a=(null===(n=e.blog)||void 0===n?void 0:n._id)?"/blog/".concat(e.blog._id):(null===(i=e.poll)||void 0===i?void 0:i._id)?"/poll/".concat(e.poll._id):(null===(r=e.question)||void 0===r?void 0:r._id)?"/question/".concat(e.question._id):(null===(o=e.answer)||void 0===o?void 0:o._id)?"/question/".concat(e.answer.questionId):l;return a},getClickHandlerForPollVote=(e,t,n)=>{var i;let r="/poll/".concat(null===(i=e.post.poll)||void 0===i?void 0:i._id);return()=>{t.evict({id:t.identify(e.post)}),t.gc(),n.push(r)}},getClickHandlerForQuestionAnswer=(e,t,n)=>{var i;let r="/question/".concat(null===(i=e.post.question)||void 0===i?void 0:i._id);return()=>{t.evict({id:t.identify(e.post)}),t.gc(),n.push(r)}},getClickHandlerForParentPostComment=(e,t,n)=>{let i={comment:e.mostRecentComment._id},r="".concat(getPostUrl(e.post),"?").concat(o().stringify(i));return()=>{t.evict({id:t.identify(e.post)}),t.gc(),n.push(r)}},getClickHandlerForParentCommentComment=(e,t,n)=>{let i={comment:e.mostRecentComment._id},r="".concat(getPostUrl(e.parentPost),"?").concat(o().stringify(i));return()=>{t.evict({id:t.identify(e.parentPost)}),t.gc(),n.push(r)}},getClickHandlerForSiblingComment=(e,t,n)=>{let i={comment:e.mostRecentComment._id},r="".concat(getPostUrl(e.parentPost),"?").concat(o().stringify(i));return()=>{t.evict({id:t.identify(e.parentPost)}),t.gc(),n.push(r)}},getClickHandlerForCommentAtMention=(e,t,n)=>{let i={comment:e.mostRecentComment._id},r="".concat(getPostUrl(e.parentPost),"?").concat(o().stringify(i));return()=>{t.evict({id:t.identify(e.parentPost)}),t.gc(),n.push(r)}},getClickHandlerForPostAtMention=(e,t,n)=>{let i="".concat(getPostUrl(e.post));return()=>{n.push(i)}},getClickHandlerForPostLike=(e,t,n)=>{let i="".concat(getPostUrl(e.post));return()=>{n.push(i)}},getClickHandlerForCommentLike=(e,t,n)=>{if(!e.comment.post)return()=>{};let i={comment:e.comment._id},r="".concat(getPostUrl(e.comment.post),"?").concat(o().stringify(i));return()=>{n.push(r)}},collectEntityIdsFromActivityGroup=(e,t)=>{let n=getActivityGroupTypeFromActivityGroup(e);switch(n){case l.T.PARENT_POST_COMMENT:return collectEntityIdsForParentPostComment(e,t);case l.T.PARENT_COMMENT_COMMENT:return collectEntityIdsForParentCommentComment(e,t);case l.T.SIBLING_COMMENT:return collectEntityIdsForSiblingComment(e,t);case l.T.COMMENT_AT_MENTION:return collectEntityIdsForCommentAtMention(e,t);case l.T.POST_AT_MENTION:return collectEntityIdsForPostAtMention(e,t);case l.T.POST_LIKE:return collectEntityIdsForPostLike(e,t);case l.T.QUESTION_ANSWER:return collectEntityIdsForQuestionAnswer(e,t);case l.T.COMMENT_LIKE:return collectEntityIdsForCommentLike(e,t);case l.T.POLL_VOTE:return collectEntityIdsForPollVote(e,t);default:return{userIds:[],postIds:[],commentIds:[]}}},collectEntityIdsForPostLike=(e,t)=>{let n=getIdDetenantifier(t),i=e.group.split("".concat(l.T.POST_LIKE,":"))[1],r=null==i?void 0:i.split(":")[0];if(!r)return{userIds:[],postIds:[],commentIds:[]};let o=n(r),s=[...new Set(e.activities.map(e=>n(e.actor.id)))],a=s.slice(0,2);return{userIds:a,postIds:[o],commentIds:[]}},collectEntityIdsForParentPostComment=(e,t)=>
1{let n=getIdDetenantifier(t),i=e.group.split("".concat(l.T.PARENT_POST_COMMENT,":"))[1],r=null==i?void 0:i.split(":")[0];if(!r)return{userIds:[],postIds:[],commentIds:[]};let o=n(r),s=[...new Set(e.activities.map(e=>n(e.actor)))],a=s.slice(0,2),c=e.activities[0],u=n(c.foreign_id);return{userIds:a,postIds:[o],commentIds:[u]}},collectEntityIdsForParentCommentComment=(e,t)=>{let n=getIdDetenantifier(t),i=e.group.split("".concat(l.T.PARENT_COMMENT_COMMENT,":"))[1],r=null==i?void 0:i.split(":")[0];if(!r)return{userIds:[],postIds:[],commentIds:[]};let o=n(r),s=[...new Set(e.activities.map(e=>n(e.actor)))],a=s.slice(0,2),c=e.activities[0],u=n(c.foreign_id),d=n(c.parent_post_id);return{userIds:a,postIds:[d],commentIds:[o,u]}},collectEntityIdsForSiblingComment=(e,t)=>{let n=getIdDetenantifier(t),i=e.group.split("".concat(l.T.SIBLING_COMMENT,":"))[1],r=null==i?void 0:i.split(":")[0];if(!r)return{userIds:[],postIds:[],commentIds:[]};let o=n(r),s=[...new Set(e.activities.map(e=>n(e.actor)))],a=s.slice(0,2),c=e.activities[0],u=n(c.foreign_id);return{userIds:a,postIds:[o],commentIds:[u]}},collectEntityIdsForCommentAtMention=(e,t)=>{let n=getIdDetenantifier(t),i=e.group.split("".concat(l.T.COMMENT_AT_MENTION,":"))[1],r=null==i?void 0:i.split(":")[0];if(!r)return{userIds:[],postIds:[],commentIds:[]};let o=n(r),s=[...new Set(e.activities.map(e=>n(e.actor)))],a=s.slice(0,2),c=e.activities[0],u=n(c.foreign_id),d=n(c.parent_post_id);return{userIds:a,postIds:[d],commentIds:[o,u]}},collectEntityIdsForPostAtMention=(e,t)=>{let n=getIdDetenantifier(t),i=e.group.split("".concat(l.T.POST_AT_MENTION,":"))[1],r=null==i?void 0:i.split(":")[0];if(!r)return{userIds:[],postIds:[],commentIds:[]};let o=n(r),s=[...new Set(e.activities.map(e=>n(e.actor)))],a=s.slice(0,2);return{userIds:a,postIds:[o],commentIds:[]}},collectEntityIdsForQuestionAnswer=(e,t)=>{let n=getIdDetenantifier(t),i=e.group.split("".concat(l.T.QUESTION_ANSWER,":"))[1],r=null==i?void 0:i.split(":")[0];if(!r)return{userIds:[],postIds:[],commentIds:[]};let o=n(r),s=[...new Set(e.activities.map(e=>n(e.actor)))],a=s.slice(0,2),c=e.activities[0],u=n(c.foreign_id);return{userIds:a,postIds:[o,u],commentIds:[]}},collectEntityIdsForCommentLike=(e,t)=>{let n=getIdDetenantifier(t),i=e.group.split("".concat(l.T.COMMENT_LIKE,":"))[1],r=null==i?void 0:i.split(":")[0];if(!r)return{userIds:[],postIds:[],commentIds:[]};let o=n(r),s=[...new Set(e.activities.map(e=>n(e.actor.id)))],a=s.slice(0,2);return{userIds:a,postIds:[],commentIds:[o]}},collectEntityIdsForPollVote=(e,t)=>{let n=getIdDetenantifier(t),i=e.group.split("".concat(l.T.POLL_VOTE,":"))[1],r=null==i?void 0:i.split(":")[0];if(!r)return{userIds:[],postIds:[],commentIds:[]};let o=n(r);return{userIds:[],postIds:[o],commentIds:[]}},stitchEntitiesWithActivityGroup=e=>{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getActivityGroupTypeFromActivityGroup(t);switch(r){case l.T.PARENT_POST_COMMENT:return stitchEntitiesWithParentPostComment({activityGroup:t,tenantId:n,entityIdsToEntities:i});case l.T.PARENT_COMMENT_COMMENT:return stitchEntitiesWithParentCommentComment({activityGroup:t,tenantId:n,entityIdsToEntities:i});case l.T.SIBLING_COMMENT:return stitchEntitiesWithSiblingComment({activityGroup:t,tenantId:n,entityIdsToEntities:i});case l.T.COMMENT_AT_MENTION:return stitchEntitiesWithCommentAtMention({activityGroup:t,tenantId:n,entityIdsToEntities:i});case l.T.POST_AT_MENTION:return stitchEntitiesWithPostAtMention({activityGroup:t,tenantId:n,entityIdsToEntities:i});case l.T.QUESTION_ANSWER:return stitchEntitiesWithQuestionAnswer({activityGroup:t,tenantId:n,entityIdsToEntities:i});case l.T.POST_LIKE:return stitchEntitiesWithPostLike({activityGroup:t,tenantId:n,entityIdsToEntities:i});case l.T.COMMENT_LIKE:return stitchEntitiesWithCommentLike({activityGroup:t,tenantId:n,entityIdsToEntities:i});case l.T.POLL_VOTE:return stitchEntitiesWithPollVote({activityGroup:t,tenantId:n,entityIdsToEntities:i});default:return null}},stitchEntitiesWithParentPostComment=e=>{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getIdDetenantifier(n),o=t.group.split("".concat(l.T.PARENT_POST_COMMENT,":"))[1],s=null==o?void 0:o.split(":")[0];if(!s)return null;let a=r(s),c=i.posts[a],u=[...new Set(t.activities.map(e=>i.users[r(e.actor)]).filter(e=>!!e))],d=u.length,m=u.slice(0,2),p=t.activities[0],h=r(p.foreign_id),g=i.comments[h];return c&&0!==m.length&&g?{post:c,postType:getPostTypeFromPost(c),numUniqueCommenters:d,firstActor:m[0],secondActor:m[1],activityGroupType:l.T.PARENT_POST_COMMENT,activity_count:t.activity_count,is_read:t.is_read,is_seen:t.is_seen,id:t.id,updated_at:t.updated_at,mostRecentComment:g}:null},stitchEntitiesWithParentCommentComment=e=>
1{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getIdDetenantifier(n),o=t.group.split("".concat(l.T.PARENT_COMMENT_COMMENT,":"))[1],s=null==o?void 0:o.split(":")[0];if(!s)return null;let a=r(s),c=i.comments[a],u=[...new Set(t.activities.map(e=>i.users[r(e.actor)]).filter(e=>!!e))],d=u.length,m=u.slice(0,2),p=t.activities[0],h=r(p.foreign_id),g=r(p.parent_post_id),x=i.comments[h],f=i.posts[g];return c&&0!==m.length&&x&&f?{comment:c,numUniqueCommenters:d,firstActor:m[0],secondActor:m[1],activityGroupType:l.T.PARENT_COMMENT_COMMENT,activity_count:t.activity_count,is_read:t.is_read,is_seen:t.is_seen,id:t.id,updated_at:t.updated_at,mostRecentComment:x,parentPost:f}:null},stitchEntitiesWithSiblingComment=e=>{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getIdDetenantifier(n),o=t.group.split("".concat(l.T.SIBLING_COMMENT,":"))[1],s=null==o?void 0:o.split(":")[0];if(!s)return null;let a=r(s),c=[...new Set(t.activities.map(e=>i.users[r(e.actor)]).filter(e=>!!e))],u=c.length,d=c.slice(0,2),m=t.activities[0],p=r(m.foreign_id),h=i.comments[p],g=i.posts[a];return 0!==d.length&&h&&g?{numUniqueCommenters:u,firstActor:d[0],secondActor:d[1],activityGroupType:l.T.SIBLING_COMMENT,activity_count:t.activity_count,is_read:t.is_read,is_seen:t.is_seen,id:t.id,updated_at:t.updated_at,mostRecentComment:h,parentPost:g}:null},stitchEntitiesWithCommentAtMention=e=>{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getIdDetenantifier(n),o=t.group.split("".concat(l.T.COMMENT_AT_MENTION,":"))[1],s=null==o?void 0:o.split(":")[0];if(!s)return null;let a=r(s),c=i.comments[a],u=[...new Set(t.activities.map(e=>i.users[r(e.actor)]).filter(e=>!!e))],d=u.length,m=u.slice(0,2),p=t.activities[0],h=r(p.foreign_id),g=r(p.parent_post_id),x=i.comments[h],f=i.posts[g];return 0!==m.length&&c&&f&&x?{numUniqueCommenters:d,comment:c,firstActor:m[0],secondActor:m[1],activityGroupType:l.T.COMMENT_AT_MENTION,activity_count:t.activity_count,is_read:t.is_read,is_seen:t.is_seen,id:t.id,updated_at:t.updated_at,mostRecentComment:x,parentPost:f}:null},stitchEntitiesWithPostAtMention=e=>{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getIdDetenantifier(n),o=t.group.split("".concat(l.T.POST_AT_MENTION,":"))[1],s=null==o?void 0:o.split(":")[0];if(!s)return null;let a=r(s),c=i.posts[a],u=[...new Set(t.activities.map(e=>i.users[r(e.actor)]).filter(e=>!!e))],d=u.length,m=u.slice(0,2);return 0!==m.length&&c?{numUniquePosters:d,post:c,firstActor:m[0],secondActor:m[1],activityGroupType:l.T.POST_AT_MENTION,postType:getPostTypeFromPost(c),activity_count:t.activity_count,is_read:t.is_read,is_seen:t.is_seen,id:t.id,updated_at:t.updated_at}:null},stitchEntitiesWithQuestionAnswer=e=>{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getIdDetenantifier(n),o=t.group.split("".concat(l.T.QUESTION_ANSWER,":"))[1],s=null==o?void 0:o.split(":")[0];if(!s)return null;let a=r(s),c=i.posts[a],u=[...new Set(t.activities.map(e=>i.users[r(e.actor)]).filter(e=>!!e))],d=u.length,m=u.slice(0,2),p=t.activities[0],h=r(p.foreign_id),g=i.posts[h];return 0!==m.length&&c&&g?{numUniqueActors:d,post:c,firstActor:m[0],secondActor:m[1],activityGroupType:l.T.QUESTION_ANSWER,activity_count:t.activity_count,is_read:t.is_read,is_seen:t.is_seen,id:t.id,updated_at:t.updated_at,mostRecentAnswer:g}:null},stitchEntitiesWithPostLike=e=>{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getIdDetenantifier(n),o=t.group.split("".concat(l.T.POST_LIKE,":"))[1],s=null==o?void 0:o.split(":")[0];if(!s)return null;let a=r(s),c=i.posts[a],u=[...new Set(t.activities.map(e=>i.users[r(e.actor.id)]).filter(e=>!!e))],d=u.length,m=u.slice(0,2);return 0!==m.length&&c?{numUniqueActors:d,post:c,firstActor:m[0],secondActor:m[1],activityGroupType:l.T.POST_LIKE,postType:getPostTypeFromPost(c),activity_count:t.activity_count,is_read:t.is_read,is_seen:t.is_seen,id:t.id,updated_at:t.updated_at}:null},stitchEntitiesWithCommentLike=e=>{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getIdDetenantifier(n),o=t.group.split("".concat(l.T.COMMENT_LIKE,":"))[1],s=null==o?void 0:o.split(":")[0];if(!s)return null;let a=r(s),c=i.comments[a],u=[...new Set(t.activities.map(e=>i.users[r(e.actor.id)]).filter(e=>!!e))],d=u.length,m=u.slice(0,2);return 0!==m.length&&c?{numUniqueActors:d,comment:c,firstActor:m[0],secondActor:m[1],activityGroupType:l.T.COMMENT_LIKE,activity_count:t.activity_count,is_read:t.is_read,is_seen:t.is_seen,id:t.id,updated_at:t.updated_at}:null},stitchEntitiesWithPollVote=e=>
1{let{activityGroup:t,tenantId:n,entityIdsToEntities:i}=e,r=getIdDetenantifier(n),o=t.group.split("".concat(l.T.POLL_VOTE,":"))[1],s=null==o?void 0:o.split(":")[0];if(!s)return null;let a=r(s),c=i.posts[a],u=[...new Set(t.activities.map(e=>e.actor.id))],d=u.length;return c?{numUniqueActors:d,post:c,firstActor:{displayName:"?",_id:"",proxyProfilePictureUrl:null,__typename:"User"},secondActor:d>1?{displayName:"?",_id:"",proxyProfilePictureUrl:null,__typename:"User"}:void 0,activityGroupType:l.T.POLL_VOTE,activity_count:t.activity_count,is_read:t.is_read,is_seen:t.is_seen,id:t.id,updated_at:t.updated_at}:null}},78516:function(e,t,n){"use strict";n.d(t,{T:function(){return InAppSystemNotificationItem}});var i=n(85893),r=n(48641),o=n(27484),s=n.n(o),l=n(84110),a=n.n(l),c=n(70178),u=n.n(c),d=n(11163);n(67294);var m=n(73567),p=n(6491),h=n(3015);s().extend(a()),s().extend(u());let InAppSystemNotificationItem=e=>{let{notification:t,markRead:n}=e,o=(0,d.useRouter)(),l=t.type===h.S.GroupAccessPolicyPaused,a=l?p.Uhq:p.Iyk,c=t.dateCreated?s().utc(t.dateCreated):null,onClick=async()=>{await n(t._id),t.groupId&&o.push("/community/groups/".concat(t.groupId,"/activity"))},u=t.groupName&&t.body.includes(t.groupName)?(0,i.jsxs)(r.xv,{noOfLines:2,children:[t.body.split(t.groupName)[0],(0,i.jsx)(m.n,{children:t.groupName}),t.body.split(t.groupName)[1]]}):(0,i.jsx)(r.xv,{noOfLines:2,children:t.body});return(0,i.jsx)(r.xu,{as:"button",textAlign:"left",px:"4",py:"2",backgroundColor:t.isRead?"white":"primary.50",onClick:onClick,w:"full",borderRadius:"lg",children:(0,i.jsxs)(r.Ug,{children:[(0,i.jsx)(r.Cd,{backgroundColor:"primary.500",size:16,boxShadow:"base",children:(0,i.jsx)(a,{boxSize:8,color:"white",strokeWidth:"1.5"})}),(0,i.jsxs)(r.xu,{ml:"4",children:[(0,i.jsx)(r.xu,{children:u}),c?(0,i.jsx)(r.xu,{children:(0,i.jsx)(r.xv,{textStyle:"detail",children:(0,i.jsx)("time",{dateTime:c.toISOString(),children:c.fromNow()})})}):null]})]})})}},98530:function(e,t,n){"use strict";n.d(t,{j:function(){return InAppNotificationDropdown}});var i=n(85893),r=n(48641),o=n(47741),s=n(82415),l=n(90195),a=n(41664),c=n.n(a),u=n(11163),d=n(67294),m=n(14314),p=n(45893),h=n(69171),g=n(6491),x=n(8183),f=n(3806),v=n(77429),y=n(3015),b=n(78736),j=n(78516),_=n(66252),I=n(27484),T=n.n(I),S=n(84110),N=n.n(S),C=n(70178),A=n.n(C),O=n(43929),w=n(93548),E=n(13781);T().extend(N()),T().extend(A());let InAppNotificationDropdownItem=e=>{let{enrichedActivityGroup:t,markRead:n}=e,o=(0,u.useRouter)(),s=(0,_.x)(),l=(0,E.uJ)(t,s.cache,o),onClick=async()=>{await n(),l()},a=T().utc(t.updated_at);return(0,i.jsxs)(r.xu,{as:"button",textAlign:"left",px:"4",py:"2",backgroundColor:t.is_read?"
1white":"primary.50",onClick:onClick,w:"full",borderRadius:"lg",children:[(0,i.jsxs)(r.Ug,{children:[(0,i.jsx)(w.s,{enrichedActivityGroup:t}),(0,i.jsxs)(r.xu,{ml:"4",children:[(0,i.jsx)(r.xu,{children:(0,i.jsx)(O.b,{noOfLines:2,enrichedActivityGroup:t})}),(0,i.jsx)(r.xu,{children:(0,i.jsx)(r.xv,{textStyle:"detail",children:(0,i.jsx)("time",{dateTime:a.toISOString(),children:a.fromNow()})})})]})]}),e.children]})},NotificationList=e=>{let{items:t,loading:n,hasMore:s,newUpdates:l,onSeeNew:a,markSystemRead:u}=e;return(0,i.jsxs)(i.Fragment,{children:[l&&a&&(0,i.jsx)(r.xu,{position:"absolute",width:"100%",display:"flex",placeContent:"center",children:(0,i.jsx)(o.zx,{borderRadius:"full",mt:"8",onClick:a,children:"See New Notifications"})}),t.length>0?(0,i.jsx)(r.Kq,{children:t.map(e=>"system"===e.kind?(0,i.jsx)(j.T,{notification:e.notification,markRead:u},e.id):(0,i.jsx)(InAppNotificationDropdownItem,{enrichedActivityGroup:e.streamItem.enrichedActivityGroup,markRead:e.streamItem.markRead},e.id))}):n?(0,i.jsx)(h.g,{}):(0,i.jsxs)(r.xu,{py:"4",px:"16",role:"menuitem",children:["There ","aren't"," any notifications for you yet."]}),n&&t.length>0&&(0,i.jsx)(h.g,{}),s&&!n&&(0,i.jsx)(r.M5,{p:"4",children:(0,i.jsx)(r.rU,{as:c(),href:"/notifications",children:"View More"})})]})},NotificationBell=e=>{let{isOpen:t,onOpen:n,onClose:l,unseenCount:a,children:c}=e;return(0,i.jsx)(r.xu,{children:(0,i.jsxs)(s.J2,{isOpen:t,onClose:l,isLazy:!0,placement:"bottom-end",children:[(0,i.jsxs)(r.xu,{position:"relative",children:[(0,i.jsx)(s.xo,{children:(0,i.jsx)(o.hU,{onClick:n,"aria-label":"Notifications",icon:(0,i.jsx)(g.Dkj,{}),variant:"outline",colorScheme:"gray",isRound:!0})}),a>0?(0,i.jsx)(r.Cd,{position:"absolute",top:-1,right:-1,size:4,backgroundColor:"red.600",display:"flex",alignItems:"center",justifyContent:"center",children:(0,i.jsx)(r.xv,{color:"white",fontSize:10,lineHeight:"1em",children:a>9?"9+":a})}):null]}),(0,i.jsx)(s.yk,{maxWidth:"440px",maxHeight:"80vh",overflowY:"auto",borderRadius:"xl",children:(0,i.jsx)(m.ZP,{returnFocus:!0,persistentFocus:!1,children:(0,i.jsxs)(s.b,{children:[(0,i.jsx)(r.xv,{textStyle:"xlBodyStrong",p:"2",children:"Notifications"}),c]})})})]})})},DropdownWithStream=e=>{let{notificationFeed:t,tenantId:n}=e,r=(0,u.useRouter)(),o=(0,x.d)(),{isOpen:s,onOpen:a,onClose:c}=(0,l.qY)(),{loading:m,notificationItems:p,notificationsMetadata:h,resetNotifications:g,paginationOptions:f,newUpdates:j,clearNewUpdates:_,markNotificationsAsSeen:I}=(0,b.f)({tenantId:n,notificationFeed:t,notificationLimit:8,shouldRefetchNotificationsOnUpdate:!s}),{notifications:T,unseenCount:S,loading:N,hasMore:C,markRead:A,markAllSeen:O}=(0,y.W)({limit:20}),w=d.useCallback(()=>{c(),j&&(_(),g())},[c,_,g,j]),E=d.useCallback(()=>{o?r.push("/notifications"):(a(),I(),O())},[a,I,O,o,r]),P=d.useMemo(()=>(0,v.Z)({streamItems:p,systemNotifications:T}),[p,T]);return(0,i.jsx)(NotificationBell,{isOpen:s,onOpen:E,onClose:w,unseenCount:(h.numUnseen||0)+S,children:(0,i.jsx)(NotificationList,{items:P,loading:m||N,hasMore:f.hasNext||C,newUpdates:j,onSeeNew:()=>g(!0),markSystemRead:A})})},DropdownSystemOnly=()=>{let e=(0,u.useRouter)(),t=(0,x.d)(),{isOpen:n,onOpen:r,onClose:o}=(0,l.qY)(),{notifications:s,unseenCount:a,loading:c,hasMore:m,markRead:p,markAllSeen:h}=(0,y.W)({limit:20}),g=d.useCallback(()=>{t?e.push("/notifications"):(r(),h())},[r,h,t,e]),f=d.useMemo(()=>(0,v.Z)({streamItems:[],systemNotifications:s}),[s]);return(0,i.jsx)(NotificationBell,{isOpen:n,onOpen:g,onClose:o,unseenCount:a,children:(0,i.jsx)(NotificationList,{items:f,loading:c,hasMore:m,markSystemRead:p})})},InAppNotificationDropdown=()=>{var e;let t=(0,f.O)(),n=(0,p.x)(),r=(0,u.useRouter)(),s="/notifications"===r.pathname;return s?(0,i.jsx)(o.hU,{"aria-label":"Notifications",icon:(0,i.jsx)(g.Dkj,{}),variant:"outline",colorScheme:"gray",isRound:!0,disabled:!0}):(null===(e=n.tenant)||void 0===e?void 0:e._id)?(null==t?void 0:t.notificationFeed)?(0,i.jsx)(DropdownWithStream,{notificationFeed:t.notificationFeed,tenantId:n.tenant._id}):(0,i.jsx)(DropdownSystemOnly,{}):null}},77429:function(e,t,n){"use strict";n.d(t,{Z:function(){return mergeNotificationItems}});let mergeNotificationItems=e=>{let t=e.streamItems.map(e=>({kind:"stream",id:e.enrichedActivityGroup.id,date:e.enrichedActivityGroup.updated_at,streamItem:e})),n=e.systemNotifications.map(e=>({kind:"system",id:e._id,date:e.dateCreated||new Date(0).toISOString(),notification:e}));return[...n,...t].sort((e,t)=>
1new Date(t.date).getTime()-new Date(e.date).getTime())}},27588:function(e,t,n){"use strict";n.d(t,{Z:function(){return useEntityFetchByIds}});var i=n(82729),r=n(50456),o=n(73359),s=n(67294),l=n(91143);function _templateObject(){let e=(0,i._)(['\n  query useEntityFetchByIds_query(\n    $postIds: PostsByIdsInput!\n    $userIds: UsersByIdsInput!\n    $commentIds: CommentsByIdsInput!\n  ) {\n    usersByIds(input: $userIds) {\n      results {\n        displayName\n        _id\n        proxyProfilePictureUrl(\n          input: { w: 140, h: 140, fit: "facearea", facepad: 10.0 }\n        )\n      }\n    }\n    postsByIds(input: $postIds) {\n      results {\n        _id\n        group {\n          _id\n        }\n        title\n        bodyPlainText\n        poll {\n          _id\n          title\n          descriptionContentState {\n            ...RawDraftContentStateFragment\n          }\n        }\n        blog {\n          _id\n          title\n        }\n        question {\n          _id\n          title\n          body\n        }\n        answer {\n          _id\n          body\n          questionId\n        }\n        eventAlertId\n      }\n    }\n    commentsByIds(input: $commentIds) {\n      results {\n        _id\n        bodyPlainText\n        post {\n          _id\n          group {\n            _id\n          }\n          poll {\n            _id\n          }\n          blog {\n            _id\n          }\n          question {\n            _id\n          }\n          answer {\n            _id\n            questionId\n          }\n          eventAlertId\n        }\n      }\n    }\n  }\n  ',"\n"]);return _templateObject=function(){return e},e}let a=(0,r.Ps)(_templateObject(),l.c),c={posts:{},users:{},comments:{}};function useEntityFetchByIds(){let[e,t]=s.useState(c),[n,{data:i,loading:r}]=(0,o.t)(a);s.useEffect(()=>{if(!i)return;let e=i.postsByIds.results.filter(e=>!!e).reduce((e,t)=>({...e,[t._id]:t}),{}),n=i.usersByIds.results.filter(e=>!!e).reduce((e,t)=>({...e,[t._id]:t}),{}),r=i.commentsByIds.results.filter(e=>!!e).reduce((e,t)=>({...e,[t._id]:t}),{});t(t=>({posts:{...t.posts,...e},users:{...t.users,...n},comments:{...t.comments,...r}}))},[i]);let l=s.useCallback(t=>{let i=t.variables.userIds.userIds.filter(t=>!e.users[t]),r=t.variables.postIds.postIds.filter(t=>!e.posts[t]),o=t.variables.commentIds.commentIds.filter(t=>!e.comments[t]);(i.length>0||r.length>0||o.length>0)&&n({variables:{userIds:{userIds:i},postIds:{postIds:r},commentIds:{commentIds:o}}})},[e.comments,e.posts,e.users,n]),u=s.useCallback(()=>{t(c)},[]);return{entityIdsToEntities:e,fetchNewEntities:l,clearEntities:u,loading:r}}},3015:function(e,t,n){"use strict";n.d(t,{S:function(){return r},W:function(){return useInAppSystemNotifications}});var i,r,o=n(82729),s=n(50456),l=n(37887),a=n(50319),c=n(67294);function _templateObject(){let e=(0,o._)(["\n  query MyInAppNotifications_Query($input: MyInAppNotificationsInput) {\n    myInAppNotifications(input: $input) {\n      results {\n        _id\n        type\n        body\n        groupId\n        groupName\n        isRead\n        isSeen\n        dateCreated\n      }\n      totalCount\n      unseenCount\n    }\n  }\n"]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,o._)(["\n  mutation MyInAppNotifications_MarkRead(\n    $input: MarkInAppNotificationReadInput!\n  ) {\n    markInAppNotificationRead(input: $input) {\n      notification {\n        _id\n        isRead\n        isSeen\n      }\n    }\n  }\n"]);return _templateObject1=function(){return e},e}function _templateObject2(){let e=(0,o._)(["\n  mutation MyInAppNotifications_MarkSeen {\n    markInAppNotificationsSeen {\n      success\n    }\n  }\n"]);return _templateObject2=function(){return e},e}(i=r||(r={})).GroupAccessPolicyPaused="GROUP_ACCESS_POLICY_PAUSED",i.GroupAccessPolicyRestored="GROUP_ACCESS_POLICY_RESTORED";let u=(0,s.Ps)(_templateObject()),d=(0,s.Ps)(_templateObject1()),m=(0,s.Ps)(_templateObject2());function useInAppSystemNotifications(e){let{limit:t}=e,{data:n,loading:i,fetchMore:r}=(0,l.a)(u,{variables:{input:{limit:t,offset:0}},pollInterval:3e4}),[o]=(0,a.D)(d,{refetchQueries:["MyInAppNotifications_Query"]}),[s]=(0,a.D)(m,{refetchQueries:["MyInAppNotifications_Query"]}),p=null==n?void 0:n.myInAppNotifications,h=(null==p?void 0:p.results)||[],g=(null==p?void 0:p.totalCount)||0,x=(null==p?void 0:p.unseenCount)||0,f=c.useCallback(()=>{r({variables:{input:{limit:t,offset:h.length}},updateQuery:(e,t)=>{var n;let{fetchMoreResult:i}=t;return(null==i?void 0:i.myInAppNotifications)?{myInAppNotifications:{...i.myInAppNotifications,results:[...(null===(n=e.myInAppNotifications)||void 0===n?void 0:n.results)||[],...i.myInAppNotifications.results]}}:e}})},[r,t,h.length]),v=c.useCallback(async e=>{await o({variables:{input:{notificationId:e}}})},[o]),y=c.useCallback(async()=>{await s()},[s]);return{notifications:h,unseenCount:x,loading:i,hasMore:h.length<g,fetchMore:f,markRead:v,markAllSeen:y}}},78736:function(e,t,n){"use strict";n.d(t,{f:function(){return useNotificationFeed}});var i=n(67294),r=n(49517),o=n(13781),s=n(27588);let l={activityGroups:[],numUnread:0,numUnseen:0,hasMore:!1};function useNotificationFeed(e){let{notificationFeed:t,tenantId:n,notificationLimit:a,shouldRefetchNotificationsOnUpdate:c}=e,[u,d]=i.useState(l),[m,p]=i.useState(!1),[h,g]=i.useState(!1),[x,f]=i.useState(!1),[v,y]=i.useState([]),b=i.useCallback(()=>{t.get({mark_seen:!0}).then(()=>{d(e=>({...e,numUnseen:0}))}).catch(e=>{(0,r.HC)(e)})}
1,[t]),{fetchNewEntities:j,entityIdsToEntities:_,loading:I}=(0,s.Z)(),{activityGroups:T}=u,S=i.useCallback(e=>{g(!1),f(!0),t.get({limit:a,mark_seen:e}).then(t=>d({numUnread:t.unread,numUnseen:e?0:t.unseen,activityGroups:t.results,hasMore:!!t.next})).catch(e=>(0,r.HC)(e)).finally(()=>{f(!1)})},[t,a]);i.useEffect(()=>(t.subscribe(()=>{p(!0)}).then(()=>{(0,r.KB)("Successfully subscribed to notifications feed")}).catch(e=>{(0,r.HC)(Error("An error occurred while subscribing to notifications feed ".concat(e.message)))}),()=>{t.unsubscribe()}),[t]),i.useEffect(()=>{m&&p(()=>(c?S():g(!0),!1))},[m,c,S]),i.useEffect(()=>{S()},[S]),i.useEffect(()=>{let e=T.reduce((e,t)=>{let i=(0,o.Dg)(t,n);return{userIds:[...new Set([...e.userIds,...i.userIds])],postIds:[...new Set([...e.postIds,...i.postIds])],commentIds:[...new Set([...e.commentIds,...i.commentIds])]}},{userIds:[],postIds:[],commentIds:[]});j({variables:{postIds:{postIds:e.postIds},userIds:{userIds:e.userIds},commentIds:{commentIds:e.commentIds}}})},[T,j,n]),i.useEffect(()=>{y(()=>T.map((e,n)=>({...e,markRead:async()=>{try{await t.get({mark_read:[e.id]}),d(e=>{let t=e.activityGroups[n];return t.is_read?e:{...e,numUnread:e.numUnread&&e.numUnread-1,activityGroups:e.activityGroups.map((e,t)=>t===n?{...e,is_read:!0}:e)}})}catch(t){(0,r.HC)(Error("Error marking activity group ".concat(e.id," as read with message ").concat(t)))}}})).map(e=>{let t=(0,o._t)({activityGroup:e,tenantId:n,entityIdsToEntities:_});return t?{enrichedActivityGroup:t,markRead:e.markRead}:null}).filter(e=>!!e))},[T,_,t,n]);let N=i.useCallback(()=>{g(!1)},[]);return{notificationsMetadata:{numUnread:u.numUnread,numUnseen:u.numUnseen},notificationItems:v,loading:x||I,paginationOptions:{fetchMore:()=>{f(!0),t.get({limit:a,id_lt:u.activityGroups[u.activityGroups.length-1].id}).then(e=>d(t=>({numUnseen:e.unseen,numUnread:e.unread,hasMore:!!e.next,activityGroups:[...t.activityGroups,...e.results]}))).catch(e=>(0,r.HC)(e)).finally(()=>f(!1))},hasNext:u.hasMore},resetNotifications:S,newUpdates:h,clearNewUpdates:N,markNotificationsAsSeen:b}}},8183:function(e,t,n){"use strict";n.d(t,{A:function(){return useIsTablet},d:function(){return useIsMobile}});var i=n(51469);let useIsMobile=()=>{let[e]=(0,i.ac)("(max-width: 767px)");return e},useIsTablet=()=>{let[e]=(0,i.ac)("(min-width: 768px) and (max-width: 991px)");return e}},197:function(e,t,n){"use strict";n.d(t,{bI:function(){return Blueprint},Ov:function(){return useBlueprint}});var i=n(85893),r=n(48641),o=n(67294),s=n(73935),l=n(92481),a=n(90195),c=n(9041),u=n(41079),d=n(45893);let CodeOfConductBanner=e=>{var t;let{isOpen:n,onOpen:r,onClose:s}=(0,a.qY)(),l=(0,d.x)();return(o.useEffect(()=>{let e=setTimeout(()=>{var e;(null===(e=l.tenant)||void 0===e?void 0:e.obnoxiousCodeOfConduct)===!0&&r()},500);return()=>clearTimeout(e)},[null===(t=l.tenant)||void 0===t?void 0:t.obnoxiousCodeOfConduct,r]),l.tenant&&l.user&&!l.user.acceptedCodeOfConduct&&l.tenant.codeOfConduct&&""!==(0,c.convertFromRaw)(l.tenant.codeOfConduct).getPlainText()&&l.user.onboardingFlowState.isSkippedOrCompleted)?(0,i.jsx)(u.F,{isOpen:n,onClose:s}):null};var m=n(60346),p=n(71076),h=n(28746),g=n(47741),x=n(23887),f=n(41664),v=n.n(f),y=n(39332),b=n(15414),j=n(97026),_=n(11163),I=n(8296),T=n(63205),S=n(69243),N=n(37887),C=n(5152),A=n.n(C),O=n(75517);let w=A()(()=>Promise.all([n.e(53662),n.e(94824),n.e(19702),n.e(9611),n.e(24222),n.e(5274)]).then(n.bind(n,90657)).then(e=>e.PreviewRenderer),{loadableGenerated:{webpack:()=>[90657]},ssr:!1}),VersionFilePreviewFromQuery=()=>{var e,t;let n=(0,_.useRouter)(),r=o.useMemo(()=>{if(!n.isReady)return"";let e=n.query.versionFileId;return"string"==typeof e?e.trim():""},[n.isReady,n.query.versionFileId]),{data:s}=(0,N.a)(O.OW,{variables:{input:{versionFileIds:[r]}},skip:!r}),l=null==s?void 0:null===(t=s.versionFilesByIdsForAiAsk)||void 0===t?void 0:null===(e=t.results)||void 0===e?void 0:e[0],a=o.useCallback(()=>{let{versionFileId:e,...t}=n.query;n.replace({pathname:n.pathname,query:t},void 0,{shallow:!0})},[n]);return r&&(null==l?void 0:l.file)?(0,i.jsx)(w,{versionFile:l,onClose:a,isOpen:n.query.versionFileId===l._id,linkOriginalPost:!0}):null};var E=n(20979),P=n(6491);let AIAskTriggerIcon=()=>(0,i.jsx)(r.xu,{boxSize:"5",borderRadius:"full",display:"flex",alignItems:"center",justifyContent:"center",children:(0,i.jsx)(x.Ee,{src:"/aiask.png",alt:"AI Ask",boxSize:"5"})}),AIAskHeaderIcon=()=>(0,i.jsx)(r.xu,{boxSize:"10",borderRadius:"full",bg:"#1676CE",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,children:(0,i.jsx)(x.Ee,{src:"/aiask_white-background.png",alt:"AI Ask",boxSize:"6"})});var k=n(86415),M=n.n(k),R=n(30380),L=n(1817);function indexLabelForName(e,t){let n=(t||"").trim();return e&&n?n===e.postIndexName?"Posts":n===e.memberIndexName?"Members":n===e.orgIndexName?"Organizations":n===e.eventIndexName?"Events":n===e.fileIndexName?"Files":n:t||"Result"}let F={posts:"Posts",members:"Members",organizations:"Organizations",events:"Events",files:"Files"};function normalizeSourceIndexType(e){return String(null!=e?e:"").trim().toLowerCase().replace(/^(ai|div|tw)_/,"")}function sourceObjectId(e){var t,n,i;return e&&"object"==typeof e?String(null!==(i=null!==(n=null!==(t=e.object_id)&&void 0!==t?t:e.doc_id)&&void 0!==n?n:e.objectID)&&void 0!==i?i:"").trim():""}function isVersionFilePreviewSource(e){var t;
1if(!(e&&"object"==typeof e&&"files"===normalizeSourceIndexType(null!==(t=e.index_type)&&void 0!==t?t:e.indexType)))return!1;let n="string"==typeof e.groupId?e.groupId.trim():"string"==typeof e.group_id?e.group_id.trim():"";return!n&&!!sourceObjectId(e)}function sourceHref(e,t){var n,i,r,o;if(!e||"object"!=typeof e)return"";let s=normalizeSourceIndexType(null!==(n=e.index_type)&&void 0!==n?n:e.indexType),l=sourceObjectId(e),a=t.replace(/\/$/,""),withOrigin=e=>{if(!e)return"";if(/^https?:\/\//i.test(e))return e;let t=e.startsWith("/")?e:"/".concat(e);return a?"".concat(a).concat(t):t};if(l){if("events"===s)return withOrigin(R.v.getEventUrl({objectID:l,eventType:function(e){let t=String(null!=e?e:"").trim().toUpperCase().replace(/[-_\s]/g,"");return"CONFERENCE"===t||"CONFERENCEEVENT"===t||"CONFERENCEEVENTV2"===t?L.SL.CONFERENCE:L.SL.SIMPLE}(null!==(i=e.eventType)&&void 0!==i?i:e.type)}));if("members"===s)return withOrigin(R.v.getMemberUrl({objectID:l,userId:String(null!==(r=e.userId)&&void 0!==r?r:l)}));if("posts"===s)return withOrigin("/community/post/".concat(encodeURIComponent(l)));if("files"===s){let t="string"==typeof e.groupId?e.groupId.trim():"string"==typeof e.group_id?e.group_id.trim():"";return t?withOrigin(R.v.getFileUrl({objectID:l,groupId:t,scope:e.scope,originalPostId:"string"==typeof e.originalPostId?e.originalPostId:void 0})):"?versionFileId=".concat(encodeURIComponent(l))}if("organizations"===s)return withOrigin("/companies/".concat(encodeURIComponent(l)))}let c=null!==(o=e.link)&&void 0!==o?o:e.url;if("string"==typeof c&&c.trim())return withOrigin(c.trim());let u=e.path;return"string"==typeof u&&u.trim()?withOrigin(u.trim()):""}function sourceDisplayTitle(e,t,n){var i,r,o,s;if(!e||"object"!=typeof e)return"Source ".concat(t);let l=null!==(i=e.title)&&void 0!==i?i:e.label;if("string"==typeof l&&l.trim())return l.trim();let a=function(e){var t;if(!e||"object"!=typeof e)return"";let n=null!==(t=e.index_type)&&void 0!==t?t:e.indexType;return"string"==typeof n?n:""}(e),c=n?indexLabelForName(n,a):a,u=String(null!==(s=null!==(o=null!==(r=e.object_id)&&void 0!==r?r:e.doc_id)&&void 0!==o?o:e.objectID)&&void 0!==s?s:"").trim();return c&&u?"".concat(c,": ").concat(u.length>14?"".concat(u.slice(0,14),"…"):u):u||"Source ".concat(t)}function refToPseudoSource(e){var t;return e&&"object"==typeof e?{title:e.title,label:e.label,index_type:e.type,object_id:e.id,link:null!==(t=e.link)&&void 0!==t?t:e.url,path:e.path,url:e.url}:null}function openVersionFilePreview(e,t){let n=t.trim();n&&e.isReady&&e.replace({pathname:e.pathname,query:{...e.query,versionFileId:n}},void 0,{shallow:!0})}let FormattedText=e=>{let{text:t,className:n}=e,r=o.useMemo(()=>(function(e){let t;let n=[],i=/\*\*(.+?)\*\*/g,r=0;for(;null!==(t=i.exec(e));)t.index>r&&n.push({bold:!1,text:e.slice(r,t.index)}),n.push({bold:!0,text:t[1]}),r=t.index+t[0].length;return r<e.length&&n.push({bold:!1,text:e.slice(r)}),!n.length&&e&&n.push({bold:!1,text:e}),n})(t),[t]);return(0,i.jsx)("span",{className:n,children:r.map((e,t)=>e.bold?(0,i.jsx)("strong",{children:e.text},t):(0,i.jsx)(o.Fragment,{children:e.text},t))})},SourcedAnswerBlock=e=>{let{answer:t,sources:n,references:r,appOrigin:o,indexData:s}=e,l=(0,_.useRouter)(),a=null==t?"":String(t),c=Array.isArray(n)&&n.length?n:null,u=function(e,t,n){let i;let r=[],o=/\[S(\d+)\]/g,s=0;for(;null!==(i=o.exec(e));){i.index>s&&r.push({type:"text",key:"text-".concat(s),content:e.slice(s,i.index)});let o=parseInt(i[1],10);r.push({type:"sourceMarker",key:"source-".concat(i.index),sourceNumber:o,sourceRecord:function(e,t,n){let i=e-1;return i>=0&&t&&t[i]?t[i]:i>=0&&n[i]?refToPseudoSource(n[i]):null}(o,t,n)}),s=i.index+i[0].length}return s<e.length&&r.push({type:"text",key:"text-".concat(s),content:e.slice(s)}),r.length||r.push({type:"text",key:"text-all",content:e}),r}(a,c,r),d=M();return(0,i.jsx)("div",{className:d.citationAnswer,children:u.map(e=>{if("text"===e.type)return(0,i.jsx)(FormattedText,{text:e.content},e.key);let t=e.sourceRecord?sourceDisplayTitle(e.sourceRecord,e.sourceNumber,s):"S".concat(e.sourceNumber),n=e.sourceRecord?sourceHref(e.sourceRecord,o):"",r=isVersionFilePreviewSource(e.sourceRecord),a=sourceObjectId(e.sourceRecord),c=(0,i.jsxs)("span",{className:d.citationChip,children:[(0,i.jsxs)("strong",{className:d.citationChipNum,children:["S",e.sourceNumber]}),(0,i.jsx)("span",{className:d.citationChipTitle,children:t})]});return n?(0,i.jsx)("a",{className:d.citationChipLink,href:n,onClick:r?e=>{e.preventDefault(),openVersionFilePreview(l,a)}:void 0,children:c},e.key):(0,i.jsx)("span",{className:d.citationChipWrap,children:c},e.key)})})};var q=n(69122);let D={posts:"Posts",members:"Members",organizations:"Organizations",events:"Events",files:"Files",tags:"Tags",rsvps:"RSVPs",groups:"Groups"};function normalizeSessionId(e){var t;let n=null!==(t=e.sessionId)&&void 0!==t?t:e.session_id;if("string"==typeof n&&n.trim())return n.trim()}function payloadFromRecord(e){return{sessionId:normalizeSessionId(e),answer:void 0===e.answer||null===e.answer?null:e.answer,sources:Array.isArray(e.sources)?e.sources:[],references:Array.isArray(e.references)?e.references:[],results:Array.isArray(e.results)?e.results:[],debug:e.debug&&"object"==typeof e.debug?e.debug:{},mode:"string"==typeof e.mode?e.mode:void 0}}function buildAssistantMessage(e,t,n){var i,r;let o=payloadFromRecord(e),s=function(e){var t,n,i,r,o,s;let l=null!==(t=e.count)&&void 0!==t?t:e.recordCount,a=null==l||""===l?null:Number.isFinite(Number(l))?Number(l):null,c={};return e.filters&&"object"==typeof e.filters&&Object.entries(e.filters).forEac
1h(e=>{let[t,n]=e;null!=n&&String(n).trim()&&(c[t]=String(n))}),{responseType:"string"==typeof e.responseType?e.responseType:null,queryToken:String(null!==(n=e.queryToken)&&void 0!==n?n:"").trim(),originalQuery:String(null!==(r=null!==(i=e.originalQuery)&&void 0!==i?i:e.debug&&"object"==typeof e.debug&&e.debug.originalQuery)&&void 0!==r?r:"").trim(),count:a,entityType:String(null!==(o=e.entityType)&&void 0!==o?o:"").trim(),indexName:String(null!==(s=e.indexName)&&void 0!==s?s:"").trim(),filters:c,queryFilter:Array.isArray(e.queryFilter)?e.queryFilter:[],idsTruncated:!!e.idsTruncated,viewResultsError:null}}(e),l="string"==typeof e.message&&e.message.trim()?e.message.trim():null;return{role:"assistant",mode:t,answer:void 0!==n?n:null!==(r=null!==(i=o.answer)&&void 0!==i?i:l)&&void 0!==r?r:null,sources:o.sources||[],references:o.references||[],results:o.results||[],debug:o.debug||{},...s,viewResultsError:null}}function mapApiMode(e){return"search_only"===e?"search_only":"error"===e?"error":"autonomous"}let HitPreviewList=e=>{let{hits:t,indexData:n,indexLabel:o,title:s="Top matches",maxItems:l=6}=e;return t.length?(0,i.jsxs)(r.xu,{mt:2,children:[s?(0,i.jsx)(r.xv,{fontSize:"xs",fontWeight:"500",color:"gray.600",mb:2,children:s}):null,(0,i.jsx)(r.gC,{align:"stretch",spacing:2,children:t.slice(0,l).map((e,t)=>{var s,l,a;let c=String(null!==(s=e.__index)&&void 0!==s?s:""),u=c?indexLabelForName(n,c):null!=o?o:"Result",d=String(null!==(l=e.objectID)&&void 0!==l?l:t);return(0,i.jsxs)(r.xu,{fontSize:"sm",children:[(0,i.jsx)(r.xv,{fontSize:"xs",color:"blue.600",fontWeight:"500",children:u}),(0,i.jsx)(r.xv,{fontWeight:"600",color:"gray.800",children:function(e){var t,n,i,r,o,s,l,a;let c=e._highlightResult||{};return e.title||(null===(t=c.title)||void 0===t?void 0:t.value)||e.displayName||(null===(n=c.displayName)||void 0===n?void 0:n.value)||e.name||(null===(i=c.name)||void 0===i?void 0:i.value)||e["file.name"]||(null===(r=c["file.name"])||void 0===r?void 0:r.value)||(null!==(a=null===(s=e.file)||void 0===s?void 0:null===(o=s.name)||void 0===o?void 0:o.value)&&void 0!==a?a:null===(l=e.file)||void 0===l?void 0:l.name)||e.fileName||e.objectID||""}(e)}),(0,i.jsx)(r.xv,{color:"gray.600",fontSize:"xs",noOfLines:3,children:("string"!=typeof(a=function(e){var t,n,i,r;let o=e._snippetResult||{},s=e._highlightResult||{},l=o.bodyPlainText||o.displayName||o.title||o.name||o["file.name"]||(null===(t=o.file)||void 0===t?void 0:t.name);if(l&&"object"==typeof l&&"value"in l&&l.value)return l.value;let a=s.title||s.displayName||s.bodyPlainText||s.name||s["file.name"]||(null===(n=s.file)||void 0===n?void 0:n.name);return a&&"object"==typeof a&&"value"in a&&a.value?a.value:e.bodyPlainText||e.title||e.displayName||e.name||e["file.name"]||(null!==(r=null===(i=e.file)||void 0===i?void 0:i.name)&&void 0!==r?r:"")||""}(e))?"":a.replace(/<[^>]*>/g,"")).slice(0,220)})]},"".concat(d,"-").concat(t))})})]}):null},SearchOnlyResultsBlock=e=>{let{results:t,indexData:n}=e,r=function(e){let t=[],n=Array.isArray(e)?e:[];for(let e of n){var i,r;if(!e||"object"!=typeof e)continue;let n=String(null!==(r=null!==(i=e.index)&&void 0!==i?i:e.indexName)&&void 0!==r?r:"").toLowerCase(),o=Array.isArray(e.hits)?e.hits:[];for(let e of o)e&&"object"==typeof e&&t.push({...e,__index:n})}return t}(t);return(0,i.jsx)(HitPreviewList,{hits:r,indexData:n})},SourceCardsBlock=e=>{let{sources:t,references:n,appOrigin:r,indexData:o}=e,s=(0,_.useRouter)(),l=[];if(Array.isArray(t)&&t.length?l=t.map((e,t)=>({..."object"==typeof e&&e?e:{},displayOrder:t+1})):Array.isArray(n)&&n.length&&(l=n.map((e,t)=>{let n=refToPseudoSource(e);return n?{...n,displayOrder:t+1}:null}).filter(Boolean)),!l.length)return null;let a=M();return(0,i.jsxs)("div",{className:a.sourceCards,children:[(0,i.jsx)("div",{className:a.sourceCardsTitle,children:"Sources"}),(0,i.jsx)("ul",{className:a.sourceCardsList,children:l.map((e,t)=>{var n,l;let c=sourceHref(e,r),u=sourceDisplayTitle(e,null!==(n=e.displayOrder)&&void 0!==n?n:t+1,o),d=function(e){var t;if(!e||"object"!=typeof e)return"";let n=normalizeSourceIndexType(null!==(t=e.index_type)&&void 0!==t?t:e.indexType);return n?F[n]||n:""}(e),m=sourceObjectId(e),p=isVersionFilePreviewSource(e);return(0,i.jsxs)("li",{className:a.sourceCard,children:[(0,i.jsx)("span",{className:a.sourceCardBadge,children:null!==(l=e.displayOrder)&&void 0!==l?l:t+1}),(0,i.jsxs)("div",{className:a.sourceCardBody,children:[c?(0,i.jsxs)("a",{className:"".concat(a.sourceCardTitle," ").concat(a.sourceCardTitleLink),href:c,onClick:p?e=>{e.preventDefault(),openVersionFilePreview(s,m)}:void 0,children:[u,(0,i.jsxs)("span",{className:a.sourceCardExt,"aria-hidden":"true",children:[" ","↗"]})]}):(0,i.jsx)("div",{className:"".concat(a.sourceCardTitle," ").concat(a.sourceCardTitlePlain),children:u}),d?(0,i.jsx)("div",{className:a.sourceCardMeta,children:d}):null]})]},"".concat(m||t,"-").concat(t))})})]})},FilteredListAnswer=e=>{var t;let{message:n,indexData:o,onViewResults:s,isLoading:l}=e,a=function(e,t){let n=e.trim().toLowerCase();return D[n]?D[n]:t&&e?indexLabelForName(t,e):e||"Results"}(n.entityType,o),c=Object.entries(n.filters),u=String(null!==(t=n.answer)&&void 0!==t?t:"").trim(),d=!!n.queryToken;return(0,i.jsxs)(r.xu,{children:[u?(0,i.jsx)(r.xv,{className:M().askText,mb:3,as:"div",children:(0,i.jsx)(FormattedText,{text:u})}):null,null!=n.count&&Number.isFinite(n.count)?(0,i.jsxs)(r.xu,{mb:2,children:[(0,i.jsx)(r.xv,{as:"span",fontWeight:"700",fontSize:"lg",color:"gray.800",mr:2,children:n.count.toLocaleStr
1ing()}),(0,i.jsx)(r.xv,{as:"span",fontSize:"sm",color:"gray.600",children:a})]}):null,c.length>0?(0,i.jsx)(r.Eq,{spacing:2,mb:3,children:c.map(e=>{let[t,n]=e;return(0,i.jsx)(r.Uc,{children:(0,i.jsxs)(r.xu,{px:2,py:1,borderRadius:"md",bg:"white",borderWidth:"1px",borderColor:"gray.200",fontSize:"xs",color:"gray.700",children:[t,": ",n]})},t)})}):null,(0,i.jsx)(g.zx,{size:"sm",colorScheme:"blue",variant:"solid",onClick:s,isLoading:l,isDisabled:!d,title:d?"View Results":"View Results unavailable",children:"View Results"}),n.viewResultsError?(0,i.jsx)(r.xv,{fontSize:"sm",color:"red.500",mt:2,children:n.viewResultsError}):null]})},SearchRedirectAnswer=e=>{var t,n;let{message:o,onSwitchToSearch:s,isLoading:l}=e,a=String(null!==(n=o.answer)&&void 0!==n?n:"").trim(),c=!!(null===(t=o.originalQuery)||void 0===t?void 0:t.trim());return(0,i.jsxs)(r.xu,{children:[a?(0,i.jsx)(r.xv,{className:M().askText,mb:3,as:"div",children:(0,i.jsx)(FormattedText,{text:a})}):null,(0,i.jsx)(g.zx,{size:"sm",colorScheme:"blue",variant:"solid",onClick:s,isLoading:l,isDisabled:!c,title:c?"Open Search with this query":"Search query unavailable",children:"View Search Results"}),o.viewResultsError?(0,i.jsx)(r.xv,{fontSize:"sm",color:"red.500",mt:2,children:o.viewResultsError}):null]})},AIAskUserMessage=e=>{let{text:t}=e;return(0,i.jsx)(r.xu,{bg:"#1E78D7",color:"white",borderRadius:"14px",p:"3",maxW:"85%",boxShadow:"sm",children:(0,i.jsx)(r.xv,{className:M().askText,children:t})})},SourcedAssistantAnswer=e=>{let{message:t,indexData:n,appOrigin:o}=e,s=function(e){let t=String(null!=e?e:"").trim().toLowerCase();return!!t&&("not found in provided context."===t||"not found in provided context"===t||t.includes("cannot answer from the provided materials")||t.includes("insufficient context"))}(t.answer),l=s?{sources:[],references:[]}:function(e,t,n){let i=function(e){let t;let n=String(null!=e?e:""),i=[],r=new Set,o=/\[S(\d+)\]/g;for(;null!==(t=o.exec(n));){let e=parseInt(t[1],10);!Number.isFinite(e)||e<1||r.has(e)||(r.add(e),i.push(e))}return i}(e);if(!i.length)return{sources:Array.isArray(t)?t.slice(0,4):[],references:Array.isArray(n)?n.slice(0,4):[]};let r=[],o=[],s=new Set,l=new Set;for(let e of i){let i=e-1;if(Array.isArray(t)&&t[i]?(r.push(t[i]),s.add(i)):Array.isArray(n)&&n[i]&&(o.push(n[i]),l.add(i)),r.length+o.length>=4)break}if(Array.isArray(t))for(let e=0;e<t.length&&r.length+o.length<4;e+=1)s.has(e)||(r.push(t[e]),s.add(e));else if(Array.isArray(n))for(let e=0;e<n.length&&r.length+o.length<4;e+=1)l.has(e)||(o.push(n[e]),l.add(e));return{sources:r,references:o}}(t.answer,t.sources,t.references);return(0,i.jsxs)(r.xu,{className:"ai-ask-answer",children:[(0,i.jsx)(SourcedAnswerBlock,{answer:t.answer,sources:s?[]:t.sources||[],references:s?[]:t.references||[],appOrigin:o,indexData:n}),s?null:(0,i.jsx)(SourceCardsBlock,{sources:l.sources,references:l.references,appOrigin:o,indexData:n})]})},AIAskAssistantMessage=e=>{var t;let{message:n,indexData:o,appOrigin:s,onViewResults:l,isViewResultsLoading:a}=e;return(0,i.jsx)(r.xu,{bg:"#1676CE1A",borderRadius:"14px",p:"3",maxW:"90%",boxShadow:"sm",children:"streaming"===n.mode?(0,i.jsx)(r.xu,{fontSize:"sm",whiteSpace:"pre-wrap",color:"gray.800",className:M().askText,children:n.answer?(0,i.jsx)(FormattedText,{text:n.answer}):(0,i.jsx)(r.xv,{as:"span",color:"gray.500",className:M().askTyping,children:"●●●"})}):"error"===n.mode?(0,i.jsx)(r.xv,{fontSize:"sm",color:"red.600",className:M().askText,children:n.answer||"Something went wrong. Please try again."}):"search_redirect"===n.responseType?(0,i.jsx)(SearchRedirectAnswer,{message:n,onSwitchToSearch:l,isLoading:a}):"filtered_list"===n.responseType?(0,i.jsx)(FilteredListAnswer,{message:n,indexData:o,onViewResults:l,isLoading:a}):"search_only"===n.mode||null==n.answer?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.xv,{fontSize:"xs",color:"gray.600",mb:2,className:"ai-ask-meta",children:["Search-only response","number"==typeof(null===(t=n.debug)||void 0===t?void 0:t.search_confidence)?" \xb7 confidence ".concat(Number(n.debug.search_confidence).toFixed(2)):""]}),(0,i.jsx)(SearchOnlyResultsBlock,{results:n.results,indexData:o})]}):(0,i.jsx)(SourcedAssistantAnswer,{message:n,indexData:o,appOrigin:s})})},AIAskMessageRow=e=>{let{message:t,indexData:n,appOrigin:o,onViewResults:s,isViewResultsLoading:l=!1}=e;return(0,i.jsx)(r.xu,{w:"100%",display:"flex",justifyContent:"user"===t.role?"flex-end":"flex-start",className:"ai-ask-msg ai-ask-msg--".concat(t.role),children:"user"===t.role?(0,i.jsx)(AIAskUserMessage,{text:t.text}):(0,i.jsx)(AIAskAssistantMessage,{message:t,indexData:n,appOrigin:o,onViewResults:null!=s?s:()=>void 0,isViewResultsLoading:l})})},AIAskInputBar=e=>
1{let{askQuestion:t,askLoading:n,inputRef:o,onQuestionChange:s,onSubmit:l,onNewChat:a,onClose:c}=e;return(0,i.jsx)(r.xu,{borderTopWidth:"1px",bg:"#F7FAFC",py:"4",px:"6",children:(0,i.jsxs)(r.gC,{w:"100%",spacing:2,align:"stretch",children:[(0,i.jsxs)(E.BZ,{w:"100%",children:[(0,i.jsx)(E.II,{ref:o,placeholder:"Type a command...",bg:"#E2E8F0",borderColor:"#E2E8F0",borderRadius:"12px",pr:"10",_placeholder:{color:"gray.500"},value:t,onChange:e=>s(e.target.value),onKeyDown:e=>{if("Escape"===e.key){c();return}"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),l())},isDisabled:n}),(0,i.jsx)(E.xH,{h:"full",w:"10",children:(0,i.jsx)(r.xu,{as:"button",type:"button",display:"flex",alignItems:"center",justifyContent:"center",h:"full",w:"full",minW:"10",bg:"transparent",border:"none",cursor:n||!t.trim()?"not-allowed":"pointer",opacity:n||!t.trim()?.5:1,"aria-label":"Send",onClick:()=>{!n&&t.trim()&&l()},children:(0,i.jsx)(P.jE$,{color:"#1E78D7",boxSize:"5"})})})]}),(0,i.jsx)(r.xu,{as:"button",type:"button",w:"100%",h:"42px",bg:"#E2E8F0",border:"1px solid",borderColor:"#E2E8F0",borderRadius:"12px",color:"#4A5568",fontSize:"sm",fontWeight:"600",cursor:n?"not-allowed":"pointer",opacity:n?.6:1,onClick:a,disabled:n,_hover:{bg:"#D8E0EA"},children:"New chat"})]})})},AIAskDrawer=e=>{let{isOpen:t,askError:n,askMessages:s,askQuestion:l,askLoading:a,indexData:c,appOrigin:u,viewResultsLoadingIndex:d,inputRef:m,onClose:p,onQuestionChange:h,onSubmit:x,onNewChat:f,onViewResults:v}=e,{headerHeight:y}=useBlueprint(),b=o.useRef(null),j=o.useRef(!1);return(o.useEffect(()=>{if(!t){j.current=!1;return}let e=b.current;if(!e)return;let n=j.current;j.current=!0;let scrollToBottom=t=>{e.scrollTo({top:e.scrollHeight,behavior:t})};if(n){scrollToBottom("smooth");return}requestAnimationFrame(()=>{scrollToBottom("auto"),requestAnimationFrame(()=>scrollToBottom("auto"))})},[t,s,a]),t)?(0,i.jsxs)(r.xu,{position:"fixed",top:"".concat(y,"px"),bottom:{base:"calc(5rem + env(safe-area-inset-bottom, 0px))",lg:0},right:0,w:{base:"100vw",md:"450px",lg:"450px"},borderLeftWidth:"1px",display:"flex",flexDirection:"column",zIndex:1300,bg:"white",boxShadow:"lg",children:[(0,i.jsx)(g.hU,{icon:(0,i.jsx)(P.b0D,{boxSize:"5"}),"aria-label":"Close AI Ask",position:"absolute",top:"3",right:"4",size:"sm",color:"gray.500",bg:"transparent",onClick:p,_hover:{bg:"transparent",color:"gray.700"},_active:{bg:"transparent"}}),(0,i.jsx)(r.xu,{borderBottomWidth:"1px",bg:"#1676CE0D",py:"3",pr:"14",px:"6",children:(0,i.jsxs)(r.Ug,{spacing:"3",alignItems:"center",children:[(0,i.jsx)(AIAskHeaderIcon,{}),(0,i.jsxs)(r.xu,{display:"flex",flexDirection:"column",justifyContent:"center",minH:"6",children:[(0,i.jsx)(r.xv,{fontSize:"lg",lineHeight:"1.5",fontWeight:"600",color:"gray.900",children:"Tradewing IQ"}),(0,i.jsx)(r.xv,{fontSize:"sm",lineHeight:"1.5",fontWeight:"400",color:"gray.900",children:"Powered by Community Intelligence"})]})]})}),(0,i.jsxs)(r.xu,{bg:"#F7FAFC",px:"5",pt:"2",pb:"4",display:"flex",flexDirection:"column",minH:0,flex:"1",children:[n?(0,i.jsx)(r.xv,{fontSize:"sm",color:"red.500",mb:3,children:n}):null,(0,i.jsx)(r.gC,{ref:b,align:"stretch",spacing:4,className:"ai-ask-messages",flex:"1",minH:0,overflowY:"auto",pr:1,children:s.map((e,t)=>(0,i.jsx)(AIAskMessageRow,{message:e,indexData:c,appOrigin:u,onViewResults:()=>v(t),isViewResultsLoading:d===t},t))})]}),(0,i.jsx)(AIAskInputBar,{askQuestion:l,askLoading:a,inputRef:m,onQuestionChange:h,onSubmit:x,onNewChat:f,onClose:p})]}):null},H={question_too_long:"Your question is too long. Please shorten it and try again.",question_required:"A question is required.",invalid_request:"Something went wrong. Please try again.",request_too_large:"Your request exceeds the allowed size. Please reduce the content and try again.",rate_limit_exceeded:"Too many requests. Please wait a moment and try again.",service_overloaded:"The service is temporarily busy. Please try again shortly.",access_context_unavailable:"We’re unable to verify your access right now. Please try again shortly.",ask_failed:"We’re unable to process your request right now. Please try again shortly.",not_found:"This request could not be found."},U={413:H.request_too_large,429:H.rate_limit_exceeded,503:H.service_overloaded,502:H.ask_failed,404:H.not_found},z="Something went wrong. Please try again.";function readAccessTokenCookie(){if("undefined"==typeof document)return"";let e=document.cookie.split(";");for(let t of e){let[e,...n]=t.trim().split("=");if("accounts%3AaccessToken"===e||"accounts:accessToken"===e){let e=n.join("=");try{return decodeURIComponent(e||"").trim()}catch(t){return(e||"").trim()}}}return""}let AIAsk=e=>{var t,n,r,s;let{isOpen:l,onOpen:a,onClose:c}=e,u=(0,S.Mx)(),m=(0,T.U)(),p=(0,d.x)(),h=(0,_.useRouter)(),[x,f]=o.useState(""),[v,y]=o.useState(!1),b=o.useRef(null),N=null!==(r=null===(t=p.user)||void 0===t?void 0:t._id)&&void 0!==r?r:"",C=null!==(s=null===(n=p.tenant)||void 0===n?void 0:n._id)&&void 0!==s?s:"",{askMessages:A,setAskMessages:O,askSessionId:w,setAskSessionId:E,askError:P,setAskError:k,clearPersistedChat:M}=function(e,t){let[n,i]=o.useState([]),[r,s]=o.useState(""),[l,a]=o.use
1State(""),c=o.useMemo(()=>e?"ai-ask:".concat(t||"tenant",":").concat(e):"",[t,e]),u=o.useRef(e),d=o.useRef(c);o.useEffect(()=>{c&&(d.current=c)},[c]),o.useEffect(()=>{if(u.current!==e){let t=u.current;if(u.current=e,!e&&t)try{d.current&&window.localStorage.removeItem(d.current)}catch(e){}s(""),i([]),a("")}},[e]),o.useEffect(()=>{if(c)try{let e=window.localStorage.getItem(c);if(!e)return;let t=JSON.parse(e),n="string"==typeof t.authSessionToken?t.authSessionToken:"",r=readAccessTokenCookie();if(n&&r&&n!==r){window.localStorage.removeItem(c);return}i(Array.isArray(t.askMessages)?t.askMessages:[]),s("string"==typeof t.askSessionId?t.askSessionId:""),a("string"==typeof t.askError?t.askError:"")}catch(e){}},[c]),o.useEffect(()=>{if(!c)return;let e={askMessages:n,askSessionId:r,askError:l,authSessionToken:readAccessTokenCookie()};try{window.localStorage.setItem(c,JSON.stringify(e))}catch(e){}},[l,n,r,c]);let m=o.useCallback(()=>{if(s(""),i([]),a(""),c)try{window.localStorage.removeItem(c)}catch(e){}},[c]);return{askMessages:n,setAskMessages:i,askSessionId:r,setAskSessionId:s,askError:l,setAskError:a,clearPersistedChat:m}}(N,C),{ask:R}=function(e){let{aiSearchHttp:t,userId:n,askSessionId:i,setAskSessionId:r,setAskMessages:s,setAskError:l,setAskLoading:a}=e,c=o.useCallback(e=>{s(t=>{if(!t.length)return t;let n=[...t];return n[n.length-1]=e,n})},[s]),u=o.useCallback(async e=>{let o=e.trim();if(!o||!t)return!1;l(""),a(!0);let u={role:"user",text:o};s(e=>[...e,u]),s(e=>[...e,q.J]);let d="".concat(t.baseUrl,"/1/indexes/%2A/ai-ask"),m={question:o,stream:!1,...i?{sessionId:i}:{startSession:!0},...n?{userId:n}:{}};try{let e=await fetch(d,{method:"POST",headers:t.buildHeaders(),body:JSON.stringify(m)});if(!e.ok){let t=null;try{let n=await e.text();n.trim()&&(t=JSON.parse(n))}catch(e){t=null}let n=function(e,t,n){let i="string"==typeof(null==t?void 0:t.error)?t.error.trim():"",r="string"==typeof(null==t?void 0:t.message)?t.message.trim():"",o=r||H[i]||U[e]||z;return 429===e||503===e||"rate_limit_exceeded"===i||"service_overloaded"===i?function(e,t){if(!t)return e;let n=1===t?"second":"seconds";return"".concat(e," Try again in ").concat(t," ").concat(n,".")}(o,function(e){if(!(null==e?void 0:e.trim()))return null;let t=Number(e);if(Number.isFinite(t)&&t>0)return Math.ceil(t);let n=Date.parse(e);if(Number.isNaN(n))return null;let i=Math.ceil((n-Date.now())/1e3);return i>0?i:null}(n)):o}(e.status,t,e.headers.get("Retry-After"));return c({...q.J,mode:"error",answer:n}),!1}let n=e.headers.get("content-type")||"",i=n.includes("text/event-stream");if(i&&e.body){let t=e.body.getReader(),n=new TextDecoder,i="",o="";for(;;){var p,h;let{done:e,value:s}=await t.read();if(e)break;i+=n.decode(s,{stream:!0});let l=i.split("\n");for(let e of(i=null!==(p=l.pop())&&void 0!==p?p:"",l)){if(!e.startsWith("data: "))continue;let t=e.slice(6).trim();if(t)try{let e=JSON.parse(t);if("delta"===e.event&&null!=e.text)o+=String(e.text),c({...q.J,answer:o});else if("final"===e.event){let t=normalizeSessionId(e);t&&r(e=>e||t);let n="string"==typeof e.mode?e.mode:"autonomous";c(buildAssistantMessage(e,mapApiMode(n),null!==(h=e.answer)&&void 0!==h?h:o||null))}}catch(e){}}}}else{let t=await e.json(),n=payloadFromRecord(t),i=n.sessionId;i&&r(e=>e||i);let o=n.mode||"autonomous";c(buildAssistantMessage(t,mapApiMode(o)))}return!0}catch(e){return c({...q.J,mode:"error",answer:z}),!1}finally{a(!1)}},[t,i,l,a,s,r,c,n]);return{ask:u}}({aiSearchHttp:u.aiSearchHttp,userId:N,askSessionId:w,setAskSessionId:E,setAskMessages:O,setAskError:k,setAskLoading:y}),L=u.indexData,{viewResultsLoadingIndex:F,handleViewResults:D}=function(e){let{askMessages:t,setAskMessages:n,setAskError:i}=e,r=(0,_.useRouter)(),[s,l]=o.useState(null),a=o.useCallback(async e=>{let o=t[e];if(!o||"assistant"!==o.role)return;let clearInlineError=()=>{i(""),n(t=>{let n=[...t],i=n[e];return i&&"assistant"===i.role?(n[e]={...i,viewResultsError:null},n):t})},setInlineError=t=>{n(n=>{let i=[...n],r=i[e];return r&&"assistant"===r.role?(i[e]={...r,viewResultsError:t},i):n})};if("search_redirect"===o.responseType){let n=e>
10?t[e-1]:null,s=o.originalQuery.trim()||((null==n?void 0:n.role)==="user"?n.text.trim():"");if(!s){i("No search query available for this message.");return}clearInlineError(),l(e);try{await r.push({pathname:"/search",query:{query:s}})}catch(t){let e=t instanceof Error?t.message:String(t);setInlineError("View Search Results failed: ".concat(e))}finally{l(null)}return}if(!o.queryToken){i("No query token — enable AI_ASK_QUERY_TOKEN_ENABLED on the server.");return}clearInlineError(),l(e);try{await r.push({pathname:"/aiAskResults",query:{queryToken:o.queryToken}})}catch(t){let e=t instanceof Error?t.message:String(t);setInlineError("View Results failed: ".concat(e))}finally{l(null)}},[t,r,i,n]);return{viewResultsLoadingIndex:s,handleViewResults:a}}({askMessages:A,setAskMessages:O,setAskError:k}),B=window.location.origin;(0,I._)("metaKey","k",a);let W=function(e){let[t,n=""]=e.split("?");if(!n)return t;let i=new URLSearchParams(n);i.delete("versionFileId");let r=i.toString();return r?"".concat(t,"?").concat(r):t}(h.asPath);o.useEffect(()=>{c()},[c,W]),o.useEffect(()=>{if(l){var e;null===(e=b.current)||void 0===e||e.focus()}},[l]);let G=o.useCallback(()=>{if(v||!x.trim())return;let e=x.trim();f(""),R(e)},[R,v,x]);return u.client&&L&&u.aiSearchHttp&&!m.loading&&h.isReady?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VersionFilePreviewFromQuery,{}),(0,i.jsx)(g.hU,{"aria-label":"Ask AI",icon:(0,i.jsx)(AIAskTriggerIcon,{}),variant:"outline",colorScheme:"gray",isRound:!0,onClick:a}),(0,i.jsx)(AIAskDrawer,{isOpen:l,askError:P,askMessages:A,askQuestion:x,askLoading:v,indexData:L,appOrigin:B,viewResultsLoadingIndex:F,inputRef:b,onClose:c,onQuestionChange:f,onSubmit:G,onNewChat:M,onViewResults:e=>void D(e)})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VersionFilePreviewFromQuery,{}),(0,i.jsx)(j.u,{label:"Ask AI",isDisabled:m.loading,children:(0,i.jsx)(g.hU,{"aria-label":"Ask AI",icon:(0,i.jsx)(AIAskTriggerIcon,{}),variant:"outline",colorScheme:"gray",isRound:!0,isDisabled:!0})})]})};var B=n(86439),W=n(62893),G=n(82729),V=n(50456),K=n(52176);function _templateObject(){let e=(0,G._)(["\n  query WebflowIntegrationGetNavChrome {\n    webflowIntegrationGetNavChrome {\n      result {\n        available\n        html\n        inlineStyles\n        wrapperClassName\n      }\n    }\n  }\n"]);return _templateObject=function(){return e},e}let Q=(0,V.Ps)(_templateObject()),useWebflowNavChrome=()=>{var e;let{isEnabled:t,navigationChrome:n}=(0,K.Ns)(),i=t&&"WEBFLOW"===n,{data:r,loading:o,error:s}=(0,N.a)(Q,{skip:!i,fetchPolicy:"cache-first"}),l=null==r?void 0:null===(e=r.webflowIntegrationGetNavChrome)||void 0===e?void 0:e.result,a=i&&(null==l?void 0:l.available)===!0&&"string"==typeof l.html&&l.html.length>0;return{configuredForWebflowNav:i,available:a,loading:i&&o,error:s,nav:a?l:null}};var J=n(68745),$=n(86398),Y=n(65442),Z=n(44389),X=n(98530),ee=n(40308),et=n(58857);let en="data-tradewing-nav",resolveMenuEl=e=>e.querySelector(".w-nav-menu")||e.querySelector('[class*="nav-menu"]')||e.querySelector('[class*="navbar"]')||e.querySelector("nav")||e,WebflowNavAlignedUtilities=e=>{let{containerRef:t,htmlKey:n}=e,[l,a]=o.useState(null);return(o.useEffect(()=>{let measure=()=>{let e=t.current;if(!e){a(null);return}let n=e.id===en?e:e.querySelector("#".concat(en));if(!n){a(null);return}let i=resolveMenuEl(n),r=n.getBoundingClientRect(),o=i.getBoundingClientRect();if(r.height<=0||o.width<=0){a(null);return}let s=o.top-40-12,l=o.top>r.top+40?Math.max(r.top+4,s):r.top+Math.max(0,(r.height-40)/2);a({top:l,right:Math.max(12,window.innerWidth-o.right)})};measure(),window.addEventListener("resize",measure),window.addEventListener("scroll",measure,!0);let e=t.current,n="undefined"!=typeof ResizeObserver&&e?new ResizeObserver(measure):null;if(e&&n){n.observe(e);let t=e.querySelector("#".concat(en));t&&n.observe(t)}return()=>{window.removeEventListener("resize",measure),window.removeEventListener("scroll",measure,!0),null==n||n.disconnect()}},[t,n]),l&&"undefined"!=typeof document)?(0,s.createPortal)((0,i.jsx)(r.xu,{position:"fixed",top:"".concat(l.top,"px"),right:"".concat(l.right,"px"),zIndex:2e3,display:"flex",alignItems:"center",pointerEvents:"auto",isolation:"isolate","data-tradewing-nav-utilities":"",children:(0,i.jsx)(et.l,{})}),document.body):null},ei="w-webflow-nav-chrome",er=".".concat(ei,".").concat(ei),eo="\n".concat(er," {\n  font-family: initial;\n  font-size: initial;\n  font-weight: initial;\n  font-style: initial;\n  line-height: initial;\n  letter-spacing: initial;\n  text-transform: initial;\n  color: initial;\n  background: transparent;\n  flex: 1;\n  min-width: 0;\n}\n\n").concat(er," :where(h1, h2, h3, h4, h5, h6, p, a, button, input, textarea, select, label, ul, ol, li, blockquote, pre, code, table, th, td, hr, svg, figure, figcaption, section, article, aside, header, footer, main, nav, div, span) {\n  all: revert;\n}
1\n").trim(),es="\n".concat(er,",\n").concat(er,' :where(\n  #data-tradewing-nav,\n  .w-nav,\n  .w-nav-brand,\n  .w-nav-menu,\n  .w-nav-button,\n  .w-container,\n  .navbar,\n  .nav-bar,\n  .nav,\n  .navigation,\n  .header,\n  nav,\n  header,\n  [class*="navbar"],\n  [class*="nav-bar"],\n  [class*="navigation"]\n) {\n  background: transparent !important;\n  background-color: transparent !important;\n  background-image: none !important;\n  box-shadow: none !important;\n  border-color: transparent !important;\n}\n\n/* Keep Webflow shell under TW utilities so icons stay clickable.\n   Webflow .w-nav often uses z-index: 1000+. */\n').concat(er,",\n").concat(er," #data-tradewing-nav,\n").concat(er," .w-nav,\n").concat(er,' [class*="navbar"] {\n  position: relative !important;\n  z-index: 1 !important;\n}\n\n/* Dynamic pages use a white TW header — Webflow often styles links white for dark bars. */\n').concat(er,' :where(a, .w-nav-link, [class*="nav-link"]) {\n  color: #000000 !important;\n}\n\n').concat(er,' :where(a, .w-nav-link, [class*="nav-link"]):hover,\n').concat(er,' :where(a, .w-nav-link, [class*="nav-link"]):focus,\n').concat(er,' :where(a, .w-nav-link, [class*="nav-link"]).w--current {\n  color: #000000 !important;\n}\n').trim(),shouldHandleClientNavigation=(e,t)=>{let n;if(t.defaultPrevented||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||e.target&&"_self"!==e.target||e.hasAttribute("download"))return!1;let i=e.getAttribute("href");if(!i||i.startsWith("#")||i.startsWith("mailto:")||i.startsWith("tel:")||i.startsWith("javascript:"))return!1;try{n=new URL(i,window.location.href)}catch(e){return!1}return n.origin===window.location.origin},WebflowNavChrome=e=>{let{nav:t}=e,n=(0,y.useRouter)(),r=(0,W.T)(),s=o.useRef(null),l=[t.wrapperClassName||ei,ei].filter((e,t,n)=>n.indexOf(e)===t).join(" ");return(o.useEffect(()=>{let e=s.current;if(!e)return;let onClick=t=>{let i=t.target;if(!(i instanceof Element))return;let r=i.closest("a");if(!(r instanceof HTMLAnchorElement)||!e.contains(r)||!shouldHandleClientNavigation(r,t))return;let o=new URL(r.href,window.location.href),s="".concat(o.pathname).concat(o.search).concat(o.hash),l="".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash);if(s===l){t.preventDefault();return}t.preventDefault(),n.push(s)};return e.addEventListener("click",onClick),()=>e.removeEventListener("click",onClick)},[n,t.html]),o.useEffect(()=>{let e=s.current;e&&!r.isLoading&&(0,ee.N)(e,r.isAuthenticated)},[r.isLoading,r.isAuthenticated,t.html]),t.html)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{"data-webflow-nav-isolation":"chakra-undo",dangerouslySetInnerHTML:{__html:eo}}),t.inlineStyles.map((e,t)=>(0,i.jsx)("style",{"data-webflow-nav-isolation":"scoped-css",dangerouslySetInnerHTML:{__html:e}},"webflow-nav-style-".concat(t))),(0,i.jsx)("style",{"data-webflow-nav-isolation":"theme-match",dangerouslySetInnerHTML:{__html:es}}),(0,i.jsx)("div",{ref:s,className:l,"data-webflow-nav-root":"",dangerouslySetInnerHTML:{__html:t.html}})]}):null};var el=n(93064),ea=n(93710),ec=n(99052),eu=n(2821),ed=n(85101),em=n(78749),ep=n(98539),eh=n(71197),eg=n(53897),ex=n(14670),ef=n(75031),ev=n(90764);let MeetingsHeaderLabel=e=>{let{label:t}=e,{showMeetingsDot:n,showLiveLabel:o}=(0,ev.s)({audienceOnly:!0});return(0,i.jsxs)(r.Ug,{as:"span",spacing:"2",align:"center",children:[(0,i.jsxs)(r.xu,{as:"span",position:"relative",display:"inline-flex",lineHeight:"1",children:[(0,i.jsx)(ef.h,{boxSize:"4"}),n&&!o?(0,i.jsx)(r.Cd,{position:"absolute",top:"-1",right:"-1",size:"2",bg:"green.400"}):null]}),(0,i.jsx)(r.xu,{as:"span",children:t}),o?(0,i.jsx)(r.xv,{as:"span",fontSize:"xs",fontWeight:"bold",color:"green.500",letterSpacing:"wide",textTransform:"uppercase",children:"LIVE"}):null]})};var ey=n(39615);function HeaderNavigationMenuLink_templateObject(){let e=(0,G._)(["\n  fragment HeaderNavigationMenuLink_NavigationItem on NavigationItem {\n    label\n    href\n    isExternal\n    children {\n      label\n      href\n      isExternal\n    }\n  }\n"]);
1return HeaderNavigationMenuLink_templateObject=function(){return e},e}let normalizeMemberNavHref=e=>(null!=e?e:"").replace(/\/+$/,""),HeaderNavigationMenuLink=e=>{var t;let{item:n}=e,{forceMatchHack:o}=useBlueprint(),s=(0,eg.X)(),l="/my-company/dashboard/overview"===n.href?"/my-company":n.href,a=(0,ex.$)(l)||o&&n.href===o,c=normalizeMemberNavHref(n.href),u="/events"===c||c.endsWith("/events"),d="/community/meetings/list"===c||"/community/meetings"===c||(null===(t=n.label)||void 0===t?void 0:t.trim().toLowerCase())==="meetings",m=(0,ex.$)(["/community/meetings","/community/quick-call","/community/quick-meet"]);n.href&&u&&s&&(a=!1),n.href&&"/learning"===c&&s&&(a=!0),n.href&&d&&(a=m||!!o&&(n.href===o||String(o).startsWith("/community/meetings")));let p={textStyle:"xlBodyStrong",p:"6",color:a?"blue.500":void 0,cursor:"pointer"},h=d?(0,i.jsx)(MeetingsHeaderLabel,{label:n.label}):n.label;return n.href?n.isExternal?(0,i.jsx)(r.xu,{as:"a",target:"_blank",rel:"noreferrer",href:(0,ey.E)(n.href),...p,children:h}):(0,i.jsx)(v(),{href:n.href,children:(0,i.jsx)(r.xu,{href:(0,ey.E)(n.href),...p,children:h})},n.href):n.children.length&&n.children.some(e=>e.href)?(0,i.jsx)(HeaderNavigationMenuDropdownLink,{item:n}):null};HeaderNavigationMenuLink.navigationItemFragment=(0,V.Ps)(HeaderNavigationMenuLink_templateObject());let HeaderNavigationMenuDropdownLink=e=>{var t;let{item:n}=e,s=(0,_.useRouter)(),l=o.useMemo(()=>!!n.children&&n.children.some(e=>(0,ex.m)(e.href,s)),[n.children,s]),{isOpen:c,onToggle:u}=(0,a.qY)({defaultIsOpen:l});return(0,i.jsxs)(r.xu,{children:[(0,i.jsxs)(r.Kq,{direction:"row",alignItems:"center",justifyContent:"center",p:"6",onClick:u,cursor:"pointer",w:"full",children:[(0,i.jsx)(r.xv,{textStyle:"xlBodyStrong",children:n.label}),c?(0,i.jsx)(P.v4q,{}):(0,i.jsx)(P.XCv,{})]}),(0,i.jsx)(eh.UO,{in:c,style:{width:"100%"},children:(0,i.jsx)(r.Kq,{bg:"gray.50",p:"4",spacing:"0",alignItems:"center",children:null===(t=n.children)||void 0===t?void 0:t.map((e,t)=>(0,i.jsx)(HeaderNavigationMenuChildLink,{child:e},t+e.label))})})]})},HeaderNavigationMenuChildLink=e=>{let{child:t}=e,n=(0,ex.$)(t.href);return t.href?t.isExternal?(0,i.jsxs)(r.Kq,{as:"a",target:"_blank",rel:"noreferrer",href:(0,ey.E)(t.href),direction:"row",alignItems:"center",justifyContent:"center",textStyle:"xlBody",color:n?"blue.500":void 0,w:"full",p:"4",children:[(0,i.jsx)(r.xu,{children:t.label}),(0,i.jsx)(P.h0n,{boxSize:"3"})]}):(0,i.jsx)(v(),{href:t.href,children:(0,i.jsx)(r.xu,{textStyle:"xlBody",color:n?"blue.500":void 0,w:"full",p:"4",children:t.label})}):null};var eb=n(38655),ej=n(82415);function HeaderNavigationTabLink_templateObject(){let e=(0,G._)(["\n  fragment HeaderNavigationTabLink_NavigationItem on NavigationItem {\n    label\n    href\n    isExternal\n    children {\n      label\n      href\n      isExternal\n    }\n  }\n"]);return HeaderNavigationTabLink_templateObject=function(){return e},e}let e_=(0,eb.Gp)((e,t)=>{let{isRouteMatch:n,...o}=e;return(0,i.jsx)(r.M5,{px:"4",fontSize:"md",fontFamily:"poppins",color:n?"textPrimary.500":"textSecondary.500",fontWeight:n?"semibold":"500",borderBottom:"2px",borderColor:n?"primary.500":"transparent",cursor:"pointer",ref:t,...o})});e_.displayName="Tab";let HeaderNavigationTabLink_normalizeMemberNavHref=e=>(null!=e?e:"").replace(/\/+$/,""),HeaderNavigationTabLink=e=>{var t;let{item:n}=e,{forceMatchHack:o}=useBlueprint(),s=(0,eg.X)(),l="/my-company/dashboard/overview"===n.href?"/my-company":n.href,a=HeaderNavigationTabLink_normalizeMemberNavHref(n.href),c="/events"===a||a.endsWith("/events"),u="/community/meetings/list"===a||"/community/meetings"===a||(null===(t=n.label)||void 0===t?void 0:t.trim().toLowerCase())==="meetings",d=(0,ex.$)(l)||!!o&&n.href===o,m=(0,ex.$)(["/community/meetings","/community/quick-call","/community/quick-meet"]);n.href&&c&&s&&(d=!1),n.href&&"/learning"===a&&s&&(d=!0),n.href&&u&&(d=m||!!o&&(n.href===o||String(o).startsWith("/community/meetings")));let p=n.label.length>25?n.label.slice(0,22).trim()+"...":n.label,h=u?(0,i.jsx)(MeetingsHeaderLabel,{label:p}):p;return n.href?n.isExternal?(0,i.jsx)(e_,{as:"a",target:"_blank",rel:"noreferrer",href:(0,ey.E)(n.href),isRouteMatch:d,children:h}):(0,i.jsx)(e_,{as:v(),href:n.href,isRouteMatch:d,h:"full",children:h}):n.children.length&&n.children.some(e=>e.href)?(0,i.jsxs)(ej.J2,{placement:"bottom",trigger:"hover",children:[(0,i.jsx)(ej.xo,{children:(0,i.jsx)(e_,{isRouteMatch:d,children:(0,i.jsxs)(r.Kq,{direction:"row",alignItems:"center",children:[(0,i.jsx)(r.xu,{children:p}),(0,i.jsx)(P.v4q,{boxSize:"4"})]})})}),(0,i.jsx)(ej.yk,{w:"full",children:(0,i.jsx)(ej.b,{px:"8",py:"4",w:"full",children:(0,i.jsx)(r.Kq,{direction:"row",divider:(0,i.jsx)(r.cX,{}),spacing:"4",children:(0,i.jsx)(r.Kq,{maxWidth:"72",children:n.children.map((e,t)=>e.href?e.isExternal?(0,i.jsxs)(r.Kq,{as:"a",target:"_blank",rel:"noreferrer",href:(0,ey.E)(e.href),direction:"row",alignItems:"center",textStyle:"xlBody",color:"gray.600",_hover:{color:"gray.800"},children:[(0,i.jsx)(r.xu,{noOfLines:1,wordBreak:"break-all",children:e.label}),(0,i.jsx)(P.h0n,{boxSize:"3"})]},t+e.label):(0,i.jsx)(v(),{href:e.href,children:(0,i.jsx)(r.xu,{textStyle:"xlBody",color:"gray.600",_hover:{color:"gray.800"},noOfLines:1,wordBreak:"break-all",children:e.label})},t+e.label):null)})})})})]}):null};
1function HeaderNavigation_templateObject(){let e=(0,G._)(["\n  query HeaderNavigation_Query($input: NavigationInput!) {\n    navigation(input: $input) {\n      items {\n        ...HeaderNavigationTabLink_NavigationItem\n      }\n      metadata {\n        version\n        publishedVersion\n      }\n    }\n  }\n  ","\n"]);return HeaderNavigation_templateObject=function(){return e},e}HeaderNavigationTabLink.navigationItemFragment=(0,V.Ps)(HeaderNavigationTabLink_templateObject());let eI=(0,V.Ps)(HeaderNavigation_templateObject(),HeaderNavigationTabLink.navigationItemFragment),normalizeNavHref=e=>(null!=e?e:"").replace(/\/+$/,""),isCommunityHeaderItem=e=>{var t;let n=normalizeNavHref(e.href);return"/community"===n||(null===(t=e.label)||void 0===t?void 0:t.trim().toLowerCase())==="community"},isMeetingsHeaderItem=e=>{var t;let n=normalizeNavHref(e.href);return n===normalizeNavHref(em.xd)||(null===(t=e.label)||void 0===t?void 0:t.trim().toLowerCase())==="meetings"};function useMergedHeaderNavigationItems(){var e,t,n;let{isWebsiteBuilder:i}=(0,ep.e)(),r=(0,d.x)(),s=(0,W.T)(),l=(0,ed.R)(),a=(0,N.a)(eI,{variables:{input:{isUnpublishedVersion:i}}}),c=null===(e=a.data)||void 0===e?void 0:e.navigation.items,u=!s.isLoading&&!l.isLoading&&s.canAccessEventsFeed&&l.isVisible,m=!!(null===(t=r.user)||void 0===t?void 0:t._id),p=o.useMemo(()=>{if(!c)return[];let e=function(e,t){if(!e.length||!t)return e;let n=e.some(e=>{var t;return"/learning"===e.href||(null===(t=e.label)||void 0===t?void 0:t.trim().toLowerCase())==="learning"});if(n)return e;let i={__typename:"NavigationItem",label:"Learning",href:"/learning",isExternal:!1,children:[]},r=e.findIndex(e=>{var t,n,i;let r=null!==(i=null===(t=e.href)||void 0===t?void 0:t.replace(/\/+$/,""))&&void 0!==i?i:"";return!!("/events"===r||r.endsWith("/events"))||(null===(n=e.label)||void 0===n?void 0:n.trim().toLowerCase())==="events"}),o=[...e];return r>=0?o.splice(r+1,0,i):o.push(i),o}(c,u);return function(e,t){if(t.isWebsiteBuilder||!t.isAuthenticated||e.some(isCommunityHeaderItem)||e.some(isMeetingsHeaderItem))return e;let n={__typename:"NavigationItem",label:"Meetings",href:em.xd,isExternal:!1,children:[]};return[...e,n]}(e,{isAuthenticated:!r.loading&&m,isWebsiteBuilder:i})},[c,u,r.loading,m,i]);return{items:p,hasNavigation:!!(null===(n=a.data)||void 0===n?void 0:n.navigation)&&p.length>0}}let eT=window.innerWidth<1025,eS=eT?4:6,HeaderNavigationTabs=e=>{let{items:t,hasNavigation:n}=useMergedHeaderNavigationItems();if(!n)return null;let o=t.slice(0,eS),s=t.slice(eS),l=s.length>0,a=s.filter(e=>{var t;return null===(t=e.children)||void 0===t?void 0:t.length}),c=a.length<=1?"280px":"550px";return(0,i.jsxs)(r.xu,{display:"flex",alignItems:"center",...e,children:[o.map((e,t)=>(0,i.jsx)(HeaderNavigationTabLink,{item:e},t+e.label)),l&&(0,i.jsxs)(ec.v2,{autoSelect:!1,closeOnSelect:!1,isLazy:!0,children:[(0,i.jsxs)(ec.j2,{as:g.zx,variant:"ghost",size:"sm",ml:2,children:["See More ",(0,i.jsx)(P.v4q,{boxSize:5})]}),(0,i.jsx)(ec.qy,{p:2,minWidth:c,fontFamily:"poppins",children:(0,i.jsxs)(r.xu,{display:"grid",gap:2,width:"full",gridTemplateColumns:"2fr",children:[(0,i.jsx)(r.xu,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(260px, max-content))",gap:2,alignItems:"start",justifyContent:"start",width:"full",children:s.filter(e=>{var t;return null===(t=e.children)||void 0===t?void 0:t.length}).map(e=>(0,i.jsxs)(r.xu,{bg:"bgPrimary.500",h:"full",borderRadius:"md",p:2,children:[(0,i.jsx)(ec.sN,{fontWeight:"semibold",pointerEvents:"none",_hover:{bg:"transparent"},color:"textPrimary.500",width:"auto",border:"0",isDisabled:!0,_disabled:{color:"textPrimary.500"},children:e.label}),e.children.map(e=>(0,i.jsx)(ec.sN,{as:"a",href:e.href||void 0,pl:6,width:"auto",border:"0",_hover:{bg:"bgSecondary.500",color:"textPrimary.500"},children:e.label},e.label))]},e.label))}),s.some(e=>{var t;return!(null===(t=e.children)||void 0===t?void 0:t.length)})&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(r.iz,{orientation:"horizontal",height:"auto",borderTopColor:"storkPrimary.500"})}),(0,i.jsx)(r.xu,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(260px, max-content))",gap:2,alignItems:"start",justifyContent:"start",width:"full",children:s.filter(e=>{var t;return!(null===(t=e.children)||void 0===t?void 0:t.length)}).map(e=>(0,i.jsx)(ec.sN,{as:"a",href:e.href||void 0,width:"auto",_hover:{bg:"bgSecondary.500",color:"textPrimary.500"},children:e.label},e.label))})]})})]})]})},HeaderNavigationMenu=e=>{let t=(0,a.qY)(),{items:n,hasNavigation:o}
1=useMergedHeaderNavigationItems();return o?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.hU,{icon:(0,i.jsx)(P.Oqj,{}),variant:"outline",colorScheme:"gray",onClick:t.onOpen,...e}),(0,i.jsxs)(eu.u_,{isOpen:t.isOpen,onClose:t.onClose,size:"full",scrollBehavior:"inside",children:[(0,i.jsx)(eu.ZA,{}),(0,i.jsxs)(eu.hz,{children:[(0,i.jsx)(eu.ol,{}),(0,i.jsx)(eu.xB,{}),(0,i.jsx)(eu.fe,{p:"0",children:(0,i.jsx)(r.Kq,{textAlign:"center",spacing:"0",children:n.map((e,t)=>(0,i.jsx)(HeaderNavigationMenuLink,{item:e},t+e.label))})})]})]})]}):null};var eN=n(47503);let Header=e=>{var t,n,s,l,c,u,m,p,h,f;let{isContained:j=!0,..._}=e,I=(0,T.U)(),S=(0,a.qY)(),N=(0,a.qY)(),C=(0,d.x)(),[A,O]=o.useState(B.nE.LOGIN_FORM),w=(0,W.T)(),E=(0,y.useRouter)(),P=(0,y.usePathname)(),k=(0,el.Qt)(),[M,R]=o.useState(!1),L=useWebflowNavChrome(),F=L.available||L.configuredForWebflowNav&&L.loading;o.useEffect(()=>{let e=sessionStorage.getItem("initialPath");null===e||e===P||"/"===P||"/login"===P?R(!1):R(!0),null===e&&sessionStorage.setItem("initialPath",P)},[P]);let handleGoBack=()=>{M&&E.back()},q=o.useRef(null),D=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.zx,{onClick:()=>{O(B.nE.LOGIN_FORM),S.onOpen()},colorScheme:"gray",children:"Log in"}),I.isActive?(0,i.jsx)(v(),{href:"/memberships",children:(0,i.jsx)(g.zx,{colorScheme:"primary",children:"Join Now"})}):(null===(t=C.tenant)||void 0===t?void 0:t.accountCreationPermission)===eN.YQ.ANYONE?(0,i.jsx)(g.zx,{onClick:()=>{O(B.nE.SIGNUP_FORM),S.onOpen()},colorScheme:"primary",children:"Sign up"}):null,(0,i.jsx)(B.Hr,{initialPromptState:A,isOpen:S.isOpen,onClose:S.onClose})]}),H=(0,i.jsxs)(i.Fragment,{children:[w.canAccessCommunityAndAuthenticated&&!ea.qj.getItem("isMobile")&&(0,i.jsx)(r.xu,{onClickCapture:N.onClose,children:(0,i.jsx)(b.H,{})}),w.canAccessCommunityAndAuthenticated&&!ea.qj.getItem("isMobile")&&(null===(n=C.tenant)||void 0===n?void 0:n.searchMode)===Z.W.AI&&(null===(l=C.tenant)||void 0===l?void 0:null===(s=l.featureFlags)||void 0===s?void 0:s.aiAskEnabled)===!0&&(0,i.jsx)(AIAsk,{isOpen:N.isOpen,onOpen:N.onOpen,onClose:N.onClose}),(0,i.jsxs)(r.Kq,{direction:"row",spacing:"4",onClickCapture:N.onClose,children:[!ea.qj.getItem("isMobile")&&(0,i.jsx)(X.j,{}),w.canAccessDmPageAndAuthenticated&&k&&(0,i.jsx)($.A,{}),!ea.qj.getItem("isMobile")&&(0,i.jsx)(Y.P,{}),!ea.qj.getItem("isMobile")&&(0,i.jsx)(J.D,{})]})]}),U=(0,i.jsx)(i.Fragment,{children:w.isLoading?null:w.isAuthenticated?F?null:H:D});if(F){let e=(0,ee.b)(null===(h=L.nav)||void 0===h?void 0:h.html),t=!w.isLoading&&!w.isAuthenticated&&!e;return(0,i.jsx)(r.xu,{bg:"white",shadow:"base",as:"header",..._,children:(0,i.jsxs)(r.Kq,{direction:"row",maxW:j?"container.xl":void 0,mx:"auto",alignItems:"center",justify:"space-between",px:"4",spacing:"4",children:[ea.qj.getItem("isMobile")&&M&&(0,i.jsx)(g.zx,{onClick:()=>handleGoBack(),leftIcon:(0,i.jsx)(x.Ee,{src:"/arrow-left-circle.png",alt:"Back",boxSize:6}),bg:"transparent",_hover:{bg:"transparent",color:"black"},_active:{bg:"transparent",color:"black"},_focus:{boxShadow:"none"},color:"black"}),(0,i.jsxs)(r.xu,{ref:q,flex:"1",minW:0,py:"2",display:"flex",alignItems:"center",position:"relative",children:[L.available&&L.nav?(0,i.jsx)(WebflowNavChrome,{nav:L.nav}):null,w.isAuthenticated?(0,i.jsx)(WebflowNavAlignedUtilities,{containerRef:q,htmlKey:null===(f=L.nav)||void 0===f?void 0:f.html}):null]}),t?(0,i.jsx)(r.Kq,{direction:"row",spacing:"4",py:"4",flexShrink:0,justifyContent:"flex-end",alignItems:"center",children:D}):null]})})}return(0,i.jsx)(r.xu,{bg:"white",shadow:"base",as:"header",..._,children:(0,i.jsxs)(r.Kq,{direction:"row",maxW:j?"container.xl":void 0,mx:"auto",alignItems:"stretch",justify:"space-between",px:"4",spacing:"4",children:[(0,i.jsxs)(r.xu,{py:"4",flex:"1",display:"flex",alignItems:"center",children:[ea.qj.getItem("isMobile")&&M&&(0,i.jsx)(g.zx,{onClick:()=>handleGoBack(),leftIcon:(0,i.jsx)(x.Ee,{src:"/arrow-left-circle.png",alt:"Back",boxSize:6}),bg:"transparent",_hover:{bg:"transparent",color:"black"},_active:{bg:"transparent",color:"black"},_focus:{boxShadow:"none"},color:"black"}),(null===(u=C.tenant)||void 0===u?void 0:null===(c=u.logo)||void 0===c?void 0:c.imageProxy)&&!ea.qj.getItem("isMobile")&&(0,i.jsx)(v(),{href:"/",children:(0,i.jsx)(x.Ee,{display:{base:"none",lg:"block"},maxH:"10",maxW:"52",w:"auto",alt:"association logo",src:C.tenant.logo.imageProxy,cursor:"pointer"})}),(null===(p=C.tenant)||void 0===p?void 0:null===(m=p.logoIcon)||void 0===m?void 0:m.imageProxy)&&!ea.qj.getItem("isMobile")&&(0,i.jsx)(v(),{href:"/",children:(0,i.jsx)(x.Ee,{display:{lg:"none"},maxH:"10",maxW:"10",w:"auto",alt:"association logo",src:C.tenant.logoIcon.imageProxy,cursor:"pointer"})})]}),(0,i.jsx)(HeaderNavigationTabs,{display:{base:"none",lg:"flex"}}),(0,i.jsxs)(r.Kq,{direction:"row",spacing:"4",py:"4",flex:"1",justifyContent:"flex-end",children:[U,!ea.qj.getItem("isMobile")&&(0,i.jsx)(HeaderNavigationMenu,{display:{lg:"none"},"aria-label":"navigation menu"})]})]})})};var eC=n(50319),eA=n(49184),eO=n(16225),ew=n(64570),eE=n(86678);
1function PrivacyPolicyModal_templateObject(){let e=(0,G._)(["\n  mutation PrivacyPolicyModal_AcceptPrivacyPolicy(\n    $input: AcceptPrivacyPolicyInput!\n  ) {\n    acceptPrivacyPolicy(input: $input) {\n      user {\n        _id\n        acceptedPrivacyPolicy\n      }\n    }\n  }\n"]);return PrivacyPolicyModal_templateObject=function(){return e},e}let eP=(0,V.Ps)(PrivacyPolicyModal_templateObject()),PrivacyPolicyModal=e=>{var t,n,s,l,a,c,u,m,p,x;let f=(0,d.x)(),{impersonationActive:v}=(0,h.nm)(),[y,b]=o.useState(null!==(t=f.user)&&void 0!==t&&!!t.acceptedPrivacyPolicy),[j,_]=(0,eC.D)(eP),I=!(null===(n=f.tenant)||void 0===n?void 0:n.obnoxiousPrivacyPolicy)||!!(null===(s=f.user)||void 0===s?void 0:s.acceptedPrivacyPolicy);return(0,i.jsxs)(eu.u_,{isOpen:e.isOpen,onClose:e.onClose,scrollBehavior:"inside",closeOnOverlayClick:I,closeOnEsc:v||I,isCentered:!0,size:["full","full","xl"],children:[(0,i.jsx)(eu.ZA,{}),(0,i.jsxs)(eu.hz,{children:[I&&(0,i.jsx)(eu.ol,{color:"black"}),(0,i.jsx)(eu.xB,{textAlign:"center",pt:"10",pb:"6",children:(0,i.jsxs)(r.gC,{spacing:"2",children:[(0,i.jsx)(ew.d,{symbol:"\uD83D\uDCC3",fontSize:"4xl"}),(0,i.jsxs)(r.X6,{size:"md",children:[!(null===(l=f.user)||void 0===l?void 0:l.acceptedPrivacyPolicy)&&(0,i.jsx)(i.Fragment,{children:"Please Read and Accept the "}),"".concat(null===(a=f.tenant)||void 0===a?void 0:a.displayName," Privacy Policy")]})]})}),(0,i.jsx)(eu.fe,{display:"flex",flexDirection:"column",pb:"6",children:(0,i.jsx)(r.xu,{bg:"gray.100",p:"4",h:"xs",overflow:"auto",borderWidth:"1px",borderColor:"gray.200",borderRadius:"xl",children:(null===(c=f.tenant)||void 0===c?void 0:c.privacyPolicy)&&(0,i.jsx)(eE.M,{children:(0,i.jsx)(eO.$,{rawDraftContentState:null===(u=f.tenant)||void 0===u?void 0:u.privacyPolicy})})})}),(0,i.jsx)(eu.mz,{pt:"2",pb:"6",children:(null===(m=f.user)||void 0===m?void 0:m.acceptedPrivacyPolicy)?(0,i.jsx)(g.zx,{onClick:e.onClose,children:"Okay"}):(0,i.jsxs)(r.kC,{w:"full",justify:"space-between",children:[(0,i.jsx)(eA.XZ,{isDisabled:!!(null===(p=f.user)||void 0===p?void 0:p.acceptedPrivacyPolicy),isChecked:y,onChange:()=>b(e=>!e),mr:"2",children:"I've read and accepted the privacy policy"}),(0,i.jsx)(g.zx,{isDisabled:!y||!!(null===(x=f.user)||void 0===x?void 0:x.acceptedPrivacyPolicy),isLoading:_.loading,onClick:async()=>{y&&(await j({variables:{input:{isPartOfOnboardingFlow:!1}}}),e.onClose())},children:"Accept"})]})})]})]})},PrivacyPolicyBanner=e=>{var t;let{isOpen:n,onOpen:r,onClose:s}=(0,a.qY)(),l=(0,d.x)();return(o.useEffect(()=>{let e=setTimeout(()=>{var e;(null===(e=l.tenant)||void 0===e?void 0:e.obnoxiousPrivacyPolicy)===!0&&r()},500);return()=>clearTimeout(e)},[null===(t=l.tenant)||void 0===t?void 0:t.obnoxiousPrivacyPolicy,r]),l.tenant&&l.user&&!l.user.acceptedPrivacyPolicy&&l.tenant.privacyPolicy&&l.tenant.obnoxiousPrivacyPolicy&&""!==(0,c.convertFromRaw)(l.tenant.privacyPolicy).getPlainText()&&l.user.onboardingFlowState.isSkippedOrCompleted)?(0,i.jsx)(PrivacyPolicyModal,{isOpen:n,onClose:s}):null};function TermsAndConditionsModal_templateObject(){let e=(0,G._)(["\n  mutation TermsAndConditionsModal_AcceptTermsAndConditions(\n    $input: AcceptTermsAndConditionsInput!\n  ) {\n    acceptTermsAndConditions(input: $input) {\n      user {\n        _id\n        acceptedTermsAndConditions\n      }\n    }\n  }\n"]);return TermsAndConditionsModal_templateObject=function(){return e},e}let ek=(0,V.Ps)(TermsAndConditionsModal_templateObject()),TermsAndConditionsModal=e=>{var t,n,s,l,a,c,u,m,p,x;let f=(0,d.x)(),{impersonationActive:v}=(0,h.nm)(),[y,b]=o.useState(null!==(t=f.user)&&void 0!==t&&!!t.acceptedTermsAndConditions),[j,_]=(0,eC.D)(ek),I=!(null===(n=f.tenant)||void 0===n?void 0:n.obnoxiousTermsAndConditions)||!!(null===(s=f.user)||void 0===s?void 0:s.acceptedTermsAndConditions);return(0,i.jsxs)(eu.u_,{isOpen:e.isOpen,onClose:e.onClose,scrollBehavior:"inside",closeOnOverlayClick:I,closeOnEsc:v||I,isCentered:!0,size:["full","full","xl"],children:[(0,i.jsx)(eu.ZA,{}),(0,i.jsxs)(eu.hz,{children:[I&&(0,i.jsx)(eu.ol,{color:"black"}),(0,i.jsx)(eu.xB,{textAlign:"center",pt:"10",pb:"6",children:(0,i.jsxs)(r.gC,{spacing:"2",children:[(0,i.jsx)(ew.d,{symbol:"\uD83D\uDCC3",fontSize:"4xl"}),(0,i.jsxs)(r.X6,{size:"md",children:[!(null===(l=f.user)||void 0===l?void 0:l.acceptedTermsAndConditions)&&(0,i.jsx)(i.Fragment,{children:"Please Read and Accept the "}),"".concat(null===(a=f.tenant)||void 0===a?void 0:a.displayName," Terms And Conditions")]})]})}),(0,i.jsx)(eu.fe,{display:"flex",flexDirection:"column",pb:"6",children:(0,i.jsx)(r.xu,{bg:"gray.100",p:"4",h:"xs",overflow:"auto",borderWidth:"1px",borderColor:"gray.200",borderRadius:"xl",children:(null===(c=f.tenant)||void 0===c?void 0:c.termsAndConditions)&&(0,i.jsx)(eE.M,{children:(0,i.jsx)(eO.$,{rawDraftContentState:null===(u=f.tenant)||void 0===u?void 0:u.termsAndConditions})})})}),(0,i.jsx)(eu.mz,{pt:"2",pb:"6",children:(null===(m=f.user)||void 0===m?void 0:m.acceptedTermsAndConditions)?(0,i.jsx)(g.zx,{onClick:e.onClose,children:"Okay"}):(0,i.jsxs)(r.kC,{w:"full",justify:"space-between",children:[(0,i.jsx)(eA.XZ,{isDisabled:!!(null===(p=f.user)||void 0===p?void 0:p.acceptedTermsAndConditions),isChecked:y,onChange:()=>b(e=>!e),mr:"2",children:"I've read and accepted the terms and conditions"}),(0,i.jsx)(g.zx,{isDisabled:!y||!!(null===(x=f.user)||void 0===x?void 0:x.acceptedTermsAndConditions),isLoading:_.loading,onClick:async()=>{y&&(await j({variables:{input:{isPartOfOnboardingFlow:!1}}}),e.onClose())},children:"Accept"})]})})]})]})},TermsAndConditionsBanner=e=>{var t;let{isOpen:n,onOpen:r,onClose:s}=(0,a.qY)(),l=(0,d.x)();return(o.useEffect(()=>{let e=setTimeout(()=>{var e;(null===(e=l.tenant)||void 0===e?void 0:e.obnoxiousTermsAndConditions)===!0&&r()},500);return()=>clearTimeout(e)},[null===(t=l.tenant)||void 0===t?void 0:t.obnoxiousTermsAndConditions,r]),l.tenant&&l.user&&!l.user.acceptedTermsAndConditions&&l.tenant.termsAndConditions&&l.tenant.obnoxiousTermsAndConditions&&""!==(0,c.convertFromRaw)(l.tenant.termsAndConditions).getPlainText()&&l.user.onboardingFlowState.isSkippedOrCompleted)?(0,i.jsx)(TermsAndConditionsModal,{isOpen:n,onClose:s}):null},eM=o.createContext({portal:{current:null},headerHeight:0,forceMatchHack:null,setForceMatchHack:()=>null}),useBlueprint=()=>o.useContext(eM),Blueprint=e=>{let{isHeaderContained:t,...n}=e,s=o.useRef(null),a=(0,p.T)(),[c,u]=o.useState(null);return(0,i.jsx)(eM.Provider,{value:{portal:s,headerHeight:a.height,forceMatchHack:c,setForceMatchHack:u},children:(0,i.jsxs)(l.y,{children:[(0,i.jsxs)(r.xu,{ref:a.ref,position:"sticky",top:"0",zIndex:"docked",...n,children:[(0,i.jsx)(m.n,{zIndex:"6",position:"relative"}),(0,i.jsx)(h.t0,{zIndex:"5",position:"relative"}),(0,i.jsx)(Header,{zIndex:"4",position:"relative",isContained:t}),(0,i.jsx)(TermsAndConditionsBanner,{zIndex:"2",position:"relative"}),(0,i.jsx)(PrivacyPolicyBanner,{zIndex:"2",position:"relative"}),(0,i.jsx)(CodeOfConductBanner,{zIndex:"3",position:"relative"}),(0,i.jsx)(r.xu,{ref:s,zIndex:"1",position:"relative"})]}),n.children]})})}},58857:function(e,t,n){"use strict";n.d(t,{l:function(){return WebflowNavUtilityCluster}});var i=n(85893),r=n(48641);n(67294);var o=n(15414),s=n(62893),l=n(68745),a=n(65442),c=n(86398),u=n(98530),d=n(93710),m=n(93
1064);let WebflowNavUtilityCluster=()=>{let e=(0,s.T)(),t=(0,m.Qt)();return e.isLoading||!e.isAuthenticated||d.qj.getItem("isMobile")?null:(0,i.jsxs)(r.Kq,{direction:"row",spacing:"4",alignItems:"center",children:[e.canAccessCommunityAndAuthenticated?(0,i.jsx)(o.H,{}):null,(0,i.jsx)(u.j,{}),e.canAccessDmPageAndAuthenticated&&t?(0,i.jsx)(c.A,{}):null,(0,i.jsx)(a.P,{}),(0,i.jsx)(l.D,{})]})}},40308:function(e,t,n){"use strict";n.d(t,{N:function(){return syncGuestAuthLinkVisibility},b:function(){return webflowNavHtmlHasGuestAuthControls}});let i=["/login","/signup","/sign-up","/sign_up","/register","/log-in","/sign-in","/memberships","/join"],r=/^(log\s*in|login|sign\s*up|signup|sign\s*in|signin|register|join(\s+now)?)\b/i,o="data-tradewing-nav",normalizePathname=e=>{let t=e.replace(/\/+$/,"");return(t||"/").toLowerCase()},isGuestAuthHref=e=>{let t=e.trim();if(!t||t.startsWith("#")||t.startsWith("mailto:")||t.startsWith("tel:")||t.startsWith("javascript:"))return!1;try{let e=new URL(t,"https://tradewing.local"),n=normalizePathname(e.pathname);return i.some(e=>n===e||n.startsWith("".concat(e,"/")))}catch(e){return!1}},isGuestAuthLabel=e=>{let t=e.replace(/\s+/g," ").trim();return!!t&&!(t.length>24)&&r.test(t)},isGuestAuthControl=e=>{if(e instanceof HTMLAnchorElement){let t=e.getAttribute("href")||"";if(isGuestAuthHref(t))return!0}return!!isGuestAuthLabel(e.textContent||"")},resolveHideTarget=(e,t)=>{let n=e.parentElement;return n&&n!==t&&1===n.children.length?n:e},resolveNavScope=e=>{if(e.id===o)return e;let t=e.querySelector("#".concat(o));return t||e},webflowNavHtmlHasGuestAuthControls=e=>{if(!e)return!1;for(let t of e.matchAll(/<a\b[^>]*\bhref\s*=\s*(["'])(.*?)\1[^>]*>/gi))if(isGuestAuthHref(t[2]||""))return!0;for(let t of e.matchAll(/<(?:a|button)\b[^>]*>([\s\S]*?)<\/(?:a|button)>/gi)){let e=(t[1]||"").replace(/<[^>]+>/g," ");if(isGuestAuthLabel(e))return!0}return!1},syncGuestAuthLinkVisibility=(e,t)=>{let n=resolveNavScope(e),i=n.querySelectorAll('a[href], button, [role="button"]');i.forEach(e=>{if(!(e instanceof HTMLElement)||!isGuestAuthControl(e))return;let i=resolveHideTarget(e,n);if(t){if("1"===i.dataset.twAuthHidden)return;i.dataset.twAuthHidden="1",i.dataset.twAuthPrevDisplay=i.style.display,i.style.display="none";return}"1"===i.dataset.twAuthHidden&&(i.style.display=i.dataset.twAuthPrevDisplay||"",delete i.dataset.twAuthHidden,delete i.dataset.twAuthPrevDisplay)})}},98539:function(e,t,n){"use strict";n.d(t,{e:function(){return useAlphabetSoup},w:function(){return AlphabetSoupProvider}});var i=n(85893),r=n(67294);let o=r.createContext({isWebsiteBuilder:!1,highlightedContentIndex:{value:null,shouldScroll:!1},setHighlightedContentIndex:()=>console.error("Attempted to use Alphabet Soup without a provider."),carouselIndex:0,setCarouselIndex:()=>console.error("Attempted to use Alphabet Soup without a provider.")}),useAlphabetSoup=()=>r.useContext(o),AlphabetSoupProvider=e=>{let[t,n]=r.useState({value:null,shouldScroll:!1}),[s,l]=r.useState(void 0);return r.useEffect(()=>{l(void 0)},[t]),(0,i.jsx)(o.Provider,{value:{...e,highlightedContentIndex:t,setHighlightedContentIndex:n,carouselIndex:s,setCarouselIndex:l},children:e.children})}},78749:function(e,t,n){"use strict";n.d(t,{$A:function(){return h},DF:function(){return g},En:function(){return x},JB:function(){return o},JK:function(){return s},JN:function(){return r},WX:function(){return l},X4:function(){return i},el:function(){return a},le:function(){return d},mr:function(){return p},v4:function(){return u},vU:function(){return m},xd:function(){return c}});let i="/admin/meetings/list",r="/admin/meetings/list?tab=meet",o="/admin/meetings/quick-call",s="/admin/meetings/meet",l="/admin/meetings/quick-call/new",a="/admin/meetings/meet/new",c="/community/meetings/list",u="/community/meetings/list?tab=meet",d="/community/meetings/quick-call",m="/community/meetings/meet",p="/community/meetings/quick-call/new",h="/community/meetings/meet/new",g="Meetings",x="Create, share, and manage instant video calls."},39615:function(e,t,n){"use strict";n.d(t,{E:function(){return getExternalUrl}});let getExternalUrl=e=>e?e.match(/^http?:\/\//i)||e.match(/^https?:\/\//i)?e:"http://"+e:void 0},86415:function(e){e.exports={citationAnswer:"AIAskSources_citationAnswer__hImxO",citationChipLink:"AIAskSources_citationChipLink__jca_U",citationChipWrap:"AIAskSources_citationChipWrap__Wknr_",citationChip:"AIAskSources_citationChip__INUns",citationChipNum:"AIAskSources_citationChipNum__aHPeo",citationChipTitle:"AIAskSources_citationChipTitle__EnuSm",sourceCards:"AIAskSources_sourceCards__Cmnd6",sourceCardsTitle:"AIAskSources_sourceCardsTitle__M_rvh",sourceCardsList:"AIAskSources_sourceCardsList__vjY_h",sourceCard:"AIAskSources_sourceCard__FGw1X",sourceCardBadge:"AIAskSources_sourceCardBadge__TePCl",sourceCardBody:"AIAskSources_sourceCardBody__zqfCy",sourceCardTitle:"AIAskSources_sourceCardTitle__OoMFE",sourceCardTitleLink:"AIAskSources_sourceCardTitleLink__GMypJ",sourceCardTitlePlain:"AIAskSources_sourceCardTitlePlain__pPyGz",sourceCardExt:"AIAskSources_sourceCardExt__T7Stm",sourceCardMeta:"AIAskSources_sourceCardMeta__n16sU",askText:"AIAskSources_askText__B646b",askTyping:"AIAskSources_askTyping__ykt6R","ask-blink":"AIAskSources_ask-blink__QDgMc"}}}]);
2//# sourceMappingURL=197-b8dab7c6fe04a0d3.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.