PageSourceSearch

https://arttoronto.ca/static/js/HubPortfolioView.96f4b53e.chunk.js

js arttoronto.ca collected 2026-09-24 19:20:41 UTC 7,591 bytes, 2 lines download raw bytes

1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__||=[]).push([[1351],{15767(e,t,a){a.r(t),a.d(t,{HubPortfolioView:()=>f,default:()=>_});var o=a(76998),s=a(13761),i=a(59453),l=a(23236),r=a(99867),c=a(23446);const n=(0,s.Ng)(function(e){return{pageConfig:e.pageConfig}})(function(e){var t;const{portfolio:{data:{name:a,heroSection:o={}}={}}={},pageConfig:{tenantId:s}={}}=e,i=o.callToAction||{},n=(0,l.gt)(s,null===(t=o.background)||void 0===t?void 0:t.path);return(0,c.jsxs)("div",{className:"portfolio-hero lazy","data-background-image":n,children:[(0,c.jsxs)("div",{className:"container",children:[(0,c.jsx)("div",{className:"row",children:(0,c.jsx)("div",{className:"col-xs-12",children:(0,c.jsxs)("div",{className:"portfolio-hero__heading",children:[(0,c.jsx)("div",{className:"portfolio-hero__heading-name",children:a}),(0,c.jsx)("div",{className:"portfolio-hero__heading-title",children:o.valueProposition}),(0,c.jsx)("div",{className:"portfolio-hero__heading-subtitle",children:o.subTitle})]})})}),(0,c.jsx)("div",{className:"row",children:o.tiles.filter(e=>e.shown).map((e,t)=>(0,c.jsx)("div",{className:"col-xs-12 col-sm-6 col-md-3",children:(0,c.jsxs)("div",{className:"portfolio-hero__tile",children:[(0,c.jsx)("div",{className:"portfolio-hero__tile-large",children:e.large}),(0,c.jsx)("div",{className:"portfolio-hero__tile-small",children:e.small})]})},t))})]}),i.bannerText&&(0,c.jsx)("div",{className:"portfolio-hero__banner",children:(0,c.jsx)("div",{className:"container",children:(0,c.jsxs)("div",{className:"row",children:[(0,c.jsx)("div",{className:"col-xs-12 col-sm-6",children:(0,c.jsx)("div",{className:"portfolio-hero__banner-text",children:i.bannerText})}),(0,c.jsx)("div",{className:"col-xs-12 col-sm-6",children:(0,c.jsx)("div",{className:"text-right",children:i.buttonHref&&(0,c.jsx)(r.A,{to:i.buttonHref,type:"button",target:"_self",className:"portfolio-hero__banner-cta",label:i.buttonText})})})]})})})]})});var d=a(37839),m=a(56468);function p(e){const{withBorder:t,content:a}=e,o="VIDEO"===a?"play_arrow":"AUDIO"===a?"volume_up":"AGENDA_BROCHURE"===a||"SPEX_BROCHURE"===a||"WHITEPAPER"===a?"get_app":"";return(0,c.jsxs)("span",{className:"lead-gen-badge "+(t?"lead-gen-badge--with-border":""),children:[(0,c.jsx)("div",{className:"lead-gen-badge__text",children:"Premium"}),o&&(0,c.jsx)("i",{className:"material-icons lead-gen-badge__icon",children:o})]})}class h extends o.Component{constructor(e){super(e),this.state={details:this.getDetails(),backgroundColor:this.getBackgroundColor(),backgroundImage:this.getBackgroundImage()}}getDetails(){const{type:e,item:t,featured:a}=this.props,o={};switch(e){case"event":o.type="event",o.tenant=t.tenant,o.domain=t.domain,o.path=t.details.path+"/",o.heading=t.details.name,o.addressCity=t.details.address.city,o.formattedDate=d.A.getEventDates(t.details.date.startDate,t.details.date.endDate,m.A.defaultLanguage),o.valueProposition=t.details.valueProposition,o.label=a?"FEATURED":"UPCOMING EVENT",o.startDate=t.details.date.startDate,o.endDate=t.details.date.endDate,o.addressName=t.details.address.name+(t.details.address.city?", "+t.details.address.city:""),o.address=t.details.address.address;break;case"article":o.type="article",o.path=t.articlePath+"/",o.heading=t.title,o.label=t.primaryTopic||"ARTICLE",o.gated=t.gated,o.contentType=t.contentType}return o}getBackgroundColor(){const{type:e,item:t}=this.props;return"event"===e?(0,l.DR)(t.brand.colours.primary,1):"article"===e?(0,l.DR)("#000000",.6):"transparent"}getBackgroundImage(){const{type:e,item:t,pageConfig:{tenantId:a}={}}=this.props;var o;return"event"===e?(0,l.gt)(a,null===(o=t.backgroundImage)||void 0===o?void 0:o.path,"w=800"):"article"===e?(0,l.gt)(a,t.imageUrl,"w=800"):null}render(){const{details:{type:e,domain:t,tenant:a,path:o,heading:s,label:i,formattedDate:n,startDate:d,endDate:m,address:h,addressCity:g,addressName:x,valueProposition:f,description:_,gated:u,contentType:v},backgroundImage:j,backgroundColor:b}=this.state,{featured:N=!1,size:k="small"}=this.props;return(0,c.jsxs)(r.A,{to:o,tenant:a,parent:"article"===e,className:`c-portfolio-block c-portfolio-block--${e} ${k} ${N?"featured":""}`,children:[(0,c.jsx)("div",{className:"c-portfolio-block__background-image lazy","data-background-image":j}),(0,c.jsx)("div",{className:"c-portfolio-block__background-overlay",style:{backgroundColor:b}}),(0,c.jsx)("div",{className:"c-portfolio-block__background-gradient"}),(0,c.jsxs)("div",{className:"c-portfolio-block__content",children:[(0,c.jsx)("div",{className:"c-portfolio-block__badge",children:u&&(0,c.jsx)(p,{content:v})}),(0,c.jsxs)("div",{className:"c-portfolio-block__data",children:[(0,c.jsxs)("div",{className:"c-portfolio-block__left",children:[i&&(0,c.jsx)("div",{className:"c-portfolio-block__label",children:i}),s&&(0,c.jsx)("h3",{className:"c-portfolio-block__heading",children:s}),_&&(0,c.jsx)("div",{className:"c-portfolio-block__description",children:_}),N&&n&&(0,c.jsx)("div",{className:"c-portfolio-block__date",children:n})]}),(0,c.jsxs)("div",{className:"c-portfolio-block__right",children:[!N&&n&&(0,c.jsx)("div",{className:"c-portfolio-block__date",children:n}),g&&(0,c.jsx)("p",{className:"c-portfolio-block__address",children:g}),N&&f&&(0,c.jsxs)("div",{children:[(0,c.jsx)("p",{className:"c-portfolio-block__value-proposition",children:f}),(0,c.jsxs)("div",{className:"c-portfolio-block__upcoming-event-button",children:[(0,c.jsx)("i",{className:"fa fa-arrow-circle-right"})," GO TO SITE"]})]})]})]})]}),"event"===e&&(0,c.jsxs)("div",{itemScope:!0,itemType:"http://schema.org/Event",children:[(0,c.jsx)("meta",{itemProp:"name",content:s}),(0,c.jsx)("meta",{itemProp:"startDate",content:d}),(0,c.jsx)("meta",{itemProp:"endDate",content:m}),(0,c.jsx)("meta",{itemProp:"url",content:(0,l.Kf)(o,t)}),(0,c.jsxs)("div",{itemProp:"location",itemScope:!0,itemType:"http://schema.org/Place",children:[(0,c.jsx)("meta",{itemProp:"name",content:x}),(0,c.jsx)("meta",{itemProp:"address",content:h})]})]})]})}}
1const g=(0,s.Ng)(function(e){return{pageConfig:e.pageConfig}})(h);class x extends o.Component{constructor(e){super(e),this.componentRef=o.createRef()}componentDidMount(){this.setBlockHeight()}setBlockHeight(){const e=[...this.componentRef.current.querySelectorAll(".c-portfolio-block__data")].slice(1),t=80+Math.max.apply(Math,[...e].map(e=>e.clientHeight))+"px";[...e].forEach(e=>{e.parentNode.parentNode.style.height=t})}render(){const{items:e=[],featuredItem:t={}}=this.props;return(0,c.jsx)("div",{ref:this.componentRef,className:"c-portfolio-table",children:(0,c.jsx)("div",{className:"container",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsx)("div",{className:"col-xs-12 c-portfolio-table__content",children:(0,c.jsxs)("div",{className:"row",children:[(0,c.jsx)("div",{className:"col-xs-12",children:(0,c.jsx)("div",{className:"c-portfolio-table__item c-portfolio-table__item--first-child",children:t&&(0,c.jsx)(g,{item:t,type:t.type,size:"large",featured:!0})})}),e.map((e,t)=>{const a=(0,l.lZ)(t+3);return(0,c.jsx)("div",{className:"col-xs-12 col-sm-6 col-md-"+(a?8:4),children:(0,c.jsx)("div",{className:"c-portfolio-table__item",children:(0,c.jsx)(g,{item:e,type:e.type,size:a?"large":"small"})})},t)})]})})})})})}}function f(e){const{portfolio:t,portfolio:{data:{featuredEvent:a={},portfolioLinkViews:o=[]}={},meta:{title:s}={}}={}}=e;return(0,c.jsxs)(i.A,{helmet:{title:s},children:[(0,c.jsx)(n,{portfolio:t}),(0,c.jsx)(x,{items:o,featuredItem:a})]})}const _=(0,s.Ng)(function(e){return{portfolio:e.portfolio}})(f)}}]);
2//# sourceMappingURL=HubPortfolioView.96f4b53e.chunk.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.