!function(){"use strict";var e,t={127:function(){var e=window.React,t=window.wp.blocks,l=window.wp.blockEditor,r=window.wp.i18n,a=window.wp.components,n=JSON.parse('{"UU":"purdue/storytelling-hero"}'),o=window.wp.primitives;(0,t.registerBlockType)(n.UU,{icon:()=>(0,e.createElement)(o.SVG,{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,e.createElement)("defs",null),(0,e.createElement)("g",{id:"Window-maximize",className:"cls-1"},(0,e.createElement)("g",{className:"cls-1"},(0,e.createElement)(o.Path,{className:"color-d9ab28",d:"M100,16.62V85.37a9.38,9.38,0,0,1-9.37,9.37H9.37A9.38,9.38,0,0,1,0,85.37V16.62A9.38,9.38,0,0,1,9.37,7.24H90.63A9.38,9.38,0,0,1,100,16.62ZM90.63,38.49H9.37v45.7a1.18,1.18,0,0,0,1.18,1.18h78.9a1.18,1.18,0,0,0,1.18-1.18Z",transform:"translate(0 -7.24)"})))),edit:t=>{const{id:n,heroTitle:o,heroSubtitle:i,heroImageID:c,heroImageURL:m,heroImageAlt:s,heroImagePosition:u}=t.attributes,{setAttributes:h}=t,d=(0,l.useBlockProps)({className:"storytelling-hero-block section"});return[(0,e.createElement)(l.InspectorControls,{key:"1"},(0,e.createElement)(a.PanelBody,{title:(0,r.__)("Hero Settings","purdue-home-theme-child-contenthub")},(0,e.createElement)(a.PanelRow,null,(0,e.createElement)(a.SelectControl,{label:"Mobile Image Position",value:u,options:[{label:"Left",value:"left"},{label:"Center",value:"center"},{label:"Right",value:"right"}],onChange:e=>h({heroImagePosition:e})})))),(0,e.createElement)("div",{...d,key:"2"},(0,e.createElement)(l.MediaUploadCheck,null,(0,e.createElement)(l.MediaUpload,{onSelect:e=>{h({heroImageID:e.id,heroImageURL:e.url,heroImageAlt:e.alt})},allowedTypes:["image"],value:c,render:({open:t})=>(0,e.createElement)(e.Fragment,null,m?(0,e.createElement)("div",{className:"block-image-wrapper"},(0,e.createElement)("img",{src:m,alt:s}),(0,e.createElement)("div",{className:"block-image-controls"},(0,e.createElement)(a.Button,{onClick:t,variant:"secondary"},(0,r.__)("Replace","text-domain")),(0,e.createElement)(a.Button,{isDestructive:!0,onClick:()=>h({heroImageID:null,heroImageURL:"",heroImageAlt:""})},(0,r.__)("Remove","text-domain")))):(0,e.createElement)(l.MediaPlaceholder,{onSelect:e=>{h({heroImageID:e.id,heroImageURL:e.url,heroImageAlt:e.alt})},allowedTypes:["image"],multiple:!1}))})),(0,e.createElement)(l.RichText,{tagName:"h1",className:"hero-title",value:o,placeholder:"Title",onChange:e=>h({heroTitle:e})}),(0,e.createElement)(l.RichText,{tagName:"p",className:"hero-subtitle",value:i,placeholder:"Add subtitle…",onChange:e=>h({heroSubtitle:e})}))]},save:()=>(0,e.createElement)(l.InnerBlocks.Content,null)})}},l={};function r(e){var a=l[e];if(void 0!==a)return a.exports;var n=l[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.m=t,e=[],r.O=function(t,l,a,n){if(!l){var o=1/0;for(s=0;s<e.length;s++){l=e[s][0],a=e[s][1],n=e[s][2];for(var i=!0,c=0;c<l.length;c++)(!1&n||o>=n)&&Object.keys(r.O).every(function(e){return r.O[e](l[c])})?l.splice(c--,1):(i=!1,n<o&&(o=n));if(i){e.splice(s--,1);var m=a();void 0!==m&&(t=m)}}return t}n=n||0;for(var s=e.length;s>0&&e[s-1][2]>n;s--)e[s]=e[s-1];e[s]=[l,a,n]},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={978:0,870:0};r.O.j=function(t){return 0===e[t]};var t=function(t,l){var a,n,o=l[0],i=l[1],c=l[2],m=0;if(o.some(function(t){return 0!==e[t]})){for(a in i)r.o(i,a)&&(r.m[a]=i[a]);if(c)var s=c(r)}for(t&&t(l);m<o.length;m++)n=o[m],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return r.O(s)},l=self.webpackChunkpurdue_home_theme_child=self.webpackChunkpurdue_home_theme_child||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var a=r.O(void 0,[870],function(){return r(127)});a=r.O(a)}();