From 1e3fa975558e52f001d36732781c9906666b69e2 Mon Sep 17 00:00:00 2001 From: Zong Date: Mon, 20 Feb 2023 12:07:54 -0500 Subject: [PATCH] Adjust image gallery class --- ...c1bab.asset.php => block.f67b1671ab8d8ba0dc61.asset.php} | 2 +- ...b667f902d3c4dec1bab.js => block.f67b1671ab8d8ba0dc61.js} | 2 +- ...1bab.asset.php => editor.f67b1671ab8d8ba0dc61.asset.php} | 0 ...7f902d3c4dec1bab.css => editor.f67b1671ab8d8ba0dc61.css} | 0 ...ab.asset.php => frontend.f67b1671ab8d8ba0dc61.asset.php} | 0 ...7f902d3c4dec1bab.js => frontend.f67b1671ab8d8ba0dc61.js} | 0 ...c1bab.asset.php => style.f67b1671ab8d8ba0dc61.asset.php} | 0 ...67f902d3c4dec1bab.css => style.f67b1671ab8d8ba0dc61.css} | 0 src/image-gallery/block.js | 2 +- src/image-gallery/index.php | 6 +++--- 10 files changed, 6 insertions(+), 6 deletions(-) rename build/{block.0b667f902d3c4dec1bab.asset.php => block.f67b1671ab8d8ba0dc61.asset.php} (67%) rename build/{block.0b667f902d3c4dec1bab.js => block.f67b1671ab8d8ba0dc61.js} (93%) rename build/{editor.0b667f902d3c4dec1bab.asset.php => editor.f67b1671ab8d8ba0dc61.asset.php} (100%) rename build/{editor.0b667f902d3c4dec1bab.css => editor.f67b1671ab8d8ba0dc61.css} (100%) rename build/{frontend.0b667f902d3c4dec1bab.asset.php => frontend.f67b1671ab8d8ba0dc61.asset.php} (100%) rename build/{frontend.0b667f902d3c4dec1bab.js => frontend.f67b1671ab8d8ba0dc61.js} (100%) rename build/{style.0b667f902d3c4dec1bab.asset.php => style.f67b1671ab8d8ba0dc61.asset.php} (100%) rename build/{style.0b667f902d3c4dec1bab.css => style.f67b1671ab8d8ba0dc61.css} (100%) diff --git a/build/block.0b667f902d3c4dec1bab.asset.php b/build/block.f67b1671ab8d8ba0dc61.asset.php similarity index 67% rename from build/block.0b667f902d3c4dec1bab.asset.php rename to build/block.f67b1671ab8d8ba0dc61.asset.php index a7f0c62..5291aff 100644 --- a/build/block.0b667f902d3c4dec1bab.asset.php +++ b/build/block.f67b1671ab8d8ba0dc61.asset.php @@ -1 +1 @@ - array('react', 'wp-blocks', 'wp-element', 'wp-icons/build-types', 'wp-primitives', 'wp-server-side-render'), 'version' => 'c3bbbdbcc0c52987e1b0e1eef2d39e69'); \ No newline at end of file + array('react', 'wp-blocks', 'wp-element', 'wp-icons/build-types', 'wp-primitives', 'wp-server-side-render'), 'version' => '024cf933165271275f0d88fc92f6a54a'); \ No newline at end of file diff --git a/build/block.0b667f902d3c4dec1bab.js b/build/block.f67b1671ab8d8ba0dc61.js similarity index 93% rename from build/block.0b667f902d3c4dec1bab.js rename to build/block.f67b1671ab8d8ba0dc61.js index 923e858..1febee5 100644 --- a/build/block.0b667f902d3c4dec1bab.js +++ b/build/block.f67b1671ab8d8ba0dc61.js @@ -1 +1 @@ -!function(){var e={94184:function(e,t){var a;!function(){"use strict";var l={}.hasOwnProperty;function r(){for(var e=[],t=0;t-1&&e%1==0&&e<=9007199254740991}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},36719:function(e,t,a){var l=a(38749),r=a(7518),n=a(31167),s=n&&n.isTypedArray,o=s?r(s):l;e.exports=o},95062:function(e){e.exports=function(){return!1}},16941:function(e,t,a){var l=a(51474),r=a(94184),n=a(99196),s=a(2177);function o(e){return e&&e.__esModule?e.default:e}function i(e,t,a,l){Object.defineProperty(e,t,{get:a,set:l,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e){e.forEach((e=>c(e.element)))}function d(e){e.forEach((e=>{!function(e,t,a){const l=e.children[a]||null;e.insertBefore(t,l)}(e.parentElement,e.element,e.oldIndex)}))}function m(e,t){const a=h(e),l={parentElement:e.from};let r=[];switch(a){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...l},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...l}];break;case"multidrag":r=e.oldIndicies.map(((t,a)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[a].index,...l})))}const n=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(r,t);return n}function b(e,t){const a=[...t];return e.concat().reverse().forEach((e=>a.splice(e.oldIndex,1))),a}function p(e,t,a,l){const r=[...t];return e.forEach((e=>{const t=l&&a&&l(e.item,a);r.splice(e.newIndex,0,t||e.item)})),r}function h(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}i(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),i(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),i(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),i(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),i(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),i(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),i(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),i(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),i(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),i(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),i(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),i(e.exports,"ReactSortable",(()=>v));const g={dragging:null};class v extends n.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,n.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,g),o(s)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();o(l).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:a,id:l}=this.props,r={style:t,className:a,id:l},s=e&&null!==e?e:"div";return(0,n.createElement)(s,{ref:this.ref,...r},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:a="sortable-selected",chosenClass:l="sortable-chosen",dragClass:s="sortable-drag",fallbackClass:i="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:m}=this.props;if(!e||null==e)return null;const b=t||"data-id";return n.Children.map(e,((e,t)=>{if(void 0===e)return;const s=m[t]||{},{className:i}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!s.filtered},u=o(r)(i,{[a]:s.selected,[l]:s.chosen,...c});return(0,n.cloneElement)(e,{[b]:e.key,className:u})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:a,children:l,tag:r,style:n,className:s,clone:o,onAdd:i,onChange:c,onChoose:u,onClone:d,onEnd:m,onFilter:b,onRemove:p,onSort:h,onStart:g,onUnchoose:v,onUpdate:E,onMove:f,onSpill:k,onSelect:y,onDeselect:w,..._}=e;return _}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:a}=this.props,l=e.willInsertAfter||-1;if(!a)return l;const r=a(e,t,this.sortable,g);return void 0!==r&&r}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const a=this.props[t];a&&a(e,this.sortable,g)}onAdd(e){const{list:t,setList:a,clone:l}=this.props,r=m(e,[...g.dragging.props.list]);u(r),a(p(r,t,e,l).map((e=>Object.assign(e,{selected:!1}))),this.sortable,g)}onRemove(e){const{list:t,setList:a}=this.props,l=h(e),r=m(e,t);d(r);let n=[...t];if("clone"!==e.pullMode)n=b(r,n);else{let t=r;switch(l){case"multidrag":t=r.map(((t,a)=>({...t,element:e.clones[a]})));break;case"normal":t=r.map((t=>({...t,element:e.clone})));break;default:o(s)(!0,`mode "${l}" cannot clone. Please remove "props.clone" from when using the "${l}" plugin`)}u(t),r.forEach((t=>{const a=t.oldIndex,l=this.props.clone(t.item,e);n.splice(a,1,l)}))}n=n.map((e=>Object.assign(e,{selected:!1}))),a(n,this.sortable,g)}onUpdate(e){const{list:t,setList:a}=this.props,l=m(e,t);return u(l),d(l),a(function(e,t){return p(e,b(e,t))}(l,t),this.sortable,g)}onStart(){g.dragging=this}onEnd(){g.dragging=null}onChoose(e){const{list:t,setList:a}=this.props;a(t.map(((t,a)=>{let l=t;return a===e.oldIndex&&(l=Object.assign(t,{chosen:!0})),l})),this.sortable,g)}onUnchoose(e){const{list:t,setList:a}=this.props;a(t.map(((t,a)=>{let l=t;return a===e.oldIndex&&(l=Object.assign(l,{chosen:!1})),l})),this.sortable,g)}onSpill(e){const{removeOnSpill:t,revertOnSpill:a}=this.props;t&&!a&&c(e.item)}onSelect(e){const{list:t,setList:a}=this.props,l=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const a=t.index;if(-1===a)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);l[a].selected=!0})),a(l,this.sortable,g)}onDeselect(e){const{list:t,setList:a}=this.props,l=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(l[t].selected=!0)})),a(l,this.sortable,g)}}var E,f;E=e.exports,f={},Object.keys(f).forEach((function(e){"default"===e||"__esModule"===e||E.hasOwnProperty(e)||Object.defineProperty(E,e,{enumerable:!0,get:function(){return f[e]}})}))},51474:function(e,t,a){"use strict";function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,l)}return a}function r(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,l=new Array(t);a"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function y(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function w(e,t,a,l){if(e){a=a||document;do{if(null!=t&&(">"===t[0]?e.parentNode===a&&k(e,t):k(e,t))||l&&e===a)return e;if(e===a)break}while(e=y(e))}return null}var _,x=/\s+/g;function C(e,t,a){if(e&&t)if(e.classList)e.classList[a?"add":"remove"](t);else{var l=(" "+e.className+" ").replace(x," ").replace(" "+t+" "," ");e.className=(l+(a?" "+t:"")).replace(x," ")}}function N(e,t,a){var l=e&&e.style;if(l){if(void 0===a)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(a=e.currentStyle),void 0===t?a:a[t];t in l||-1!==t.indexOf("webkit")||(t="-webkit-"+t),l[t]=a+("string"==typeof a?"":"px")}}function T(e,t){var a="";if("string"==typeof e)a=e;else do{var l=N(e,"transform");l&&"none"!==l&&(a=l+" "+a)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(a)}function A(e,t,a){if(e){var l=e.getElementsByTagName(t),r=0,n=l.length;if(a)for(;r=n:r<=n))return l;if(l===L())break;l=M(l,!1)}return!1}function H(e,t,a,l){for(var r=0,n=0,s=e.children;n2&&void 0!==arguments[2]?arguments[2]:{},l=a.evt,n=i(a,W);z.pluginEvent.bind(Ve)(e,t,r({dragEl:K,parentEl:Q,ghostEl:J,rootEl:ee,nextEl:te,lastDownEl:ae,cloneEl:le,cloneHidden:re,dragStarted:ve,putSortable:ue,activeSortable:Ve.active,originalEvent:l,oldIndex:ne,oldDraggableIndex:oe,newIndex:se,newDraggableIndex:ie,hideGhostForTarget:$e,unhideGhostForTarget:Re,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(e){X({sortable:t,name:e,originalEvent:l})}},n))};function X(e){j(r({putSortable:ue,cloneEl:le,targetEl:K,rootEl:ee,oldIndex:ne,oldDraggableIndex:oe,newIndex:se,newDraggableIndex:ie},e))}var K,Q,J,ee,te,ae,le,re,ne,se,oe,ie,ce,ue,de,me,be,pe,he,ge,ve,Ee,fe,ke,ye,we=!1,_e=!1,xe=[],Ce=!1,Ne=!1,Te=[],Ae=!1,Le=[],Se="undefined"!=typeof document,Be=h,He=m||d?"cssFloat":"float",Ue=Se&&!g&&!h&&"draggable"in document.createElement("div"),Ie=function(){if(Se){if(d)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Pe=function(e,t){var a=N(e),l=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),r=H(e,0,t),n=H(e,1,t),s=r&&N(r),o=n&&N(n),i=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+S(r).width,c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+S(n).width;if("flex"===a.display)return"column"===a.flexDirection||"column-reverse"===a.flexDirection?"vertical":"horizontal";if("grid"===a.display)return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&s.float&&"none"!==s.float){var u="left"===s.float?"left":"right";return!n||"both"!==o.clear&&o.clear!==u?"horizontal":"vertical"}return r&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||i>=l&&"none"===a[He]||n&&"none"===a[He]&&i+c>l)?"vertical":"horizontal"},Me=function(e){function t(e,a){return function(l,r,n,s){var o=l.options.group.name&&r.options.group.name&&l.options.group.name===r.options.group.name;if(null==e&&(a||o))return!0;if(null==e||!1===e)return!1;if(a&&"clone"===e)return e;if("function"==typeof e)return t(e(l,r,n,s),a)(l,r,n,s);var i=(a?l:r).options.group.name;return!0===e||"string"==typeof e&&e===i||e.join&&e.indexOf(i)>-1}}var a={},l=e.group;l&&"object"==n(l)||(l={name:l}),a.name=l.name,a.checkPull=t(l.pull,!0),a.checkPut=t(l.put),a.revertClone=l.revertClone,e.group=a},$e=function(){!Ie&&J&&N(J,"display","none")},Re=function(){!Ie&&J&&N(J,"display","")};Se&&!g&&document.addEventListener("click",(function(e){if(_e)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),_e=!1,!1}),!0);var Oe=function(e){if(K){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,n=e.clientY,xe.some((function(e){var t=e[F].options.emptyInsertThreshold;if(t&&!U(e)){var a=S(e),l=r>=a.left-t&&r<=a.right+t,o=n>=a.top-t&&n<=a.bottom+t;return l&&o?s=e:void 0}})),s);if(t){var a={};for(var l in e)e.hasOwnProperty(l)&&(a[l]=e[l]);a.target=a.rootEl=t,a.preventDefault=void 0,a.stopPropagation=void 0,t[F]._onDragOver(a)}}var r,n,s},De=function(e){K&&K.parentNode[F]._isOutsideThisEl(e.target)};function Ve(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=o({},t),e[F]=this;var a,l,n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ve.supportPointer&&"PointerEvent"in window&&!p,emptyInsertThreshold:5};for(var s in z.initializePlugins(this,e,n),n)!(s in t)&&(t[s]=n[s]);for(var i in Me(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&Ue,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?E(e,"pointerdown",this._onTapStart):(E(e,"mousedown",this._onTapStart),E(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(e,"dragover",this),E(e,"dragenter",this)),xe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),o(this,(l=[],{captureAnimationState:function(){l=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==N(e,"display")&&e!==Ve.ghost){l.push({target:e,rect:S(e)});var t=r({},l[l.length-1].rect);if(e.thisAnimationDuration){var a=T(e,!0);a&&(t.top-=a.f,t.left-=a.e)}e.fromRect=t}}))},addAnimationState:function(e){l.push(e)},removeAnimationState:function(e){l.splice(function(e,t){for(var a in e)if(e.hasOwnProperty(a))for(var l in t)if(t.hasOwnProperty(l)&&t[l]===e[a][l])return Number(a);return-1}(l,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(a),void("function"==typeof e&&e());var r=!1,n=0;l.forEach((function(e){var a=0,l=e.target,s=l.fromRect,o=S(l),i=l.prevFromRect,c=l.prevToRect,u=e.rect,d=T(l,!0);d&&(o.top-=d.f,o.left-=d.e),l.toRect=o,l.thisAnimationDuration&&$(i,o)&&!$(s,o)&&(u.top-o.top)/(u.left-o.left)==(s.top-o.top)/(s.left-o.left)&&(a=function(e,t,a,l){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-a.top,2)+Math.pow(t.left-a.left,2))*l.animation}(u,i,c,t.options)),$(o,s)||(l.prevFromRect=s,l.prevToRect=o,a||(a=t.options.animation),t.animate(l,u,o,a)),a&&(r=!0,n=Math.max(n,a),clearTimeout(l.animationResetTimer),l.animationResetTimer=setTimeout((function(){l.animationTime=0,l.prevFromRect=null,l.fromRect=null,l.prevToRect=null,l.thisAnimationDuration=null}),a),l.thisAnimationDuration=a)})),clearTimeout(a),r?a=setTimeout((function(){"function"==typeof e&&e()}),n):"function"==typeof e&&e(),l=[]},animate:function(e,t,a,l){if(l){N(e,"transition",""),N(e,"transform","");var r=T(this.el),n=r&&r.a,s=r&&r.d,o=(t.left-a.left)/(n||1),i=(t.top-a.top)/(s||1);e.animatingX=!!o,e.animatingY=!!i,N(e,"transform","translate3d("+o+"px,"+i+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),N(e,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),N(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){N(e,"transition",""),N(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),l)}}}))}function Ge(e,t,a,l,r,n,s,o){var i,c,u=e[F],b=u.options.onMove;return!window.CustomEvent||d||m?(i=document.createEvent("Event")).initEvent("move",!0,!0):i=new CustomEvent("move",{bubbles:!0,cancelable:!0}),i.to=t,i.from=e,i.dragged=a,i.draggedRect=l,i.related=r||t,i.relatedRect=n||S(t),i.willInsertAfter=o,i.originalEvent=s,e.dispatchEvent(i),b&&(c=b.call(u,i,s)),c}function Fe(e){e.draggable=!1}function Ze(){Ae=!1}function qe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,a=t.length,l=0;a--;)l+=t.charCodeAt(a);return l.toString(36)}function ze(e){return setTimeout(e,0)}function je(e){return clearTimeout(e)}Ve.prototype={constructor:Ve,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Ee=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,K):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,a=this.el,l=this.options,r=l.preventOnFilter,n=e.type,s=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,o=(s||e).target,i=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||o,c=l.filter;if(function(e){Le.length=0;for(var t=e.getElementsByTagName("input"),a=t.length;a--;){var l=t[a];l.checked&&Le.push(l)}}(a),!K&&!(/mousedown|pointerdown/.test(n)&&0!==e.button||l.disabled)&&!i.isContentEditable&&(this.nativeDraggable||!p||!o||"SELECT"!==o.tagName.toUpperCase())&&!((o=w(o,l.draggable,a,!1))&&o.animated||ae===o)){if(ne=I(o),oe=I(o,l.draggable),"function"==typeof c){if(c.call(this,e,o,this))return X({sortable:t,rootEl:i,name:"filter",targetEl:o,toEl:a,fromEl:a}),Y("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(l){if(l=w(i,l.trim(),a,!1))return X({sortable:t,rootEl:l,name:"filter",targetEl:o,fromEl:a,toEl:a}),Y("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());l.handle&&!w(i,l.handle,a,!1)||this._prepareDragStart(e,s,o)}}},_prepareDragStart:function(e,t,a){var l,r=this,n=r.el,s=r.options,o=n.ownerDocument;if(a&&!K&&a.parentNode===n){var i=S(a);if(ee=n,Q=(K=a).parentNode,te=K.nextSibling,ae=a,ce=s.group,Ve.dragged=K,de={target:K,clientX:(t||e).clientX,clientY:(t||e).clientY},he=de.clientX-i.left,ge=de.clientY-i.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,K.style["will-change"]="all",l=function(){Y("delayEnded",r,{evt:e}),Ve.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!b&&r.nativeDraggable&&(K.draggable=!0),r._triggerDragStart(e,t),X({sortable:r,name:"choose",originalEvent:e}),C(K,s.chosenClass,!0))},s.ignore.split(",").forEach((function(e){A(K,e.trim(),Fe)})),E(o,"dragover",Oe),E(o,"mousemove",Oe),E(o,"touchmove",Oe),E(o,"mouseup",r._onDrop),E(o,"touchend",r._onDrop),E(o,"touchcancel",r._onDrop),b&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),Y("delayStart",this,{evt:e}),!s.delay||s.delayOnTouchOnly&&!t||this.nativeDraggable&&(m||d))l();else{if(Ve.eventCanceled)return void this._onDrop();E(o,"mouseup",r._disableDelayedDrag),E(o,"touchend",r._disableDelayedDrag),E(o,"touchcancel",r._disableDelayedDrag),E(o,"mousemove",r._delayedDragTouchMoveHandler),E(o,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&E(o,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,s.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Fe(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._disableDelayedDrag),f(e,"touchend",this._disableDelayedDrag),f(e,"touchcancel",this._disableDelayedDrag),f(e,"mousemove",this._delayedDragTouchMoveHandler),f(e,"touchmove",this._delayedDragTouchMoveHandler),f(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):E(document,t?"touchmove":"mousemove",this._onTouchMove):(E(K,"dragend",this),E(ee,"dragstart",this._onDragStart));try{document.selection?ze((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(we=!1,ee&&K){Y("dragStarted",this,{evt:t}),this.nativeDraggable&&E(document,"dragover",De);var a=this.options;!e&&C(K,a.dragClass,!1),C(K,a.ghostClass,!0),Ve.active=this,e&&this._appendGhost(),X({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(me){this._lastX=me.clientX,this._lastY=me.clientY,$e();for(var e=document.elementFromPoint(me.clientX,me.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(me.clientX,me.clientY))!==t;)t=e;if(K.parentNode[F]._isOutsideThisEl(e),t)do{if(t[F]&&t[F]._onDragOver({clientX:me.clientX,clientY:me.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Re()}},_onTouchMove:function(e){if(de){var t=this.options,a=t.fallbackTolerance,l=t.fallbackOffset,r=e.touches?e.touches[0]:e,n=J&&T(J,!0),s=J&&n&&n.a,o=J&&n&&n.d,i=Be&&ye&&P(ye),c=(r.clientX-de.clientX+l.x)/(s||1)+(i?i[0]-Te[0]:0)/(s||1),u=(r.clientY-de.clientY+l.y)/(o||1)+(i?i[1]-Te[1]:0)/(o||1);if(!Ve.active&&!we){if(a&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))l.right+10||e.clientX<=l.right&&e.clientY>l.bottom&&e.clientX>=l.left:e.clientX>l.right&&e.clientY>l.top||e.clientX<=l.right&&e.clientY>l.bottom+10}(e,n,this)&&!g.animated){if(g===K)return V(!1);if(g&&s===e.target&&(o=g),o&&(a=S(o)),!1!==Ge(ee,s,K,t,o,a,e,!!o))return D(),g&&g.nextSibling?s.insertBefore(K,g.nextSibling):s.appendChild(K),Q=s,G(),V(!0)}else if(g&&function(e,t,a){var l=S(H(a.el,0,a.options,!0));return t?e.clientXu+c*n/2:id-ke)return-fe}else if(i>u+c*(1-r)/2&&id-c*n/2)?i>u+c/2?1:-1:0}(e,o,a,n,_?1:i.swapThreshold,null==i.invertedSwapThreshold?i.swapThreshold:i.invertedSwapThreshold,Ne,Ee===o),0!==E){var L=I(K);do{L-=E,k=Q.children[L]}while(k&&("none"===N(k,"display")||k===J))}if(0===E||k===o)return V(!1);Ee=o,fe=E;var P=o.nextElementSibling,M=!1,$=Ge(ee,s,K,t,o,a,e,M=1===E);if(!1!==$)return 1!==$&&-1!==$||(M=1===$),Ae=!0,setTimeout(Ze,30),D(),M&&!P?s.appendChild(K):o.parentNode.insertBefore(K,M?P:o),T&&O(T,0,A-T.scrollTop),Q=K.parentNode,void 0===f||Ne||(ke=Math.abs(f-S(o)[x])),G(),V(!0)}if(s.contains(K))return V(!1)}return!1}function R(i,c){Y(i,p,r({evt:e,isOwner:d,axis:n?"vertical":"horizontal",revert:l,dragRect:t,targetRect:a,canSort:m,fromSortable:b,target:o,completed:V,onMove:function(a,l){return Ge(ee,s,K,t,a,S(a),e,l)},changed:G},c))}function D(){R("dragOverAnimationCapture"),p.captureAnimationState(),p!==b&&b.captureAnimationState()}function V(t){return R("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(p),p!==b&&(C(K,ue?ue.options.ghostClass:u.options.ghostClass,!1),C(K,i.ghostClass,!0)),ue!==p&&p!==Ve.active?ue=p:p===Ve.active&&ue&&(ue=null),b===p&&(p._ignoreWhileAnimating=o),p.animateAll((function(){R("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(o===K&&!K.animated||o===s&&!o.animated)&&(Ee=null),i.dragoverBubble||e.rootEl||o===document||(K.parentNode[F]._isOutsideThisEl(e.target),!t&&Oe(e)),!i.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function G(){se=I(K),ie=I(K,i.draggable),X({sortable:p,name:"change",toEl:s,newIndex:se,newDraggableIndex:ie,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){f(document,"mousemove",this._onTouchMove),f(document,"touchmove",this._onTouchMove),f(document,"pointermove",this._onTouchMove),f(document,"dragover",Oe),f(document,"mousemove",Oe),f(document,"touchmove",Oe)},_offUpEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._onDrop),f(e,"touchend",this._onDrop),f(e,"pointerup",this._onDrop),f(e,"touchcancel",this._onDrop),f(document,"selectstart",this)},_onDrop:function(e){var t=this.el,a=this.options;se=I(K),ie=I(K,a.draggable),Y("drop",this,{evt:e}),Q=K&&K.parentNode,se=I(K),ie=I(K,a.draggable),Ve.eventCanceled||(we=!1,Ne=!1,Ce=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),je(this.cloneId),je(this._dragStartId),this.nativeDraggable&&(f(document,"drop",this),f(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&N(document.body,"user-select",""),N(K,"transform",""),e&&(ve&&(e.cancelable&&e.preventDefault(),!a.dropBubble&&e.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(ee===Q||ue&&"clone"!==ue.lastPutMode)&&le&&le.parentNode&&le.parentNode.removeChild(le),K&&(this.nativeDraggable&&f(K,"dragend",this),Fe(K),K.style["will-change"]="",ve&&!we&&C(K,ue?ue.options.ghostClass:this.options.ghostClass,!1),C(K,this.options.chosenClass,!1),X({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==Q?(se>=0&&(X({rootEl:Q,name:"add",toEl:Q,fromEl:ee,originalEvent:e}),X({sortable:this,name:"remove",toEl:Q,originalEvent:e}),X({rootEl:Q,name:"sort",toEl:Q,fromEl:ee,originalEvent:e}),X({sortable:this,name:"sort",toEl:Q,originalEvent:e})),ue&&ue.save()):se!==ne&&se>=0&&(X({sortable:this,name:"update",toEl:Q,originalEvent:e}),X({sortable:this,name:"sort",toEl:Q,originalEvent:e})),Ve.active&&(null!=se&&-1!==se||(se=ne,ie=oe),X({sortable:this,name:"end",toEl:Q,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Y("nulling",this),ee=K=Q=J=te=le=ae=re=de=me=ve=se=ie=ne=oe=Ee=fe=ue=ce=Ve.dragged=Ve.ghost=Ve.clone=Ve.active=null,Le.forEach((function(e){e.checked=!0})),Le.length=be=pe=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":K&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],a=this.el.children,l=0,r=a.length,n=this.options;l1&&(ht.forEach((function(e){l.addAnimationState({target:e,rect:Et?S(e):r}),G(e),e.fromRect=r,t.removeAnimationState(e)})),Et=!1,function(e,t){ht.forEach((function(a,l){var r=t.children[a.sortableIndex+(e?Number(l):0)];r?t.insertBefore(a,r):t.appendChild(a)}))}(!this.options.removeCloneOnHide,a))},dragOverCompleted:function(e){var t=e.sortable,a=e.isOwner,l=e.insertion,r=e.activeSortable,n=e.parentEl,s=e.putSortable,o=this.options;if(l){if(a&&r._hideClone(),vt=!1,o.animation&&ht.length>1&&(Et||!a&&!r.options.sort&&!s)){var i=S(mt,!1,!0,!0);ht.forEach((function(e){e!==mt&&(V(e,i),n.appendChild(e))})),Et=!0}if(!a)if(Et||wt(),ht.length>1){var c=pt;r._showClone(t),r.options.animation&&!pt&&c&>.forEach((function(e){r.addAnimationState({target:e,rect:bt}),e.fromRect=bt,e.thisAnimationDuration=null}))}else r._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,a=e.isOwner,l=e.activeSortable;if(ht.forEach((function(e){e.thisAnimationDuration=null})),l.options.animation&&!a&&l.multiDrag.isMultiDrag){bt=o({},t);var r=T(mt,!0);bt.top-=r.f,bt.left-=r.e}},dragOverAnimationComplete:function(){Et&&(Et=!1,wt())},drop:function(e){var t=e.originalEvent,a=e.rootEl,l=e.parentEl,r=e.sortable,n=e.dispatchSortableEvent,s=e.oldIndex,o=e.putSortable,i=o||this.sortable;if(t){var c=this.options,u=l.children;if(!ft)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),C(mt,c.selectedClass,!~ht.indexOf(mt)),~ht.indexOf(mt))ht.splice(ht.indexOf(mt),1),ut=null,j({sortable:r,rootEl:a,name:"deselect",targetEl:mt,originalEvent:t});else{if(ht.push(mt),j({sortable:r,rootEl:a,name:"select",targetEl:mt,originalEvent:t}),t.shiftKey&&ut&&r.el.contains(ut)){var d,m,b=I(ut),p=I(mt);if(~b&&~p&&b!==p)for(p>b?(m=b,d=p):(m=p,d=b+1);m1){var h=S(mt),g=I(mt,":not(."+this.options.selectedClass+")");if(!vt&&c.animation&&(mt.thisAnimationDuration=null),i.captureAnimationState(),!vt&&(c.animation&&(mt.fromRect=h,ht.forEach((function(e){if(e.thisAnimationDuration=null,e!==mt){var t=Et?S(e):h;e.fromRect=t,i.addAnimationState({target:e,rect:t})}}))),wt(),ht.forEach((function(e){u[g]?l.insertBefore(e,u[g]):l.appendChild(e),g++})),s===I(mt))){var v=!1;ht.forEach((function(e){e.sortableIndex===I(e)||(v=!0)})),v&&n("update")}ht.forEach((function(e){G(e)})),i.animateAll()}dt=i}(a===l||o&&"clone"!==o.lastPutMode)&>.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=ft=!1,gt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),f(document,"pointerup",this._deselectMultiDrag),f(document,"mouseup",this._deselectMultiDrag),f(document,"touchend",this._deselectMultiDrag),f(document,"keydown",this._checkKeyDown),f(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==ft&&ft||dt!==this.sortable||e&&w(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;ht.length;){var t=ht[0];C(t,this.options.selectedClass,!1),ht.shift(),j({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},o(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[F];t&&t.options.multiDrag&&!~ht.indexOf(e)&&(dt&&dt!==t&&(dt.multiDrag._deselectMultiDrag(),dt=t),C(e,t.options.selectedClass,!0),ht.push(e))},deselect:function(e){var t=e.parentNode[F],a=ht.indexOf(e);t&&t.options.multiDrag&&~a&&(C(e,t.options.selectedClass,!1),ht.splice(a,1))}},eventProperties:function(){var e,t=this,a=[],l=[];return ht.forEach((function(e){var r;a.push({multiDragElement:e,index:e.sortableIndex}),r=Et&&e!==mt?-1:Et?I(e,":not(."+t.options.selectedClass+")"):I(e),l.push({multiDragElement:e,index:r})})),{items:(e=ht,function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(gt),oldIndicies:a,newIndicies:l}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function yt(e,t){gt.forEach((function(a,l){var r=t.children[a.sortableIndex+(e?Number(l):0)];r?t.insertBefore(a,r):t.appendChild(a)}))}function wt(){ht.forEach((function(e){e!==mt&&e.parentNode&&e.parentNode.removeChild(e)}))}Ve.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):this.options.supportPointer?E(document,"pointermove",this._handleFallbackAutoScroll):t.touches?E(document,"touchmove",this._handleFallbackAutoScroll):E(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):(f(document,"pointermove",this._handleFallbackAutoScroll),f(document,"touchmove",this._handleFallbackAutoScroll),f(document,"mousemove",this._handleFallbackAutoScroll)),lt(),at(),clearTimeout(_),_=void 0},nulling:function(){Qe=Ye=We=tt=Je=Xe=Ke=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var a=this,l=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,n=document.elementFromPoint(l,r);if(Qe=e,t||this.options.forceAutoScrollFallback||m||d||p){nt(e,this.options,n,t);var s=M(n,!0);!tt||Je&&l===Xe&&r===Ke||(Je&<(),Je=setInterval((function(){var n=M(document.elementFromPoint(l,r),!0);n!==s&&(s=n,at()),nt(e,a.options,n,t)}),10),Xe=l,Ke=r)}else{if(!this.options.bubbleScroll||M(n,!0)===L())return void at();nt(e,this.options,M(n,!1),!1)}}},o(e,{pluginName:"scroll",initializeByDefault:!0})}),Ve.mount(it,ot),t.default=Ve},2177:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return l}});function l(e,t){if(!e)throw new Error("Invariant failed")}},99196:function(e){"use strict";e.exports=window.React}},t={};function a(l){var r=t[l];if(void 0!==r)return r.exports;var n=t[l]={id:l,loaded:!1,exports:{}};return e[l](n,n.exports,a),n.loaded=!0,n.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e={};a.r(e),a.d(e,{accordion:function(){return er},anchorLinkNavigation:function(){return tr},card:function(){return ar},contentPageLayout:function(){return lr},ctaBanner:function(){return rr},ctaButton:function(){return nr},ctaCard:function(){return sr},ctaHero:function(){return or},facultyProfileCard:function(){return ir},featureStory:function(){return cr},imageShowcase:function(){return ur},imageToggleCard:function(){return dr},infoBoxHero:function(){return gr},latestPosts:function(){return yr},linkCard:function(){return wr},list:function(){return mr},proofpoint:function(){return br},purdueRss:function(){return pr},sidebarCta:function(){return hr},siteHero:function(){return vr},testimonial:function(){return Er},titleHero:function(){return fr},titleNav:function(){return kr}});var t=window.wp.element;const{__:__}=wp.i18n,{registerBlockType:l}=wp.blocks,{PanelBody:r,PanelRow:n,CheckboxControl:s,TextareaControl:o,TextControl:i,RadioControl:c,Button:u,ToggleControl:d,Disabled:m}=wp.components,{InspectorControls:b,MediaUploadCheck:p,MediaUpload:h,useBlockProps:g,InnerBlocks:v}=wp.blockEditor,{dispatch:E,select:f}=wp.data,k={slug:"purdue-blocks",title:__("Purdue Blocks")},y=f("core/blocks").getCategories().filter((e=>e.slug!==k.slug));E("core/blocks").setCategories([k,...y]);const w=[{faSlug:"facebook-f",name:"Facebook",share:"https://www.facebook.com/sharer/sharer.php?u="},{faSlug:"twitter",name:"Twitter",share:"https://twitter.com/intent/tweet?url="},{faSlug:"linkedin-in",name:"LinkedIn",share:"https://www.linkedin.com/shareArticle?mini=true&url="}];function x(){return x=Object.assign||function(e){for(var t=1;t{const a=document.querySelector("#siteHeroTitleInput"),l=document.activeElement===a;""===e.attributes.currUrl&&e.setAttributes({currUrl:f("core/editor").getPermalink()}),""!==e.attributes.pageTitle||l||e.setAttributes({pageTitle:f("core/editor").getCurrentPost().title});const d=e.attributes.checkedSocials,g=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(b,null,(0,t.createElement)(r,null,(0,t.createElement)(n,null,(0,t.createElement)(c,{label:"Hero Style",selected:e.attributes.styleToggle?"4060":"5050",options:[{label:"50/50",value:"5050"},{label:"40/60",value:"4060"}],onChange:t=>{e.setAttributes({styleToggle:"4060"===t})}})),(0,t.createElement)(n,null,(0,t.createElement)(c,{label:"Text Position",selected:e.attributes.align,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({align:t})}}))),(0,t.createElement)(r,null,(0,t.createElement)(n,null,(0,t.createElement)(o,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Add CTA links?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"Call to action text for first button",value:e.attributes.ctaText1,onChange:t=>e.setAttributes({ctaText1:t})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"First button link address",value:e.attributes.ctaUrl1,onChange:t=>e.setAttributes({ctaUrl1:t})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Open link of the first button in new tab?",checked:e.attributes.external1,onChange:()=>e.setAttributes({external1:!e.attributes.external1})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"Call to action text for second button",value:e.attributes.ctaText2,onChange:t=>e.setAttributes({ctaText2:t})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"Second button link address",value:e.attributes.ctaUrl2,onChange:t=>e.setAttributes({ctaUrl2:t})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Open link of the second button in new tab?",checked:e.attributes.external2,onChange:()=>e.setAttributes({external2:!e.attributes.external2})})):"",(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Include Social Share Links",help:"Would you like to include links to share this site on social media?",checked:e.attributes.includeSocial,onChange:()=>{e.attributes.includeSocial?e.setAttributes({includeSocial:!1}):e.setAttributes({includeSocial:!0})}})),e.attributes.includeSocial?w.map((a=>{let{faSlug:l,name:r}=a;return(0,t.createElement)(s,{label:r,checked:d[l],onChange:t=>{t?d[l]=!0:delete d[l],e.setAttributes({includeSocial:!0,checkedSocials:{...d}})}})})):""),(0,t.createElement)(r,null,(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Include a Jump to Article button",help:"Would you like to include a Jump to Article button?",checked:e.attributes.includeButton,onChange:()=>{e.attributes.includeButton?e.setAttributes({includeButton:!1}):e.setAttributes({includeButton:!0})}})),e.attributes.includeButton?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"ID of the element the button will jump to",value:e.attributes.anchor,onChange:t=>e.setAttributes({anchor:t})})):"")),(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add Page Title"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:e.attributes.pageTitle,className:"input",id:"siteHeroTitleInput",type:"text",placeholder:"Page Title...",onChange:t=>{e.setAttributes({pageTitle:t.target.value})}}))),(0,t.createElement)("span",null,"Add Intro Copy"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("textarea",{value:""!==e.attributes.subText?e.attributes.subText:"",className:"textarea",placeholder:"Add intro copy here...",onChange:t=>{e.setAttributes({subText:t.target.value})}}),(0,t.createElement)(v,null)))),(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Choose a Hero Image or Video"),(0,t.createElement)(p,null,(0,t.createElement)(h,{onSelect:t=>{console.log(t),e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt,mediaType:t.type,mediaTitle:t.title})},render:a=>{let{open:l}=a;return""!==e.attributes.imgUrl?"image"===e.attributes.mediaType?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Select a New image"),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:g},"Remove image")):"video"===e.attributes.mediaType?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)(m,null,(0,t.createElement)("video",{muted:!0,playsinline:"",src:e.attributes.imgUrl}))),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Select a New Video"),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:g},"Remove Video")):"":(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick an image or video from the media library."),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Open Media Library"))}}))))]},save:e=>e.attributes.styleToggle?(0,t.createElement)("div",{className:"bulma-blocks-40-60-hero"+("right"===e.attributes.align?" reversed-alignment":"")},(0,t.createElement)("div",{className:"hero is-medium"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("h1",null,e.attributes.pageTitle||f("core/editor").getCurrentPost().title),e.attributes.subText?(0,t.createElement)("p",null,e.attributes.subText):"",(0,t.createElement)(v.Content,null),e.attributes.hasLink&&(e.attributes.ctaText1||e.attributes.ctaText2)?(0,t.createElement)("div",{className:"cta-button-container"},e.attributes.ctaText1?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-light",href:e.attributes.ctaUrl1,target:e.attributes.external1?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText1):"",e.attributes.ctaText2?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-light purdue-blocks__button--outline",href:e.attributes.ctaUrl2,target:e.attributes.external2?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText2):""):"",e.attributes.includeSocial?(0,t.createElement)("div",{className:"level is-mobile"},(0,t.createElement)("div",{className:"level-left"},Object.keys(e.attributes.checkedSocials).map((a=>(0,t.createElement)("div",{className:"level-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:`${w.find((e=>e.faSlug===a)).share}${e.attributes.currUrl||f("core/editor").getPermalink()}`,className:"icon"},(0,t.createElement)("i",{className:`fab fa-lg fa-${a}`}))))))):"",e.attributes.includeButton&&e.attributes.anchor?(0,t.createElement)("a",{href:`#${e.attributes.anchor}`,className:"jump-button"},"jump to articles ",(0,t.createElement)("i",{className:"fas fa-arrow-down","aria-hidden":"true"})):""))),(0,t.createElement)("div",{className:"shadow"}),(0,t.createElement)("div",{className:"hero-image"},(0,t.createElement)("span",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText})))):(0,t.createElement)("div",{className:"bulma-blocks-50-50-hero"+("right"===e.attributes.align?" reversed-alignment":"")},(0,t.createElement)("div",{className:"hero is-medium"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("h1",null,e.attributes.pageTitle||f("core/editor").getCurrentPost().title),e.attributes.subText?(0,t.createElement)("p",null,e.attributes.subText):"",(0,t.createElement)(v.Content,null),e.attributes.hasLink&&(e.attributes.ctaText1||e.attributes.ctaText2)?(0,t.createElement)("div",{className:"cta-button-container"},e.attributes.ctaText1?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-dark",href:e.attributes.ctaUrl1,target:e.attributes.external1?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText1):"",e.attributes.ctaText2?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-dark purdue-blocks__button--outline",href:e.attributes.ctaUrl2,target:e.attributes.external2?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText2):""):"",e.attributes.includeSocial?(0,t.createElement)("div",{className:"level is-mobile"},(0,t.createElement)("div",{className:"level-left"},Object.keys(e.attributes.checkedSocials).map((a=>(0,t.createElement)("div",{className:"level-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:`${w.find((e=>e.faSlug===a)).share}${e.attributes.currUrl||f("core/editor").getPermalink()}`,className:"icon"},(0,t.createElement)("i",{className:`fab fa-lg fa-${a}`}))))))):"",e.attributes.includeButton&&e.attributes.anchor?(0,t.createElement)("a",{href:`#${e.attributes.anchor}`,className:"jump-button"},"jump to articles ",(0,t.createElement)("i",{className:"fas fa-arrow-down","aria-hidden":"true"})):""))),(0,t.createElement)("div",{className:"hero-image"},"image"===e.attributes.mediaType?(0,t.createElement)("span",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText}):"","video"===e.attributes.mediaType?(0,t.createElement)("video",{muted:"",title:e.attributes.mediaTitle,loop:"",autoplay:"",playsinline:"",src:e.attributes.imgUrl}):"")))});const{__:C}=wp.i18n,{registerBlockType:N}=wp.blocks,{PanelBody:T,PanelRow:A,CheckboxControl:L,TextareaControl:S,Button:B}=wp.components,{InspectorControls:H,MediaUploadCheck:U,MediaUpload:I,useBlockProps:P}=wp.blockEditor,{select:M}=wp.data;N("purdue-blocks/cta-hero",{title:C("CTA Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{pageTitle:{type:"string",default:""},ctaOptionalSub:{type:"string",default:""},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},imgUrl:{type:"string",default:""},imgMoUrl:{type:"string",default:""},altText:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:C("This block should be used at the top of the page. Choose a page title, an image, and the settings for the cta button."),edit:e=>{""===e.attributes.pageTitle&&e.setAttributes({pageTitle:M("core/editor").getCurrentPost().title});const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(H,null,(0,t.createElement)(T,null,(0,t.createElement)(A,null,(0,t.createElement)(S,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"bulma-blocks-editor-cta-hero"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add Page Title"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.pageTitle?e.attributes.pageTitle:"",className:"input",type:"text",placeholder:"Page Title...",onChange:t=>{e.setAttributes({pageTitle:t.target.value})}}))),(0,t.createElement)("span",null,"Add Optional Subtext"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaOptionalSub?e.attributes.ctaOptionalSub:"",className:"input",type:"textarea",placeholder:"Optional Subtext...",onChange:t=>{e.setAttributes({ctaOptionalSub:t.target.value})}}))),(0,t.createElement)("span",null,"Add CTA Button Text and URL"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Text"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaText?e.attributes.ctaText:"",className:"input",type:"text",placeholder:"CTA Text...",onChange:t=>{e.setAttributes({ctaText:t.target.value})}}))),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA URL"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaUrl?e.attributes.ctaUrl:"",className:"input",type:"text",placeholder:"CTA URL...",onChange:t=>{e.setAttributes({ctaUrl:t.target.value})}})))),(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Choose a Hero Image"),(0,t.createElement)(U,null,(0,t.createElement)(I,{onSelect:t=>{e.setAttributes({imgUrl:t.url,imgMoUrl:t.sizes&&t.sizes.hero_mobile?t.sizes.hero_mobile.url:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return""===e.attributes.imgUrl||e.attributes.imgError?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick a hero image from the media library."),(0,t.createElement)(B,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Open Media Library")):(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(B,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Select a New Image"),(0,t.createElement)(B,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove image"))}}))))]},save:e=>{const a=P.save();return(0,t.createElement)("div",x({},a,{className:"pu-cta-hero"}),(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"background-image","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("h1",null,e.attributes.pageTitle||M("core/editor").getCurrentPost().title),""!==e.attributes.ctaOptionalSub?(0,t.createElement)("p",null,e.attributes.ctaOptionalSub):"",""!==e.attributes.ctaText?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-hero__button"},e.attributes.ctaText):"")))))}});const{__:$}=wp.i18n,{registerBlockType:R}=wp.blocks,{PanelBody:O,PanelRow:D,TextControl:V,TextareaControl:G,Button:F,CheckboxControl:Z,RadioControl:q,Disabled:z}=wp.components,{InspectorControls:j,MediaUploadCheck:W,MediaUpload:Y,useBlockProps:X}=wp.blockEditor,{select:K}=wp.data,Q=["image"],J=["video"];R("purdue-blocks/title-hero",{title:$("Title Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",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)"})))),category:"purdue-blocks",keywords:[],attributes:{pageTitle:{type:"string",default:""},blockStyle:{type:"string",default:"united"},addSubtitle:{type:"boolean",default:!1},subTitle:{type:"string",default:""},subText:{type:"string",default:""},addBorder:{type:"boolean",default:!1},backgroundType:{type:"string",default:"image"},imgUrl:{type:"string",default:""},imgMoUrl:{type:"string",default:""},altText:{type:"string",default:""},videoUrl:{type:"string",default:""},videoId:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:$("This block should be used at the top of the page."),edit:e=>{""===e.attributes.pageTitle&&e.setAttributes({pageTitle:K("core/editor").getCurrentPost().title}),e.attributes.addSubtitle?e.setAttributes({blockStyle:"acumin"}):e.setAttributes({blockStyle:"united"});const a=()=>{e.setAttributes({videoUrl:""})},l=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(j,null,(0,t.createElement)(O,null,(0,t.createElement)(D,null,(0,t.createElement)(q,{label:"Hero Style",help:"Choose between two design styles using different font families.",selected:e.attributes.blockStyle,options:[{label:"Acumin Pro",value:"acumin"},{label:"United Sans",value:"united"}],onChange:t=>{e.setAttributes({blockStyle:t}),"united"===t?e.setAttributes({addSubtitle:!1}):e.setAttributes({addSubtitle:!0})}})),(0,t.createElement)(D,null,(0,t.createElement)(Z,{label:"Add A border?",help:"Would you like to add a gold border around the hero image?",checked:e.attributes.addBorder,onChange:()=>{e.attributes.addBorder?e.setAttributes({addBorder:!1}):e.setAttributes({addBorder:!0})}}))),(0,t.createElement)(O,null,(0,t.createElement)(D,null,(0,t.createElement)(q,{label:"Hero Media Type",help:"Choose to use a video or an image as the hero background. Note on mobile devices an image you select on the editor will be displayed for the 'Video' option.",selected:e.attributes.backgroundType,options:[{label:"Image",value:"image"},{label:"Video",value:"video"}],onChange:t=>{e.setAttributes({backgroundType:t})}})),(0,t.createElement)(D,null,(0,t.createElement)(G,{label:"Hero Image Alt Text",help:"When video is selected as hero media type, this is the Alt text of the image displaying on mobile devices.",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"purdue-blocks-editor-title-hero"},e.attributes.addSubtitle?(0,t.createElement)("span",null,"Add lead-in text"):"",e.attributes.addSubtitle?(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:e.attributes.subTitle,className:"input",type:"text",placeholder:"Lead-in text...",onChange:t=>{e.setAttributes({subTitle:t.target.value})}}))):"",(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add Page Title"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.pageTitle?e.attributes.pageTitle:"",className:"input",type:"text",placeholder:"Page Title...",onChange:t=>{e.setAttributes({pageTitle:t.target.value})}}))),e.attributes.addSubtitle?"":(0,t.createElement)("span",null,"Add the intro copy here."),e.attributes.addSubtitle?"":(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("textarea",{value:""!==e.attributes.subText?e.attributes.subText:"",className:"textarea",placeholder:"Add intro copy here...",onChange:t=>{e.setAttributes({subText:t.target.value})}})))),(0,t.createElement)("div",{className:"media-container"},"video"===e.attributes.backgroundType?(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("span",null,"Choose a Hero Video (Recommended size: less than 10 MB)"),(0,t.createElement)(W,null,(0,t.createElement)(Y,{accept:"video",allowedTypes:J,onSelect:t=>{e.setAttributes({videoUrl:t.url,videoId:t.id})},render:l=>{let{open:r}=l;return""!==e.attributes.videoUrl?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)(z,null,(0,t.createElement)("video",{muted:!0,playsinline:"",src:e.attributes.videoUrl})),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Select a New Video"),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove video")):(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick a video from the media library."),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Open Media Library"))}}))):"",(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("span",null,"Choose a Hero Image"),"video"===e.attributes.backgroundType?(0,t.createElement)("span",null," (To display on mobile devices)"):"",(0,t.createElement)(W,null,(0,t.createElement)(Y,{allowedTypes:Q,onSelect:t=>{e.setAttributes({imgUrl:t.url,imgMoUrl:t.sizes&&t.sizes.hero_mobile?t.sizes.hero_mobile.url:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:r}=a;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Select a New Image"),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Remove image")):(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick a hero image from the media library."),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Open Media Library"))}})))))]},save:e=>{const a=X.save();return(0,t.createElement)("div",x({},a,{className:"pu-title-hero"}),(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"+(e.attributes.addSubtitle?" with-lead-in":"")},(0,t.createElement)("div",{className:"background-image"+(e.attributes.addBorder?" has-border":""),"aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}},"video"===e.attributes.backgroundType?(0,t.createElement)("div",{class:"hero-video-container"},(0,t.createElement)("video",{muted:"",loop:"",autoplay:"",playsinline:"",src:e.attributes.videoUrl})):"","video"===e.attributes.backgroundType?(0,t.createElement)("div",{class:"hero-video-control"},(0,t.createElement)("button",{class:"video-pause-button"},(0,t.createElement)("span",{class:"sr-only"},"Pause"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-pause-circle","aria-hidden":"true"}))),(0,t.createElement)("button",{class:"video-play-button hide"},(0,t.createElement)("span",{class:"sr-only"},"Play"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-play-circle","aria-hidden":"true"})))):""),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},e.attributes.addSubtitle?(0,t.createElement)("h1",{className:"has-lead-in"},e.attributes.subTitle?(0,t.createElement)("span",{className:"lead-in"},e.attributes.subTitle):"",(0,t.createElement)("span",{className:"main-title"},e.attributes.pageTitle||K("core/editor").getCurrentPost().title)):(0,t.createElement)("h1",null,e.attributes.pageTitle||K("core/editor").getCurrentPost().title),e.attributes.addSubtitle?"":(0,t.createElement)("p",null,e.attributes.subText))))))}});const{__:ee}=wp.i18n,{registerBlockType:te}=wp.blocks,{PanelBody:ae,PanelRow:le,CheckboxControl:re,TextareaControl:ne,TextControl:se,RadioControl:oe,SelectControl:ie}=wp.components,{RichText:ce,InspectorControls:ue,MediaUploadCheck:de,MediaUpload:me,InnerBlocks:be,useBlockProps:pe}=wp.blockEditor;te("purdue-blocks/info-box-hero",{title:ee("Info Box Hero"),icon:(0,t.createElement)("svg",{id:"beee9f3b-cb8c-4d24-a612-41eb8927e111","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("rect",{width:"100",height:"100",rx:"8.55"}),(0,t.createElement)("g",{id:"b8e37998-d6c2-43d8-bc0b-0305d6f0a794","data-name":"Window-maximize"},(0,t.createElement)("path",{class:"color-fff",d:"M93.5037,20.09555v59.8176a8.16129,8.16129,0,0,1-8.15259,8.15259H14.64889A8.16128,8.16128,0,0,1,6.4963,79.91315V20.09555a8.16128,8.16128,0,0,1,8.15259-8.16129H85.35111A8.16129,8.16129,0,0,1,93.5037,20.09555ZM85.35111,39.12407H14.64889V78.88646a1.02669,1.02669,0,0,0,1.02669,1.02669H84.32443a1.02669,1.02669,0,0,0,1.02668-1.02669h0Z"}))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".title"},subText:{type:"string",source:"html",selector:"p.content"},imgUrl:{type:"string",default:""},titleLevel:{type:"string",default:"h1"}},supports:{className:!1,anchor:!0},description:ee("Create a Hero row with a 3:1 background image and small info content box."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(ue,null,(0,t.createElement)(ae,null,(0,t.createElement)(le,null,(0,t.createElement)(ie,{label:"Heading level of the title",value:e.attributes.titleLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(le,null,(0,t.createElement)(ne,{label:"Hero Bakcground Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"info-box-hero-editor"},(0,t.createElement)(de,null,(0,t.createElement)(me,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{class:"remove-button",onClick:a},"Remove image"):""),(0,t.createElement)("div",{className:"info-box-content"},(0,t.createElement)("div",{className:"title"},(0,t.createElement)(ce,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:"title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0,allowedFormats:[]})),(0,t.createElement)("div",{className:"content"},(0,t.createElement)(ce,{tagName:"p",value:e.attributes.subText,className:"content",onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Text",allowedFormats:[]}))))}})))]},save:e=>{const a=pe.save();return(0,t.createElement)("div",x({},a,{className:"info-box-hero"}),(0,t.createElement)("div",{className:"image",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"info-box-hero--content"},(0,t.createElement)(ce.Content,{className:"title",tagName:e.attributes.titleLevel,value:e.attributes.title}),""!==e.attributes.subText&&void 0!==e.attributes.subText?(0,t.createElement)(ce.Content,{className:"content",tagName:"p",value:e.attributes.subText}):""))))}});const{__:he}=wp.i18n,{registerBlockType:ge}=wp.blocks,{InnerBlocks:ve,useBlockProps:Ee}=wp.blockEditor,fe=[["core/list",{}]];ge("purdue-blocks/list",{title:he("Right Column - List"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 97.47"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Arrow-right",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-d9ab28",d:"M47.47,2.84a5.34,5.34,0,0,1,7.57,0L98.43,46.21a5.34,5.34,0,0,1,0,7.56L55,97.16a5.34,5.34,0,0,1-7.57,0l-4.95-5a5.35,5.35,0,0,1,.09-7.65L69.5,58.93H5.36A5.35,5.35,0,0,1,0,53.57V46.43a5.35,5.35,0,0,1,5.36-5.36H69.5L42.61,15.45a5.31,5.31,0,0,1-.09-7.65Z",transform:"translate(0 -1.27)"})))),category:"purdue-blocks",keywords:[],attributes:{header:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:he("This block adds a styled list with a header."),edit:e=>[(0,t.createElement)("div",{className:"purdue-blocks-editor-list"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add List Header"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.header?e.attributes.header:"",className:"input",type:"text",placeholder:"Content Header...",onChange:t=>{e.setAttributes({header:t.target.value})}}))),(0,t.createElement)("span",null,"Add List Body"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)(ve,{template:fe,templateLock:"all"})))))],save:e=>{const a=Ee.save();return(0,t.createElement)("div",x({},a,{className:"pu-list"}),e.attributes.header?(0,t.createElement)("h2",null,e.attributes.header):"",(0,t.createElement)(ve.Content,null))}});const{__:ke}=wp.i18n,{registerBlockType:ye}=wp.blocks,{PanelBody:we,PanelRow:_e,TextareaControl:xe,Button:Ce,RadioControl:Ne,CheckboxControl:Te}=wp.components,{InspectorControls:Ae,MediaUploadCheck:Le,MediaUpload:Se,useBlockProps:Be}=wp.blockEditor,{select:He}=wp.data;ye("purdue-blocks/cta-banner",{title:ke("CTA Banner"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Bookmark",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M87.5,9.37V100L50,78.12,12.5,100V9.37A9.38,9.38,0,0,1,21.87,0H78.13A9.38,9.38,0,0,1,87.5,9.37Zm-9.37,1.18A1.18,1.18,0,0,0,77,9.37H23.05a1.18,1.18,0,0,0-1.18,1.18V83.68L50,67.27,78.13,83.68Z",transform:"translate(-12.5 0)"})))),category:"purdue-blocks",keywords:[],attributes:{type:{type:"string",default:"gold"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},ctaDesc:{type:"string",default:""},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:ke("This block is for adding a CTA banner on the page."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(Ae,null,(0,t.createElement)(we,null,(0,t.createElement)(_e,null,(0,t.createElement)(Ne,{label:"CTA Banner Type",help:"Choose the type of Banner.",selected:e.attributes.type,options:[{label:"Black",value:"black"},{label:"Gold",value:"gold"},{label:"Gray",value:"gray"},{label:"Image",value:"image"}],onChange:t=>{e.setAttributes({type:t})}}))),"image"===e.attributes.type?(0,t.createElement)(we,null,(0,t.createElement)(_e,null,(0,t.createElement)(xe,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})}))):"",(0,t.createElement)(we,null,(0,t.createElement)("h2",null,"CTA Button Link setting"),(0,t.createElement)(_e,null,(0,t.createElement)(Te,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:"pu-blocks-editor-cta-banner"},(0,t.createElement)("div",{className:"content"},"image"!==e.attributes.type?(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Description Text"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaDesc?e.attributes.ctaDesc:"",className:"input",type:"text",placeholder:"CTA Description Text...",onChange:t=>{e.setAttributes({ctaDesc:t.target.value})}}))):"","gray"!==e.attributes.type?(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Button Text"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaText?e.attributes.ctaText:"",className:"input",type:"text",placeholder:"CTA Button Text...",onChange:t=>{e.setAttributes({ctaText:t.target.value})}}))):"",(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Link URL"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaUrl?e.attributes.ctaUrl:"",className:"input",type:"text",placeholder:"CTA URL...",onChange:t=>{e.setAttributes({ctaUrl:t.target.value})}})))),"image"===e.attributes.type?(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Choose a Background Image"),(0,t.createElement)(Le,null,(0,t.createElement)(Se,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"pu-blocks-editor-cta-banner__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(Ce,{className:"pu-blocks-editor-cta-banner__button",onClick:r},"Select a New Image"),(0,t.createElement)(Ce,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove image")):(0,t.createElement)("div",{className:"pu-blocks-editor-cta-banner__container"},(0,t.createElement)("p",{className:"pu-blocks-editor-cta-banner__description"},"Pick an image from the media library. The recommended aspect ratio is 3:2."),(0,t.createElement)(Ce,{className:"pu-blocks-editor-cta-banner__button",onClick:r},"Open Media Library"))}}))):"")]},save:e=>{const a=Be.save();return(0,t.createElement)("div",x({},a,{className:`pu-cta-banner${"gold"===e.attributes.type?" pu-cta-banner-gold":""}${"black"===e.attributes.type?" pu-cta-banner-black":""}\n ${"gray"===e.attributes.type?" pu-cta-banner-gray":""}${"image"===e.attributes.type?" pu-cta-banner-image":""}`,style:"image"===e.attributes.type&&e.attributes.imgUrl?{backgroundImage:`url(${e.attributes.imgUrl})`}:{},"aria-label":"image"===e.attributes.type&&e.attributes.altText?e.attributes.altText:""}),(0,t.createElement)("div",{className:"container"},"gray"===e.attributes.type?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-banner-gray__desc",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaDesc):"","image"===e.attributes.type?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-banner-image__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):"","gold"===e.attributes.type?(0,t.createElement)("p",{className:"pu-cta-banner-gold__desc"},e.attributes.ctaDesc):"","gold"===e.attributes.type?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-banner-gold__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):"","black"===e.attributes.type?(0,t.createElement)("p",{className:"pu-cta-banner-black__desc"},e.attributes.ctaDesc):"","black"===e.attributes.type?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-banner-black__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))}});const{__:Ue}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{PanelBody:Pe,PanelRow:Me,CheckboxControl:$e,TextareaControl:Re,TextControl:Oe,Button:De}=wp.components,{InspectorControls:Ve,MediaUploadCheck:Ge,MediaUpload:Fe,RichText:Ze,useBlockProps:qe}=wp.blockEditor;Ie("purdue-blocks/cta-button",{title:Ue("CTA Button"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"clone",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",d:"M100,9.38V71.87a9.38,9.38,0,0,1-9.37,9.38H81.25v9.37A9.38,9.38,0,0,1,71.87,100H9.37A9.38,9.38,0,0,1,0,90.62V28.13a9.38,9.38,0,0,1,9.37-9.38h9.38V9.38A9.38,9.38,0,0,1,28.12,0H90.63A9.38,9.38,0,0,1,100,9.38ZM71.87,89.45v-8.2H28.12a9.38,9.38,0,0,1-9.37-9.38V28.13h-8.2A1.17,1.17,0,0,0,9.37,29.3V89.45a1.17,1.17,0,0,0,1.18,1.17H70.7A1.17,1.17,0,0,0,71.87,89.45ZM90.63,70.7V10.55a1.17,1.17,0,0,0-1.18-1.17H29.3a1.17,1.17,0,0,0-1.18,1.17V70.7a1.17,1.17,0,0,0,1.18,1.17H89.45A1.17,1.17,0,0,0,90.63,70.7Z",transform:"translate(0 0)"})))),category:"purdue-blocks",keywords:[],attributes:{subText:{type:"string",default:""},link:{type:"string",default:""},ctaText:{type:"string",default:""},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:Ue("Create a card with an image, some text, and a call to action button."),edit:e=>[(0,t.createElement)(Ve,null,(0,t.createElement)(Pe,null,(0,t.createElement)(Me,null,(0,t.createElement)(Re,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(Me,null,(0,t.createElement)(Oe,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})),(0,t.createElement)(Me,null,(0,t.createElement)(Oe,{label:"Link address",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})),(0,t.createElement)(Me,null,(0,t.createElement)($e,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:"card cta-card cta-button-admin"},(0,t.createElement)(Ge,null,(0,t.createElement)(Fe,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{className:"image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)(De,{onClick:l},""!==e.attributes.imgUrl?"Select a new image":"Select an image (optional)"))}})),(0,t.createElement)("div",{className:"card-content"},(0,t.createElement)(Ze,{tagName:"p",value:e.attributes.subText,className:"content",onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Card Text"}),e.attributes.ctaText?(0,t.createElement)("div",{className:"cta-card__button"},(0,t.createElement)("span",null,e.attributes.ctaText)):""))],save:e=>{const a=qe.save();return(0,t.createElement)("a",x({},a,{className:"card cta-card",href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener"}),e.attributes.imgUrl?(0,t.createElement)("div",{className:"card-image"},(0,t.createElement)("figure",{className:"image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))):"",(0,t.createElement)("div",{className:"card-content"},(0,t.createElement)(Ze.Content,{className:"",tagName:"p",value:e.attributes.subText}),(0,t.createElement)("div",{className:"cta-card__button"},e.attributes.ctaText)))}});const{__:ze}=wp.i18n,{registerBlockType:je}=wp.blocks,{PanelBody:We,PanelRow:Ye,CheckboxControl:Xe,RadioControl:Ke,TextareaControl:Qe,TextControl:Je,Button:et}=wp.components,{InnerBlocks:tt,InspectorControls:at,MediaUploadCheck:lt,MediaUpload:rt,useBlockProps:nt}=wp.blockEditor,{select:st}=wp.data,ot=[{faSlug:"facebook-square",name:"Facebook",share:"https://www.facebook.com/"},{faSlug:"twitter-square",name:"Twitter",share:"https://twitter.com/"},{faSlug:"linkedin",name:"LinkedIn",share:"https://www.linkedin.com/in/"},{faSlug:"instagram",name:"Instagram",share:"https://www.instagram.com/"}],it=[["core/paragraph",{placeholder:"Add bio"}]];je("purdue-blocks/faculty-profile-card",{title:ze("Faculty Profile Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 77.78"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Address-card",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M100,19.44V80.56a8.33,8.33,0,0,1-8.33,8.33H8.33A8.33,8.33,0,0,1,0,80.56V19.44a8.33,8.33,0,0,1,8.33-8.33H91.67A8.33,8.33,0,0,1,100,19.44Zm-8.33,0H8.33V80.56H91.67Zm-75,49.45V65.56c0-5.53,5.22-10,11.66-10,2,0,3.11,1.38,7.78,1.38s5.9-1.38,7.78-1.38c6.44,0,11.66,4.47,11.66,10v3.33a3.63,3.63,0,0,1-3.88,3.33H20.56A3.63,3.63,0,0,1,16.67,68.89Zm8.33-30A11.11,11.11,0,1,1,36.11,50,11.12,11.12,0,0,1,25,38.89ZM61.11,37.5V34.72a1.4,1.4,0,0,1,1.39-1.39H81.94a1.39,1.39,0,0,1,1.39,1.39V37.5a1.39,1.39,0,0,1-1.39,1.39H62.5A1.4,1.4,0,0,1,61.11,37.5Zm0,11.11V45.83a1.4,1.4,0,0,1,1.39-1.39H81.94a1.39,1.39,0,0,1,1.39,1.39v2.78A1.39,1.39,0,0,1,81.94,50H62.5A1.39,1.39,0,0,1,61.11,48.61Zm0,11.11V56.94a1.39,1.39,0,0,1,1.39-1.38H81.94a1.38,1.38,0,0,1,1.39,1.38v2.78a1.39,1.39,0,0,1-1.39,1.39H62.5A1.39,1.39,0,0,1,61.11,59.72Z",transform:"translate(0 -11.11)"})))),category:"purdue-blocks",keywords:[],attributes:{profilePhoto:{type:"string",default:""},altText:{type:"string",default:""},phone:{type:"string",default:""},email:{type:"string",default:""},personalLink:{type:"string",default:""},personalLinkText:{type:"string",default:""},extraLink:{type:"string",default:""},name:{type:"string",default:""},title:{type:"string",default:""},bio:{type:"string",default:""},styleToggle:{type:"string",default:"wide"},includeSocial:{type:"boolean",default:!1},checkedSocials:{type:"object",default:{}},titlePosition:{type:"boolean",default:!1},bioPosition:{type:"boolean",default:!1},street:{type:"string",default:""},city:{type:"string",default:""},state:{type:"string",default:""},zip:{type:"string",default:""},officePhone:{type:"string",default:""},fax:{type:"string",default:""},height:{type:"string",default:"auto"}},supports:{className:!1,anchor:!0},description:ze("This block renders a card that can contain a photo, the contact information, and the social media links for a faculty member."),edit:e=>{const a=e.attributes.checkedSocials,l=()=>{e.attributes.includeSocial?e.setAttributes({includeSocial:!1}):e.setAttributes({includeSocial:!0})},r=()=>{e.setAttributes({profilePhoto:""})};return[(0,t.createElement)(at,null,(0,t.createElement)(We,null,(0,t.createElement)(Ye,null,(0,t.createElement)(Ke,{label:"Card Style",help:"The wide card accepts a 2x1 image and presents the name, title, and social links at the bottom of the card. The narrow card accepts a square image and presents the name, title, and social links at the top of the card. The Mini card has no image, social links, or description.",selected:e.attributes.styleToggle,options:[{label:"Wide",value:"wide"},{label:"Narrow",value:"narrow"},{label:"Mini",value:"mini"}],onChange:t=>{e.setAttributes({styleToggle:t})}})),(0,t.createElement)(Ye,null,(0,t.createElement)(Ke,{label:"Height",help:"Select 100% if you want the card to take the full height of its container.",selected:e.attributes.height,options:[{label:"Auto",value:"auto"},{label:"100%",value:"full"}],onChange:t=>{e.setAttributes({height:t})}}))),(0,t.createElement)(We,null,(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{label:"Place title on the right?",checked:e.attributes.titlePosition,onChange:()=>e.setAttributes({titlePosition:!e.attributes.titlePosition})})),"mini"!==e.attributes.styleToggle?(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{label:"Place Faculty Bio on the right?",checked:e.attributes.bioPosition,onChange:()=>e.setAttributes({bioPosition:!e.attributes.bioPosition})})):"",(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{label:"Include Social Media Links",help:"Would you like to include this faculty member's social media account links?",checked:e.attributes.includeSocial,onChange:l})),"mini"!==e.attributes.styleToggle?(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{label:"Include Social Media Links",help:"Would you like to include this faculty member's social media account links?",checked:e.attributes.includeSocial,onChange:l})):"",e.attributes.includeSocial?(0,t.createElement)(Ye,{className:"social-check-list"},ot.map((l=>{let{faSlug:r,name:n}=l;return(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{className:"social-check-list__item",label:n,checked:!!a[n]&&a[n].checked,onChange:t=>{t?(a[n]={},a[n].slug=r,a[n].checked=!0):delete a[n],e.setAttributes({includeSocial:!0,checkedSocials:{...a}})}}),void 0!==a[n]&&!0===a[n].checked?(0,t.createElement)(Je,{label:`${n} Profile Link`,type:"text",value:a[n].link,onChange:t=>{a[n].link=t,e.setAttributes({checkedSocials:{...a}})}}):"")}))):""),(0,t.createElement)(We,null,(0,t.createElement)(Ye,null,(0,t.createElement)(Qe,{label:"Profile Picture Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"pu-blocks-editor-faculty-profile"},(0,t.createElement)("div",{className:"columns"},"mini"!==e.attributes.styleToggle?(0,t.createElement)("div",{className:"content column"},(0,t.createElement)("span",null,"Choose a Profile Picture"),(0,t.createElement)(lt,null,(0,t.createElement)(rt,{onSelect:t=>{e.setAttributes({profilePhoto:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return""!==e.attributes.profilePhoto?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.profilePhoto})),(0,t.createElement)(et,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Select a New Image"),(0,t.createElement)(et,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Remove image")):(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick an image from the media library."),(0,t.createElement)(et,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Open Media Library"))}}))):"",(0,t.createElement)("div",{className:"content column"},(0,t.createElement)("span",null,"Add Phone Number"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.phone?e.attributes.phone:"",className:"input",type:"text",placeholder:"Phone Number...",onChange:t=>{e.setAttributes({phone:t.target.value})}}))),(0,t.createElement)("span",null,"Add Fax Number"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.fax?e.attributes.fax:"",className:"input",type:"text",placeholder:"Fax Number...",onChange:t=>{e.setAttributes({fax:t.target.value})}}))),(0,t.createElement)("span",null,"Add Email Address"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.email?e.attributes.email:"",className:"input",type:"text",placeholder:"Email...",onChange:t=>{e.setAttributes({email:t.target.value})}}))),(0,t.createElement)("span",null,"Add Optional Personal Website or page"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.personalLink?e.attributes.personalLink:"",className:"input",type:"text",placeholder:"Link URL...",onChange:t=>{e.setAttributes({personalLink:t.target.value.trim()})}}))),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.personalLinkText?e.attributes.personalLinkText:"",className:"input",type:"text",placeholder:"Link Text...",onChange:t=>{e.setAttributes({personalLinkText:t.target.value})}}),(0,t.createElement)("span",{style:{fontStyle:"italic"}},"Link text is optional. When left empty it'll use the link URL."))),(0,t.createElement)("span",null,"Add Optional Google Scholar Link"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.extraLink?e.attributes.extraLink:"",className:"input",type:"text",placeholder:"Google Scholar Link...",onChange:t=>{e.setAttributes({extraLink:t.target.value.trim()})}}))))),(0,t.createElement)("div",{className:"content main-info"},(0,t.createElement)("span",null,"Optional Address"),(0,t.createElement)("div",{className:"address-form"},(0,t.createElement)("div",{className:"field street"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.street?e.attributes.street:"",className:"input",type:"text",placeholder:"Street...",onChange:t=>{e.setAttributes({street:t.target.value})}}))),(0,t.createElement)("div",{className:"field city"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.city?e.attributes.city:"",className:"input",type:"text",placeholder:"City...",onChange:t=>{e.setAttributes({city:t.target.value})}}))),(0,t.createElement)("div",{className:"field state"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.state?e.attributes.state:"",className:"input",type:"text",placeholder:"State...",onChange:t=>{e.setAttributes({state:t.target.value})}}))),(0,t.createElement)("div",{className:"field zip"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.zip?e.attributes.zip:"",className:"input",type:"text",placeholder:"Zipcode...",onChange:t=>{e.setAttributes({zip:t.target.value})}}))),(0,t.createElement)("div",{className:"field office-phone"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.officePhone?e.attributes.officePhone:"",className:"input",type:"text",placeholder:"Office Phone Number...",onChange:t=>{e.setAttributes({officePhone:t.target.value})}})))),(0,t.createElement)("span",null,"Faculty Name"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.name?e.attributes.name:"",className:"input",type:"text",placeholder:"Faculty Name...",onChange:t=>{e.setAttributes({name:t.target.value})}}))),(0,t.createElement)("span",null,"Faculty Position"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.title?e.attributes.title:"",className:"input",type:"text",placeholder:"Faculty Position...",onChange:t=>{e.setAttributes({title:t.target.value})}}))),"mini"!==e.attributes.styleToggle?(0,t.createElement)("span",null,"Optional Faculty Bio"):"","mini"!==e.attributes.styleToggle?e.attributes.bioPosition?(0,t.createElement)(tt,{template:it,templateLock:!1}):(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("textarea",{value:""!==e.attributes.bio?e.attributes.bio:"",className:"input",placeholder:"Faculty Bio...",onChange:t=>{e.setAttributes({bio:t.target.value})}}))):""))]},save:e=>{const a=nt.save();return""==e.attributes.name?(0,t.createElement)("div",x({},a,{className:`faculty-profile-card faculty-profile-card--${e.attributes.styleToggle} box${"auto"===e.attributes.height?"":" faculty-profile-card--full-height"}`}),(0,t.createElement)("div",{className:"media"},(0,t.createElement)("div",{className:"media-left"},(0,t.createElement)("div",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.profilePhoto}))),(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("ul",null,""!==e.attributes.phone?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-phone","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.phone),(0,t.createElement)("span",null,"Phone"))):"",""!==e.attributes.fax?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-fax","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.fax),(0,t.createElement)("span",null,"Fax"))):"",""!==e.attributes.email?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-envelope","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:`mailto:${e.attributes.email}`},e.attributes.email),(0,t.createElement)("span",null,"Email"))):"",""!==e.attributes.street||""!==e.attributes.city||""!==e.attributes.state||""!==e.attributes.zip||""!==e.attributes.officePhone?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-address-book","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.street,e.attributes.street?(0,t.createElement)("br",null):"",`${e.attributes.city?`${e.attributes.city}, `:""}${e.attributes.state?`${e.attributes.state} `:""}${e.attributes.zip}`,(0,t.createElement)("br",null),""!==e.attributes.officePhone.replace(/\s+/g,"")?`Office: ${e.attributes.officePhone}`:""),(0,t.createElement)("span",null,"Address"))):"",""!==e.attributes.personalLink?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-desktop","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:e.attributes.personalLink.includes("https://")?e.attributes.personalLink:`https://${e.attributes.personalLink}`},e.attributes.personalLinkText?e.attributes.personalLinkText:e.attributes.personalLink),(0,t.createElement)("span",null,"Personal Website"))):"",""!==e.attributes.extraLink?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-link","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:e.attributes.extraLink.includes("https://")?e.attributes.extraLink:`https://${e.attributes.extraLink}`},"Google Scholar Website"))):"")))),""!==e.attributes.bio&&"mini"!==e.attributes.styleToggle?(0,t.createElement)("div",{className:"content"},e.attributes.bioPosition?(0,t.createElement)(tt.Content,null):(0,t.createElement)("p",null,e.attributes.bio)):"",(0,t.createElement)("div",{className:"level is-mobile"},e.attributes.includeSocial?(0,t.createElement)("div",{className:"level-right content"},(0,t.createElement)("p",{className:"level-item"},"Follow Me: "),Object.keys(e.attributes.checkedSocials).map((a=>(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",className:"level-item",href:`${e.attributes.checkedSocials[a].link}`},(0,t.createElement)("i",{className:`fab fa-${e.attributes.checkedSocials[a].slug}`,"aria-hidden":"true"}))))):"")):(0,t.createElement)("div",x({},a,{className:`faculty-profile-card faculty-profile-card--${e.attributes.styleToggle} box${"auto"===e.attributes.height?"":" faculty-profile-card--full-height"}`}),(0,t.createElement)("div",{className:"media"},(0,t.createElement)("div",{className:"media-left"},(0,t.createElement)("div",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.profilePhoto}))),(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("div",{className:"content"},e.attributes.titlePosition?(0,t.createElement)("p",{className:"faculty-title faculty-title-side"},e.attributes.title):"",e.attributes.bioPosition&&"mini"!==e.attributes.styleToggle?(0,t.createElement)(tt.Content,null):"",(0,t.createElement)("ul",null,""!==e.attributes.phone?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-phone","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.phone),(0,t.createElement)("span",null,"Phone"))):"",""!==e.attributes.fax?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-fax","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.fax),(0,t.createElement)("span",null,"Fax"))):"",""!==e.attributes.email?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-envelope","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:`mailto:${e.attributes.email}`},e.attributes.email),(0,t.createElement)("span",null,"Email"))):"",""!==e.attributes.street||""!==e.attributes.city||""!==e.attributes.state||""!==e.attributes.zip||""!==e.attributes.officePhone?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-address-book","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.street,e.attributes.street?(0,t.createElement)("br",null):"",`${e.attributes.city?`${e.attributes.city}, `:""}${e.attributes.state?`${e.attributes.state} `:""}${e.attributes.zip}`,(0,t.createElement)("br",null),""!==e.attributes.officePhone.replace(/\s+/g,"")?`Office: ${e.attributes.officePhone}`:""),(0,t.createElement)("span",null,"Address"))):"",""!==e.attributes.personalLink?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-desktop","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:e.attributes.personalLink.includes("https://")?e.attributes.personalLink:`https://${e.attributes.personalLink}`},e.attributes.personalLinkText?e.attributes.personalLinkText:e.attributes.personalLink),(0,t.createElement)("span",null,"Personal Website"))):"",""!==e.attributes.extraLink?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-link","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:e.attributes.extraLink.includes("https://")?e.attributes.extraLink:`https://${e.attributes.extraLink}`},"Google Scholar Website"))):"")))),""===e.attributes.bio||e.attributes.bioPosition||"mini"===e.attributes.styleToggle?"":(0,t.createElement)("div",{className:"content"},(0,t.createElement)("p",null,e.attributes.bio)),(0,t.createElement)("div",{className:"level"},(0,t.createElement)("div",{className:"level-left"},(0,t.createElement)("div",{className:"level-item"},(0,t.createElement)("p",{className:"faculty-name"},e.attributes.name),e.attributes.titlePosition?"":(0,t.createElement)("p",{className:"faculty-title"},e.attributes.title))),e.attributes.includeSocial?(0,t.createElement)("div",{className:"level-right content"},(0,t.createElement)("p",{className:"level-item"},"Follow Me: "),Object.keys(e.attributes.checkedSocials).map((a=>(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",className:"level-item",href:`${e.attributes.checkedSocials[a].link}`},(0,t.createElement)("i",{className:`fab fa-${e.attributes.checkedSocials[a].slug}`,"aria-hidden":"true"}))))):""))}});const{__:ct}=wp.i18n,{registerBlockType:ut}=wp.blocks,{PanelBody:dt,PanelRow:mt,TextareaControl:bt,TextControl:pt,Button:ht,RadioControl:gt,CheckboxControl:vt,SelectControl:Et}=wp.components,{InspectorControls:ft,MediaUploadCheck:kt,MediaUpload:yt,InnerBlocks:wt,useBlockProps:_t}=wp.blockEditor,xt=[["core/paragraph",{placeholder:"Body content copy"}]];ut("purdue-blocks/feature-story",{title:ct("Featured Story"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 68.75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M84.38,34.38A34.21,34.21,0,0,1,75.87,57c-3.25,3.71-8.35,11.49-10.24,18H56.26v0a11,11,0,0,1,.43-2.79A61.73,61.73,0,0,1,68.82,50.81a25,25,0,1,0-37.64,0A61.7,61.7,0,0,1,43.33,72.23,9.49,9.49,0,0,1,43.74,75v0H34.37c-1.89-6.51-7-14.29-10.24-18A34.37,34.37,0,1,1,84.38,34.38ZM53.12,18.75A3.12,3.12,0,0,1,50,21.88a12.51,12.51,0,0,0-12.5,12.5,3.13,3.13,0,0,1-6.25,0A18.77,18.77,0,0,1,50,15.63,3.11,3.11,0,0,1,53.12,18.75ZM34.38,81.25H65.62v8.43a3.11,3.11,0,0,1-.52,1.73L60.3,98.6a3.1,3.1,0,0,1-2.6,1.4H42.3a3.1,3.1,0,0,1-2.6-1.4l-4.79-7.19a3.11,3.11,0,0,1-.52-1.73Z",transform:"translate(-15.62)"})))),category:"purdue-blocks",keywords:[],attributes:{style:{type:"boolean",default:!0},header:{type:"string",default:""},imgUrl:{type:"string",default:""},linkImg:{type:"boolean",default:!1},altText:{type:"string",default:""},caption:{type:"string",default:""},contentAlign:{type:"string",default:"left"},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},addCta2:{type:"boolean",default:!1},ctaUrl2:{type:"string",default:""},ctaText2:{type:"string",default:""},external2:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h2"},headerColor:{type:"string",default:"gold"},buttonOption:{type:"string",default:"black"},backgroundColor:{type:"string",default:"white"},addBorder:{type:"boolean",default:!1},borderColor:{type:"string",default:"gold"}},supports:{className:!1,anchor:!0},description:ct("This block adds a feature story row on the page."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(ft,null,(0,t.createElement)(dt,null,(0,t.createElement)(mt,null,(0,t.createElement)(gt,{label:"Block Styles",help:"Full Width: Takes up the full width of the screen; Aligned: Includes normal page margins.",selected:e.attributes.style?"full":"aligned",options:[{label:"Aligned",value:"aligned"},{label:"Full width",value:"full"}],onChange:t=>{e.setAttributes({style:"full"===t})}})),e.attributes.style?(0,t.createElement)(mt,null,(0,t.createElement)(gt,{label:"Background Color",help:"Choose the background color of the content area.",selected:e.attributes.backgroundColor,options:[{label:"White",value:"white"},{label:"Black",value:"black"}],onChange:t=>{e.setAttributes({backgroundColor:t}),e.setAttributes({headerColor:"gold"}),e.setAttributes({borderColor:"gold"})}})):"",e.attributes.style&&!e.attributes.caption?(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Add a Border?",checked:e.attributes.addBorder,onChange:()=>e.setAttributes({addBorder:!e.attributes.addBorder})})):"",e.attributes.style&&!e.attributes.caption&&e.attributes.addBorder?(0,t.createElement)(mt,null,(0,t.createElement)(Et,{label:"Color of the Border",value:e.attributes.borderColor,options:"white"===e.attributes.backgroundColor?[{label:"Black",value:"black"},{label:"Rush Gold",value:"gold"}]:[{label:"Boiler Gold",value:"gold"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({borderColor:t})}})):"",(0,t.createElement)(mt,null,(0,t.createElement)(gt,{label:"Image Alignment",help:"Choose to place the image to the left or right.",selected:e.attributes.contentAlign,options:[{label:"Left",value:"right"},{label:"Right",value:"left"}],onChange:t=>{e.setAttributes({contentAlign:t})}}))),(0,t.createElement)(dt,null,(0,t.createElement)(mt,null,(0,t.createElement)(Et,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}})),(0,t.createElement)(mt,null,(0,t.createElement)(Et,{label:"Color of the Header",value:e.attributes.headerColor,options:"white"===e.attributes.backgroundColor?[{label:"Black",value:"black"},{label:"Digital Gold",value:"gold"},{label:"Steel",value:"steel"}]:[{label:"Boiler Gold",value:"gold"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({headerColor:t})}}))),e.attributes.ctaUrl?(0,t.createElement)(dt,null,(0,t.createElement)("h2",null,"CTA Button Link setting"),(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})),(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Link image?",help:"Would you like to add the same link to image?",checked:e.attributes.linkImg,onChange:()=>{e.attributes.linkImg?e.setAttributes({linkImg:!1}):e.setAttributes({linkImg:!0})}})),e.attributes.style&&"white"===e.attributes.backgroundColor?(0,t.createElement)(mt,null,(0,t.createElement)(Et,{label:"Button Color",help:"Choose the color of this button.",value:e.attributes.buttonOption,options:[{label:"Black",value:"black"},{label:"Gold",value:"gold"}],onChange:t=>{e.setAttributes({buttonOption:t})}})):"",e.attributes.style&&!e.attributes.linkImg?(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Add a Secondary CTA Button?",help:"Would you like to add a secondary CTA button below the primary one?",checked:e.attributes.addCta2,onChange:()=>e.setAttributes({addCta2:!e.attributes.addCta2})})):"",e.attributes.style&&!e.attributes.linkImg&&e.attributes.addCta2?(0,t.createElement)(mt,null,(0,t.createElement)(pt,{label:"Secondary CTA Button Link Text",value:e.attributes.ctaText2,onChange:t=>e.setAttributes({ctaText2:t})})):"",e.attributes.style&&!e.attributes.linkImg&&e.attributes.addCta2?(0,t.createElement)(mt,null,(0,t.createElement)(pt,{label:"Secondary CTA Button Link URL",value:e.attributes.ctaUrl2,onChange:t=>e.setAttributes({ctaUrl2:t})})):"",e.attributes.style&&!e.attributes.linkImg&&e.attributes.addCta2?(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Open the link of Secondary CTA Button in a new tab?",checked:e.attributes.external2,onChange:()=>e.setAttributes({external2:!e.attributes.external2})})):""):"",(0,t.createElement)(dt,null,(0,t.createElement)(mt,null,(0,t.createElement)(bt,{label:"Featured Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(mt,null,(0,t.createElement)(bt,{label:"Image Caption",value:e.attributes.caption,onChange:t=>e.setAttributes({caption:t})})))),(0,t.createElement)("div",{className:"purdue-blocks-editor-feature-story"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add A Header"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.header?e.attributes.header:"",className:"input",type:"text",placeholder:"Content Header...",onChange:t=>{e.setAttributes({header:t.target.value})}}))),(0,t.createElement)("span",null,"Add Content Body"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)(wt,{template:xt,templateLock:!1}))),(0,t.createElement)("span",null,"Add CTA Button Text and URL"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Text"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaText?e.attributes.ctaText:"",className:"input",type:"text",placeholder:"CTA Text...",onChange:t=>{e.setAttributes({ctaText:t.target.value})}}))),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA URL"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaUrl?e.attributes.ctaUrl:"",className:"input",type:"text",placeholder:"CTA URL...",onChange:t=>{e.setAttributes({ctaUrl:t.target.value})}})))),(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Choose a Hero Image"),(0,t.createElement)(kt,null,(0,t.createElement)(yt,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"purdue-blocks-editor-feature-story__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(ht,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Select a New Image"),(0,t.createElement)(ht,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove image")):(0,t.createElement)("div",{className:"purdue-blocks-editor-feature-story__container"},(0,t.createElement)("p",{className:"purdue-blocks-editor-feature-story__description"},"Pick an image from the media library. The recommended aspect ratio is 3:2."),(0,t.createElement)(ht,{className:"purdue-blocks-editor-feature-story__button",onClick:r},"Open Media Library"))}}))))]},save:e=>{const a=_t.save();return e.attributes.style?(0,t.createElement)("div",x({},a,{className:"pu-feature-story"+("black"===e.attributes.backgroundColor?" pu-feature-story__black":"")}),(0,t.createElement)("div",{className:"hero is-medium"},e.attributes.linkImg&&e.attributes.ctaUrl?(0,t.createElement)("a",{className:"left"===e.attributes.contentAlign?"hero-image":"hero-image-reversed",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("span",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText}),e.attributes.caption?(0,t.createElement)("span",{className:"feature-story-caption"},e.attributes.caption):""):(0,t.createElement)("div",{className:"left"===e.attributes.contentAlign?"hero-image":"hero-image-reversed"},(0,t.createElement)("span",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText}),e.attributes.caption?(0,t.createElement)("span",{className:"feature-story-caption"},e.attributes.caption):""),e.attributes.style&&!e.attributes.caption&&e.attributes.addBorder?(0,t.createElement)("div",{className:"pu-feature-story__border"+(e.attributes.style&&!e.attributes.caption&&e.attributes.addBorder&&"gold"===e.attributes.borderColor?" pu-feature-story__border--gold":"")}):"",(0,t.createElement)("div",{className:"left"===e.attributes.contentAlign?"shadow":"shadow-reversed"}),(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:`content${"left"===e.attributes.contentAlign?"":" content-reversed"}${"white"===e.attributes.backgroundColor&&"black"===e.attributes.headerColor?" header-color-black":""}${"white"===e.attributes.backgroundColor&&"steel"===e.attributes.headerColor?" header-color-steel":""}${"black"===e.attributes.backgroundColor&&"white"===e.attributes.headerColor?" header-color-white":""}`},e.attributes.header&&"h1"===e.attributes.headerLevel?(0,t.createElement)("h1",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h2"===e.attributes.headerLevel?(0,t.createElement)("h2",null,e.attributes.header):"",e.attributes.header&&"h3"===e.attributes.headerLevel?(0,t.createElement)("h3",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h4"===e.attributes.headerLevel?(0,t.createElement)("h4",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h5"===e.attributes.headerLevel?(0,t.createElement)("h5",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h6"===e.attributes.headerLevel?(0,t.createElement)("h6",{class:"featured-story-header"},e.attributes.header):"",(0,t.createElement)(wt.Content,null),e.attributes.ctaUrl&&e.attributes.ctaText?e.attributes.addCta2&&e.attributes.ctaText2&&e.attributes.style&&!e.attributes.linkImg?(0,t.createElement)("div",{className:"pu-feature-story__button-container"},(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-feature-story__button"+("gold"===e.attributes.buttonOption?" pu-feature-story__button--gold":""),target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText),(0,t.createElement)("a",{href:e.attributes.ctaUrl2,className:"pu-feature-story__button pu-feature-story__button--second",target:e.attributes.external2?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText2)):(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-feature-story__button"+("gold"===e.attributes.buttonOption?" pu-feature-story__button--gold":""),target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))))):(0,t.createElement)("div",x({},a,{className:"pu-feature-story pu-feature-story__narrow"}),(0,t.createElement)("div",{className:"container pu-feature-story__container"+("left"===e.attributes.contentAlign?"":" pu-feature-story__container-reversed")},e.attributes.linkImg&&e.attributes.ctaUrl?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"background-image-link",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("div",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText}),e.attributes.caption?(0,t.createElement)("span",{className:"feature-story-caption"},e.attributes.caption):""):(0,t.createElement)("div",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},e.attributes.caption?(0,t.createElement)("span",{className:"feature-story-caption"},e.attributes.caption):""),(0,t.createElement)("div",{className:`story-content${"black"===e.attributes.headerColor?" header-color-black":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}`},e.attributes.header&&"h1"===e.attributes.headerLevel?(0,t.createElement)("h1",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h2"===e.attributes.headerLevel?(0,t.createElement)("h2",null,e.attributes.header):"",e.attributes.header&&"h3"===e.attributes.headerLevel?(0,t.createElement)("h3",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h4"===e.attributes.headerLevel?(0,t.createElement)("h4",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h5"===e.attributes.headerLevel?(0,t.createElement)("h5",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h6"===e.attributes.headerLevel?(0,t.createElement)("h6",{class:"featured-story-header"},e.attributes.header):"",(0,t.createElement)(wt.Content,null),e.attributes.ctaUrl&&e.attributes.ctaText?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-feature-story__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):"")))}});const{__:Ct}=wp.i18n,{registerBlockType:Nt}=wp.blocks,{PanelBody:Tt,PanelRow:At,TextControl:Lt,TextareaControl:St,Button:Bt,CheckboxControl:Ht,RadioControl:Ut}=wp.components,{InspectorControls:It,MediaUploadCheck:Pt,MediaUpload:Mt,InnerBlocks:$t,useBlockProps:Rt,RichText:Ot}=wp.blockEditor;Nt("purdue-blocks/proofpoint",{title:Ct("Reasons to Believe"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Bookmark",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",d:"M87.5,9.37V100L50,78.12,12.5,100V9.37A9.38,9.38,0,0,1,21.87,0H78.13A9.38,9.38,0,0,1,87.5,9.37Zm-9.37,1.18A1.18,1.18,0,0,0,77,9.37H23.05a1.18,1.18,0,0,0-1.18,1.18V83.68L50,67.27,78.13,83.68Z",transform:"translate(-12.5 0)"})))),category:"purdue-blocks",keywords:[],attributes:{color:{type:"string",default:"black"},border:{type:"boolean",default:!1},buttonColor:{type:"string",default:"black"},hasLead:{type:"boolean",default:!1},lead:{type:"string",default:""},highlighted:{type:"string",default:""},headerfontStyle:{type:"string",default:"narrow"},contentfontStyle:{type:"string",default:"narrow"},content:{type:"string",default:""},source:{type:"string",default:""},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},height:{type:"string",default:"auto"},boxshadow:{type:"boolean",default:!0}},supports:{className:!0,anchor:!0},description:Ct("This block adds a Reasons to Believe card."),edit:e=>[(0,t.createElement)(It,null,(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Background Color",help:"Choose to background color of the proofpoint.",selected:e.attributes.color,options:[{label:"Black",value:"black"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({color:t})}})),(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Height",help:"Choose to the height of the proofpoint.",selected:e.attributes.height,options:[{label:"Auto",value:"auto"},{label:"100%",value:"full"}],onChange:t=>{e.setAttributes({height:t})}})),(0,t.createElement)(At,null,(0,t.createElement)(Ht,{label:"Add Lead Text above Highlighted Text?",checked:e.attributes.hasLead,onChange:()=>e.setAttributes({hasLead:!e.attributes.hasLead})}))),"white"===e.attributes.color?(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ht,{label:"Add box shadow?",help:"Would you like to add box shadow around the proofpoint?",checked:e.attributes.boxshadow,onChange:()=>{e.setAttributes({boxshadow:!e.attributes.boxshadow})}}))):"","white"===e.attributes.color?(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ht,{label:"Add border?",help:"Would you like to add border at the top to the proofpoint?",checked:e.attributes.border,onChange:()=>{e.attributes.border?e.setAttributes({border:!1}):e.setAttributes({border:!0})}}))):"","white"===e.attributes.color?(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Button Color",help:"Choose the CTA button color.",selected:e.attributes.buttonColor,options:[{label:"Black",value:"black"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({buttonColor:t})}}))):"",(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Highlighted Text Style",selected:e.attributes.headerfontStyle,options:[{label:"Wide",value:"wide"},{label:"Narrow",value:"narrow"}],onChange:t=>{e.setAttributes({headerfontStyle:t})}}))),(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Content Text Style",selected:e.attributes.contentfontStyle,options:[{label:"Wide",value:"wide"},{label:"Narrow",value:"narrow"}],onChange:t=>{e.setAttributes({contentfontStyle:t})}}))),(0,t.createElement)(Tt,null,(0,t.createElement)("h2",null,"Button Link setting"),(0,t.createElement)(At,null,(0,t.createElement)(Lt,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})),(0,t.createElement)(At,null,(0,t.createElement)(Lt,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})),(0,t.createElement)(At,null,(0,t.createElement)(Ht,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:`pu-proofpoint pu-proofpoint--editor${"black"===e.attributes.color?" pu-proofpoint__black":" pu-proofpoint__white"}${e.attributes.border?" pu-proofpoint__border":""}${e.attributes.boxshadow?"":" pu-proofpoint__no-shadow"}\n ${"full"===e.attributes.height?" pu-proofpoint__height":""}\n ${e.attributes.hasLead?" pu-proofpoint__has-lead":""}`},(0,t.createElement)("div",{className:"container"},e.attributes.hasLead?(0,t.createElement)(Ot,{tagName:"p",value:e.attributes.lead,className:"pu-proofpoint__lead",onChange:t=>{e.setAttributes({lead:t})},placeholder:"Add Lead text"}):"",(0,t.createElement)(Ot,{tagName:"p",value:e.attributes.highlighted,className:`pu-proofpoint__highlighted\n ${"wide"===e.attributes.headerfontStyle?" pu-proofpoint__highlighted-wide":" pu-proofpoint__highlighted-narrow"}\n `,onChange:t=>{e.setAttributes({highlighted:t})},placeholder:"Add Highlighted text"}),(0,t.createElement)(Ot,{tagName:"p",value:e.attributes.content,className:`pu-proofpoint__content\n ${"wide"===e.attributes.contentfontStyle?" pu-proofpoint__content-wide":" pu-proofpoint__content-narrow"}\n `,onChange:t=>{e.setAttributes({content:t})},placeholder:"Add content text"}),(0,t.createElement)(Ot,{tagName:"p",value:e.attributes.source,className:"pu-proofpoint__source",onChange:t=>{e.setAttributes({source:t})},placeholder:"Add Source of the Proofpoint"}),e.attributes.ctaUrl&&e.attributes.ctaText?"white"===e.attributes.color&&"white"===e.attributes.buttonColor?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button pu-proofpoint__button-white",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))],save:e=>{const a=Rt.save();return(0,t.createElement)("div",x({},a,{className:`pu-proofpoint${"black"===e.attributes.color?" pu-proofpoint__black":" pu-proofpoint__white"}${e.attributes.border?" pu-proofpoint__border":""}\n ${e.attributes.boxshadow?"":" pu-proofpoint__no-shadow"}\n ${"full"===e.attributes.height?" pu-proofpoint__height":""}\n ${e.attributes.hasLead?" pu-proofpoint__has-lead":""}\n `}),(0,t.createElement)("div",{className:"container"},e.attributes.lead&&e.attributes.hasLead?(0,t.createElement)(Ot.Content,{className:"pu-proofpoint__lead",tagName:"p",value:e.attributes.lead}):"",e.attributes.highlighted?(0,t.createElement)(Ot.Content,{tagName:"p",value:e.attributes.highlighted,className:`pu-proofpoint__highlighted\n ${"wide"===e.attributes.headerfontStyle?" pu-proofpoint__highlighted-wide":" pu-proofpoint__highlighted-narrow"}\n `}):"",e.attributes.content?(0,t.createElement)(Ot.Content,{className:`pu-proofpoint__content\n ${"wide"===e.attributes.contentfontStyle?" pu-proofpoint__content-wide":" pu-proofpoint__content-narrow"}\n `,tagName:"p",value:e.attributes.content}):"",e.attributes.source?(0,t.createElement)(Ot.Content,{className:"pu-proofpoint__source",tagName:"p",value:e.attributes.source}):"",e.attributes.ctaUrl&&e.attributes.ctaText?"white"===e.attributes.color&&"white"===e.attributes.buttonColor?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button pu-proofpoint__button-white",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))},deprecated:[{attributes:{color:{type:"string",default:"black"},border:{type:"boolean",default:!1},buttonColor:{type:"string",default:"black"},highlighted:{type:"string",default:""},headerfontStyle:{type:"string",default:"narrow"},contentfontStyle:{type:"string",default:"narrow"},content:{type:"string",default:""},source:{type:"string",default:""},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},height:{type:"string",default:"auto"}},save:e=>{const a=Rt.save();return(0,t.createElement)("div",x({},a,{className:`pu-proofpoint${"black"===e.attributes.color?" pu-proofpoint__black":" pu-proofpoint__white"}${e.attributes.border?" pu-proofpoint__border":""}\n ${"full"===e.attributes.height?" pu-proofpoint__height":""}`}),(0,t.createElement)("div",{className:"container"},e.attributes.highlighted?"wide"===e.attributes.headerfontStyle?(0,t.createElement)("p",{className:"pu-proofpoint__highlighted pu-proofpoint__highlighted-wide"},e.attributes.highlighted):(0,t.createElement)("p",{className:"pu-proofpoint__highlighted pu-proofpoint__highlighted-narrow"},e.attributes.highlighted):"",e.attributes.content?"wide"===e.attributes.contentfontStyle?(0,t.createElement)("p",{className:"pu-proofpoint__content pu-proofpoint__content-wide"},e.attributes.content):(0,t.createElement)("p",{className:"pu-proofpoint__content pu-proofpoint__content-narrow"},e.attributes.content):"",e.attributes.source?(0,t.createElement)("p",{className:"pu-proofpoint__source"},e.attributes.source):"",e.attributes.ctaUrl&&e.attributes.ctaText?"white"===e.attributes.color&&"white"===e.attributes.buttonColor?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button pu-proofpoint__button-white",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))}}]});const{__:Dt}=wp.i18n,{registerBlockType:Vt}=wp.blocks,{PanelBody:Gt,PanelRow:Ft,SelectControl:Zt}=wp.components,{InspectorControls:qt}=wp.blockEditor,{withSelect:zt}=wp.data;Vt("purdue-blocks/testimonial",{title:Dt("Testimonial"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 68.75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-d9ab28",d:"M84.38,34.38A34.21,34.21,0,0,1,75.87,57c-3.25,3.71-8.35,11.49-10.24,18H56.26v0a11,11,0,0,1,.43-2.79A61.73,61.73,0,0,1,68.82,50.81a25,25,0,1,0-37.64,0A61.7,61.7,0,0,1,43.33,72.23,9.49,9.49,0,0,1,43.74,75v0H34.37c-1.89-6.51-7-14.29-10.24-18A34.37,34.37,0,1,1,84.38,34.38ZM53.12,18.75A3.12,3.12,0,0,1,50,21.88a12.51,12.51,0,0,0-12.5,12.5,3.13,3.13,0,0,1-6.25,0A18.77,18.77,0,0,1,50,15.63,3.11,3.11,0,0,1,53.12,18.75ZM34.38,81.25H65.62v8.43a3.11,3.11,0,0,1-.52,1.73L60.3,98.6a3.1,3.1,0,0,1-2.6,1.4H42.3a3.1,3.1,0,0,1-2.6-1.4l-4.79-7.19a3.11,3.11,0,0,1-.52-1.73Z",transform:"translate(-15.62)"})))),category:"purdue-blocks",keywords:[],attributes:{posts:{type:"array",default:[]},selectedPosts:{type:"array",default:[]}},description:Dt("This block adds a row of one or two testimonials to your page. It pulls from testimonial posts from this site and requires the installation of acf-to-rest-api to work."),edit:zt((e=>({posts:wp.data.select("core").getEntityRecords("postType","test_post",{per_page:-1,_embed:!0})})))((e=>{const{posts:a}=e;if(!a)return(0,t.createElement)("div",{className:"pu-blocks-editor-testimonial"},(0,t.createElement)("p",{className:"error-message"},"loading.."));if(0===a.length)return(0,t.createElement)("div",{className:"pu-blocks-editor-testimonial"},(0,t.createElement)("p",{className:"error-message"},"No testimonial posts"));a.map((e=>{e.img=e._embedded["wp:featuredmedia"][0]})),e.setAttributes({posts:a});const l=[];for(let e=0;e{t.length<=2?e.setAttributes({selectedPosts:t}):e.setAttributes({selectedPosts:t.slice(0,2)})},options:l})))),(0,t.createElement)("div",{className:"pu-blocks-editor-testimonial"},(0,t.createElement)("div",{className:"testimonial__section container"},(0,t.createElement)("h2",null,"Testimonials"),(0,t.createElement)("div",{className:"testimonial__list columns"},e.attributes.posts.map((a=>{if(e.attributes.selectedPosts&&e.attributes.selectedPosts.length>0)return e.attributes.selectedPosts.map((l=>{if(a.id==l)return(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"testimonial__item"},2===e.attributes.selectedPosts.length?(0,t.createElement)("div",{className:"testimonial__body testimonial__body--small"},a.img?(0,t.createElement)("img",{src:a.img.source_url,alt:a.img.alt_text}):"",a.excerpt.raw?(0,t.createElement)("p",{className:"testimonial__content"},'"',a.excerpt.raw,'"'):(0,t.createElement)("p",{className:"testimonial__content"},'"',a.content.raw.replace(//g,"").replace(/(<([^>]+)>)/gi,""),'"'),(0,t.createElement)("p",{className:"testimonial__name"},a.acf.name),(0,t.createElement)("p",{className:"testimonial__info"},a.acf.persons_information)):(0,t.createElement)("div",{className:"testimonial__body testimonial__body--big"},a.img?(0,t.createElement)("img",{src:a.img.source_url,alt:a.img.alt_text}):"",a.excerpt.raw?(0,t.createElement)("p",{className:"testimonial__content"},'"',a.excerpt.raw,'"'):(0,t.createElement)("p",{className:"testimonial__content"},'"',a.content.raw.replace(//g,"").replace(/(<([^>]+)>)/gi,""),'"'),(0,t.createElement)("p",{className:"testimonial__name"},a.acf.name),(0,t.createElement)("p",{className:"testimonial__info"},a.acf.persons_information))))}))})))))]})),save:e=>{const a=e.attributes.posts;return(0,t.createElement)("div",{className:"pu-blocks-testimonial"},(0,t.createElement)("div",{className:"testimonial__section container"},(0,t.createElement)("h2",null,"Testimonials"),(0,t.createElement)("div",{className:"testimonial__list columns is-multiline"},a.map((a=>{if(e.attributes.selectedPosts&&e.attributes.selectedPosts.length>0)return e.attributes.selectedPosts.map((l=>{if(a.id==l)return 2===e.attributes.selectedPosts.length?(0,t.createElement)("div",{className:"column is-full-mobile is-full-tablet is-half-desktop"},(0,t.createElement)("div",{className:"testimonial__item"},(0,t.createElement)("div",{className:"testimonial__body testimonial__body--small"},a.img?(0,t.createElement)("img",{src:a.img.source_url,alt:a.img.alt_text}):"",a.excerpt.raw?(0,t.createElement)("p",{className:"testimonial__content"},a.excerpt.raw):(0,t.createElement)("p",{className:"testimonial__content"},a.content.raw.replace(//g,"").replace(/(<([^>]+)>)/gi,"")),(0,t.createElement)("p",{className:"testimonial__name"},a.acf.name),(0,t.createElement)("p",{className:"testimonial__info"},a.acf.persons_information)))):(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"testimonial__item testimonial--big"},(0,t.createElement)("div",{className:"testimonial__body testimonial__body--big"},a.img?(0,t.createElement)("img",{src:a.img.source_url,alt:a.img.alt_text}):"",a.excerpt.raw?(0,t.createElement)("p",{className:"testimonial__content"},a.excerpt.raw):(0,t.createElement)("p",{className:"testimonial__content"},a.content.raw.replace(//g,"").replace(/(<([^>]+)>)/gi,"")),(0,t.createElement)("p",{className:"testimonial__name"},a.acf.name),(0,t.createElement)("p",{className:"testimonial__info"},a.acf.persons_information))))}))})))))}});const{__:jt}=wp.i18n,{registerBlockType:Wt}=wp.blocks,{PanelBody:Yt,PanelRow:Xt,CheckboxControl:Kt,Button:Qt}=wp.components,{InspectorControls:Jt,MediaUploadCheck:ea,MediaUpload:ta,InnerBlocks:aa,useBlockProps:la}=wp.blockEditor,ra=[["core/paragraph",{placeholder:"Body content copy"}]];Wt("purdue-blocks/image-showcase",{title:jt("Image Showcase"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 68.75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",d:"M84.38,34.38A34.21,34.21,0,0,1,75.87,57c-3.25,3.71-8.35,11.49-10.24,18H56.26v0a11,11,0,0,1,.43-2.79A61.73,61.73,0,0,1,68.82,50.81a25,25,0,1,0-37.64,0A61.7,61.7,0,0,1,43.33,72.23,9.49,9.49,0,0,1,43.74,75v0H34.37c-1.89-6.51-7-14.29-10.24-18A34.37,34.37,0,1,1,84.38,34.38ZM53.12,18.75A3.12,3.12,0,0,1,50,21.88a12.51,12.51,0,0,0-12.5,12.5,3.13,3.13,0,0,1-6.25,0A18.77,18.77,0,0,1,50,15.63,3.11,3.11,0,0,1,53.12,18.75ZM34.38,81.25H65.62v8.43a3.11,3.11,0,0,1-.52,1.73L60.3,98.6a3.1,3.1,0,0,1-2.6,1.4H42.3a3.1,3.1,0,0,1-2.6-1.4l-4.79-7.19a3.11,3.11,0,0,1-.52-1.73Z",transform:"translate(-15.62)"})))),category:"purdue-blocks",keywords:[],attributes:{images:{type:"array",default:[]},includeCopy:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:jt("Add this block and select three square images to showcase in a row."),edit:e=>{const a=()=>{e.setAttributes({images:""})};return[(0,t.createElement)(Jt,null,(0,t.createElement)(Yt,null,(0,t.createElement)(Xt,null,(0,t.createElement)(Kt,{label:"Include Body Content?",checked:e.attributes.includeCopy,onChange:()=>e.setAttributes({includeCopy:!e.attributes.includeCopy})})))),(0,t.createElement)("div",{className:"editor-image-showcase"},(0,t.createElement)(ea,null,(0,t.createElement)(ta,{multiple:!0,gallery:!0,onSelect:t=>{e.setAttributes({images:t})},render:l=>{let{open:r}=l;return 3===e.attributes.images.length?(0,t.createElement)("div",{className:"editor-image-showcase__preview"},(0,t.createElement)("div",{className:"editor-image-showcase__imgGroup"},e.attributes.images.map((e=>(0,t.createElement)("figure",{className:"image is-128x128"},(0,t.createElement)("img",{alt:"",src:e.url}))))),(0,t.createElement)(Qt,{className:"editor-image-showcase__button",onClick:r},"Select New Images"),(0,t.createElement)(Qt,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove images")):(0,t.createElement)("div",{className:"editor-image-showcase__container"},(0,t.createElement)("span",{className:"editor-image-showcase__heading"},(0,t.createElement)("span",{className:"dashicons dashicons-format-image"}),(0,t.createElement)("span",null,"Image Showcase")),(0,t.createElement)("p",{className:"editor-image-showcase__description"},"Pick three image from the media library."),(0,t.createElement)(Qt,{className:"editor-image-showcase__button",onClick:r},"Open Media Library"))}})),e.attributes.includeCopy?(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)(aa,{template:ra,allowedBlocks:["core/paragraph","core/list"]}))):"")]},save:e=>{const a=la.save();return(0,t.createElement)("section",x({},a,{className:"section pu-image-showcase"}),(0,t.createElement)("div",{className:"columns is-centered has-decoration is-mobile"},e.attributes.images?e.attributes.images.map((e=>(0,t.createElement)("div",{className:"column is-2-fullhd is-2-widescreen is-4-desktop is-4-tablet is-4-mobile"},(0,t.createElement)("figure",{className:"image is-square"},(0,t.createElement)("img",{alt:e.alt,src:e.url}))))):""),e.attributes.includeCopy?(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns is-centered is-mobile"},(0,t.createElement)("div",{className:"column is-8"},(0,t.createElement)(aa.Content,null)))):"")}});var na=window.wp.blocks;const{__:sa}=wp.i18n,{registerBlockType:oa}=wp.blocks,{PanelBody:ia,PanelRow:ca,RangeControl:ua,CheckboxControl:da,TextControl:ma}=wp.components,{InnerBlocks:ba,InspectorControls:pa,RichText:ha,useBlockProps:ga}=wp.blockEditor;oa("purdue-blocks/title-nav",{title:sa("Titled Navigation"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],attributes:{hasOutline:{type:"boolean",default:!1},addButton:{type:"boolean",default:!1},numLinks:{type:"number",default:1},titleText:{source:"html",selector:"h2"},buttonText:{type:"string",default:""},buttonLink:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:sa("Add this block and select navigation items to build a menu that will show above the title of the page."),edit:e=>(1===e.attributes.numLinks&&va(e,1,1),[(0,t.createElement)(pa,null,(0,t.createElement)(ia,null,(0,t.createElement)(ca,null,(0,t.createElement)(ua,{className:"bulma-columns-range-control",label:"Number of Navigation Items",value:e.attributes.numLinks,min:1,max:15,onChange:t=>{va(e,e.attributes.numLinks,t),e.setAttributes({numLinks:t})}})),(0,t.createElement)(ca,null,(0,t.createElement)(da,{label:"Give Menu Items an Outline?",checked:e.attributes.hasOutline,onChange:t=>e.setAttributes({hasOutline:t})})),(0,t.createElement)(ca,null,(0,t.createElement)(da,{label:"Add a CTA Button?",checked:e.attributes.addButton,onChange:t=>e.setAttributes({addButton:t})})),e.attributes.addButton?(0,t.createElement)(ia,{title:"Button Controls"},(0,t.createElement)(ca,null,(0,t.createElement)(ma,{label:"Button Text",value:e.attributes.buttonText,onChange:t=>e.setAttributes({buttonText:t})})),(0,t.createElement)(ca,null,(0,t.createElement)(ma,{label:"Button Link",value:e.attributes.buttonLink,onChange:t=>e.setAttributes({buttonLink:t})}))):"")),(0,t.createElement)("div",{className:"editor-title-nav "+(e.attributes.hasOutline?"outline-on":"")},(0,t.createElement)(ha,{tagName:"h2",value:e.attributes.titleText,className:"editor-title-nav__title",onChange:t=>{e.setAttributes({titleText:t})},placeholder:"Nav Title (Optional)",keepPlaceholderOnFocus:!0}),(0,t.createElement)(ba,{templateLock:"all"}))]),save:e=>{const a=ga.save();return e.attributes.addButton?(0,t.createElement)("section",x({},a,{className:"section pu-title-nav "+(e.attributes.hasOutline?"has-outline":"")}),(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column is-8 pu-title-nav__left"},(0,t.createElement)(ha.Content,{className:"pu-title-nav__title",tagName:"h2",value:e.attributes.titleText}),(0,t.createElement)("ul",{className:"pu-title-nav__menu"},(0,t.createElement)(ba.Content,null))),(0,t.createElement)("div",{className:"column is-3 is-offset-1 pu-title-nav__right"},(0,t.createElement)("a",{className:"pu-title-nav__cta",href:e.attributes.buttonLink}," ",e.attributes.buttonText," ")))):(0,t.createElement)("section",x({},a,{className:"section pu-title-nav "+(e.attributes.hasOutline?"has-outline":"")}),(0,t.createElement)(ha.Content,{className:"pu-title-nav__title",tagName:"h2",value:e.attributes.titleText}),(0,t.createElement)("ul",{className:"pu-title-nav__menu"},(0,t.createElement)(ba.Content,null)))}});const va=(e,t,a)=>{let l=wp.data.select("core/block-editor").getBlock(e.clientId).innerBlocks;const r=a>t,n=0===a;if(1===t&&t===a)l=[(0,na.createBlock)("purdue-blocks/title-nav-link")],wp.data.dispatch("core/block-editor").replaceInnerBlocks(e.clientId,l,!1);else if(r&&!n){const r=a-t;for(let e=0;e[(0,t.createElement)(xa,null,(0,t.createElement)(ka,null,(0,t.createElement)(ya,null,(0,t.createElement)(wa,{label:"Is this the current page?",checked:e.attributes.isCurrent,onChange:t=>e.setAttributes({isCurrent:t})})))),(0,t.createElement)("div",{className:"editor-title-nav-link"},(0,t.createElement)(_a,{tagName:"li",value:e.attributes.linkText,className:"editor-title-nav-link__input "+(e.attributes.isCurrent?"isCurrent":""),onChange:t=>{e.setAttributes({linkText:t})}}))],save:e=>(0,t.createElement)(_a.Content,{className:e.attributes.isCurrent?"isCurrent":"",tagName:"li",value:e.attributes.linkText})});const{__:Ca}=wp.i18n,{registerBlockType:Na}=wp.blocks,{PanelBody:Ta,PanelRow:Aa,CheckboxControl:La,TextareaControl:Sa,TextControl:Ba,RadioControl:Ha,Button:Ua}=wp.components,{RichText:Ia,InspectorControls:Pa,MediaUploadCheck:Ma,MediaUpload:$a,useBlockProps:Ra}=wp.blockEditor;Na("purdue-blocks/card",{title:Ca("Custom Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"clone",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-d9ab28",d:"M100,9.38V71.87a9.38,9.38,0,0,1-9.37,9.38H81.25v9.37A9.38,9.38,0,0,1,71.87,100H9.37A9.38,9.38,0,0,1,0,90.62V28.13a9.38,9.38,0,0,1,9.37-9.38h9.38V9.38A9.38,9.38,0,0,1,28.12,0H90.63A9.38,9.38,0,0,1,100,9.38ZM71.87,89.45v-8.2H28.12a9.38,9.38,0,0,1-9.37-9.38V28.13h-8.2A1.17,1.17,0,0,0,9.37,29.3V89.45a1.17,1.17,0,0,0,1.18,1.17H70.7A1.17,1.17,0,0,0,71.87,89.45ZM90.63,70.7V10.55a1.17,1.17,0,0,0-1.18-1.17H29.3a1.17,1.17,0,0,0-1.18,1.17V70.7a1.17,1.17,0,0,0,1.18,1.17H89.45A1.17,1.17,0,0,0,90.63,70.7Z",transform:"translate(0 0)"})))),category:"purdue-blocks",keywords:[],attributes:{hasLink:{type:"boolean",default:!1},title:{type:"string",source:"html",selector:"p.title"},subText:{type:"string",source:"html",selector:"p.content"},link:{type:"string",default:""},linkText:{type:"string",default:""},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1},backgroundColor:{type:"string",default:"white"},borderColor:{type:"string",default:"gold"}},supports:{className:!1,anchor:!0},description:Ca("Create a card with an image and text. You can choose to add a link and a call to action button to the card."),edit:e=>[(0,t.createElement)(Pa,null,(0,t.createElement)(Ta,null,(0,t.createElement)(Aa,null,(0,t.createElement)(Ha,{label:"Background Color",help:"Choose the background color of the card.",selected:e.attributes.backgroundColor,options:[{label:"Gold",value:"gold"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({backgroundColor:t})}})),(0,t.createElement)(Aa,null,(0,t.createElement)(Ha,{label:"Border Color",help:"Choose the border color of the card.",selected:e.attributes.borderColor,options:[{label:"Gold",value:"gold"},{label:"Black",value:"black"}],onChange:t=>{e.setAttributes({borderColor:t})}})),e.attributes.imgUrl?(0,t.createElement)(Aa,null,(0,t.createElement)(Sa,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})):"",e.attributes.imgUrl?(0,t.createElement)(Aa,null,(0,t.createElement)(Ua,{className:"remove-image-button",onClick:()=>{e.setAttributes({imgUrl:""})}},"Remove image")):"",(0,t.createElement)(Aa,null,(0,t.createElement)(La,{label:"Add a link to this card?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(Aa,null,(0,t.createElement)(Ba,{label:"Call to action text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",e.attributes.hasLink?(0,t.createElement)(Aa,null,(0,t.createElement)(Ba,{label:"Link address",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})):"",e.attributes.hasLink?(0,t.createElement)(Aa,null,(0,t.createElement)(La,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"")),(0,t.createElement)("div",{className:`box square-card${"gold"===e.attributes.backgroundColor?" background-gold":""}${"black"===e.attributes.borderColor?" border-black":""}`},(0,t.createElement)(Ma,null,(0,t.createElement)($a,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{className:"image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)(Ua,{onClick:l},""!==e.attributes.imgUrl?"Select a new image":"Select an image (optional)"))}})),(0,t.createElement)("div",{className:"title"},(0,t.createElement)(Ia,{tagName:"p",value:e.attributes.title,className:"title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title (Optional)",keepPlaceholderOnFocus:!0,allowedFormats:[]})),(0,t.createElement)("div",{className:"content"},(0,t.createElement)(Ia,{tagName:"p",value:e.attributes.subText,className:"content",onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Text (Optional)",allowedFormats:[]}),e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.linkText)):""))],save:e=>{const a=Ra.save();return!0===e.attributes.hasLink?(0,t.createElement)("a",x({},a,{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",className:`square-card${"gold"===e.attributes.backgroundColor?" background-gold":""}${"black"===e.attributes.borderColor?" border-black":""}`,rel:"noopener noreferrer"}),e.attributes.imgUrl?(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText})):"",e.attributes.title?(0,t.createElement)(Ia.Content,{className:"title",tagName:"p",value:e.attributes.title}):"",e.attributes.subText?(0,t.createElement)(Ia.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"",e.attributes.linkText?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.linkText)):""):(0,t.createElement)("div",x({},a,{className:`square-card${"gold"===e.attributes.backgroundColor?" background-gold":""}${"black"===e.attributes.borderColor?" border-black":""}`}),e.attributes.imgUrl?(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText})):"",e.attributes.title?(0,t.createElement)(Ia.Content,{className:"title",tagName:"p",value:e.attributes.title}):"",e.attributes.subText?(0,t.createElement)(Ia.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"")}});const{__:Oa}=wp.i18n,{registerBlockType:Da}=wp.blocks,{PanelBody:Va,PanelRow:Ga,CheckboxControl:Fa,TextareaControl:Za,TextControl:qa,RadioControl:za,SelectControl:ja,Button:Wa}=wp.components,{RichText:Ya,InspectorControls:Xa,InnerBlocks:Ka}=wp.blockEditor,Qa=[["core/paragraph",{placeholder:"Add content"}]];Da("purdue-blocks/accordion",{title:Oa("Accordion"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43.01 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Arrows-alt-v",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M70.12,81.82,53.31,98.63a4.68,4.68,0,0,1-6.62,0L29.88,81.82a4.68,4.68,0,0,1,3.31-8h9V26.18h-9a4.68,4.68,0,0,1-3.31-8L46.69,1.37a4.68,4.68,0,0,1,6.62,0L70.12,18.18a4.68,4.68,0,0,1-3.31,8h-9V73.82h9A4.68,4.68,0,0,1,70.12,81.82Z",transform:"translate(-28.49)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".accordion-title"},titleLevel:{type:"string",default:"p"},id:{type:"string",default:""},inputId:{type:"string",default:""}},supports:{className:!1},description:Oa("Create a single accordion."),edit:e=>{const a=e.clientId;return e.setAttributes({id:a}),[(0,t.createElement)(Xa,null,(0,t.createElement)(Va,null,(0,t.createElement)(Ga,null,(0,t.createElement)(ja,{label:"Heading level of the title",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(Ga,null,(0,t.createElement)(qa,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.inputId,onChange:t=>e.setAttributes({inputId:t})})))),(0,t.createElement)("div",{className:"accordion-editor"},(0,t.createElement)(Ya,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:"accordion-title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)("div",{className:"accordion-content"},(0,t.createElement)(Ka,{template:Qa,templateLock:!1})))]},save:e=>e.attributes.inputId?(0,t.createElement)("div",{className:"accordion",id:e.attributes.inputId},(0,t.createElement)(Ya.Content,{id:`title-${e.attributes.id}`,className:"accordion-title",tagName:e.attributes.titleLevel,value:e.attributes.title,"aria-controls":`content-${e.attributes.id}`,"aria-expanded":"false",role:"button"}),(0,t.createElement)("div",{id:`content-${e.attributes.id}`,className:"accordion-content"},(0,t.createElement)(Ka.Content,null))):(0,t.createElement)("div",{className:"accordion"},(0,t.createElement)(Ya.Content,{id:`title-${e.attributes.id}`,className:"accordion-title",tagName:e.attributes.titleLevel,value:e.attributes.title,"aria-controls":`content-${e.attributes.id}`,"aria-expanded":"false",role:"button"}),(0,t.createElement)("div",{id:`content-${e.attributes.id}`,className:"accordion-content"},(0,t.createElement)(Ka.Content,null)))});const{__:Ja}=wp.i18n,{registerBlockType:el}=wp.blocks,{PanelBody:tl,PanelRow:al,CheckboxControl:ll,TextareaControl:rl,TextControl:nl,RadioControl:sl,SelectControl:ol,Button:il}=wp.components,{RichText:cl,InspectorControls:ul,MediaUploadCheck:dl,MediaUpload:ml,InnerBlocks:bl,useBlockProps:pl}=wp.blockEditor,hl=[["core/paragraph",{placeholder:"Add content"}]];el("purdue-blocks/cta-card",{title:Ja("CTA Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"clone",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M100,9.38V71.87a9.38,9.38,0,0,1-9.37,9.38H81.25v9.37A9.38,9.38,0,0,1,71.87,100H9.37A9.38,9.38,0,0,1,0,90.62V28.13a9.38,9.38,0,0,1,9.37-9.38h9.38V9.38A9.38,9.38,0,0,1,28.12,0H90.63A9.38,9.38,0,0,1,100,9.38ZM71.87,89.45v-8.2H28.12a9.38,9.38,0,0,1-9.37-9.38V28.13h-8.2A1.17,1.17,0,0,0,9.37,29.3V89.45a1.17,1.17,0,0,0,1.18,1.17H70.7A1.17,1.17,0,0,0,71.87,89.45ZM90.63,70.7V10.55a1.17,1.17,0,0,0-1.18-1.17H29.3a1.17,1.17,0,0,0-1.18,1.17V70.7a1.17,1.17,0,0,0,1.18,1.17H89.45A1.17,1.17,0,0,0,90.63,70.7Z",transform:"translate(0 0)"})))),category:"purdue-blocks",keywords:[],attributes:{layout:{type:"string",default:"horizontal"},cardType:{type:"string",default:"small"},title:{type:"string",source:"html",selector:".title"},titleLevel:{type:"string",default:"p"},subText:{type:"string",source:"html",selector:"p.content"},hasLink:{type:"boolean",default:!1},link:{type:"string",default:""},linkText:{type:"string",default:""},imgLocation:{type:"string",default:"left"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1},height:{type:"string",default:"100"},headerColor:{type:"string",default:"black"},titleAlign:{type:"string",default:"left"},contentAlign:{type:"string",default:"left"},imageRatio:{type:"string",default:"3by2"}},supports:{className:!1,anchor:!0},description:Ja("Create a call-to-action card with an image and text. The link to the card is optional."),edit:e=>[(0,t.createElement)(ul,null,(0,t.createElement)(tl,null,(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Card layout",help:"Choose to align the elements vertically or horizontally",selected:e.attributes.layout,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:t=>{e.setAttributes({layout:t})}})),"horizontal"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Card type",help:"Choose Large if there will be a lot of text or lists on the card. Otherwise choose Small.",selected:e.attributes.cardType,options:[{label:"Large",value:"large"},{label:"Small",value:"small"}],onChange:t=>{e.setAttributes({cardType:t})}})):"",(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Height of the card",help:"100%: the height of the card will be 100% height of its parent container; Auto: the height of the card will depend upon the height of its children.",selected:e.attributes.height,options:[{label:"100%",value:"100"},{label:"Auto",value:"auto"}],onChange:t=>{e.setAttributes({height:t})}})),(0,t.createElement)(al,null,(0,t.createElement)(ol,{label:"Heading level of the title",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(al,null,(0,t.createElement)(ol,{label:"Color the title",value:e.attributes.headerColor,options:[{label:"Black",value:"black"},{label:"Digital Gold",value:"gold"},{label:"Steel",value:"steel"}],onChange:t=>{e.setAttributes({headerColor:t})}})),"vertical"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Align the title",selected:e.attributes.titleAlign,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({titleAlign:t})}})):"","vertical"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Align the content",help:"This is for the optional content under the title.",selected:e.attributes.contentAlign,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({contentAlign:t})}})):"","vertical"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Image Aspect Ratio",help:"Image aspect ratio of width by height.",selected:e.attributes.imageRatio,options:[{label:"3 by 2",value:"3by2"},{label:"1 by 1",value:"1by1"}],onChange:t=>{e.setAttributes({imageRatio:t})}})):"","horizontal"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Align image",help:"Choose to place the image to the left or right.",selected:e.attributes.imgLocation,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({imgLocation:t})}})):"",(0,t.createElement)(al,null,(0,t.createElement)(rl,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),e.attributes.imgUrl?(0,t.createElement)(al,null,(0,t.createElement)(il,{className:"remove-image-button",onClick:()=>{e.setAttributes({imgUrl:""})}},"Remove image")):"","small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(ll,{label:"Add a CTA link to this card?",help:"Note you can only add this link when there are no links in the content of the card. Otherwise it'll cause error. ",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})):"",("small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout)&&e.attributes.hasLink?(0,t.createElement)(al,null,(0,t.createElement)(nl,{label:"Call to action text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",("small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout)&&e.attributes.hasLink?(0,t.createElement)(al,null,(0,t.createElement)(nl,{label:"Link address",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})):"",("small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout)&&e.attributes.hasLink?(0,t.createElement)(al,null,(0,t.createElement)(ll,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"")),(0,t.createElement)("div",{className:`cta-card-editor${"horizontal"===e.attributes.layout?" cta-card-horizonal":" cta-card-vertical"}\n ${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" cta-card-small":""}\n ${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" cta-card-large":""}\n ${"left"===e.attributes.imgLocation&&"horizontal"===e.attributes.layout?" cta-card-left":""}\n ${"right"===e.attributes.imgLocation&&"horizontal"===e.attributes.layout?" cta-card-right":""}\n ${"1by1"===e.attributes.imageRatio&&"vertical"===e.attributes.layout?" cta-card-1by1":""}\n ${"auto"===e.attributes.height?" cta-card--height-auto":""}\n `},(0,t.createElement)("div",{className:"columns is-multiline"},(0,t.createElement)("div",{className:`column\n ${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-two-fifths-desktop is-two-fifths-tablet is-full-mobile":""}\n ${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-one-third-desktop is-one-third-tablet is-full-mobile":""}\n ${"vertical"===e.attributes.layout?" cta-card-vertical__image":""}\n `},(0,t.createElement)(dl,null,(0,t.createElement)(ml,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{className:"image is-3by2",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("button",{onClick:l},""!==e.attributes.imgUrl?"Select a new image":"Select an image"))}}))),(0,t.createElement)("div",{className:`column\n ${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-three-fifths-desktop is-three-fifths-tablet is-full-mobile":""}\n ${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-two-third-desktop is-two-third-tablet is-full-mobile":""}\n `},(0,t.createElement)("div",{className:`title${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}`},(0,t.createElement)(cl,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:`title\n ${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}\n ${"center"===e.attributes.titleAlign&&"vertical"===e.attributes.layout?" header-centered":""}\n `,onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title (Optional)",keepPlaceholderOnFocus:!0})),(0,t.createElement)("div",{className:"content"},"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout?(0,t.createElement)(cl,{tagName:"p",value:e.attributes.subText,className:"content"+("center"===e.attributes.contentAlign?" content-centered":""),onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Text (Optional)"}):""),"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout?(0,t.createElement)(bl,{template:hl,templateLock:!1}):"","small"===e.attributes.cardType&&"horizontal"===e.attributes.layout&&e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.linkText)):"","vertical"===e.attributes.layout&&e.attributes.hasLink?(0,t.createElement)("div",{className:"purdue-blocks__button purdue-blocks__button--gold-light"},(0,t.createElement)("span",null,e.attributes.linkText)):"")))],save:e=>{const a=pl.save();return(0,t.createElement)("div",x({},a,{className:`${"horizontal"===e.attributes.layout?"cta-card-horizonal":"cta-card-vertical"}${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" cta-card-small":""}${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" cta-card-large":""}${"left"===e.attributes.imgLocation&&"horizontal"===e.attributes.layout?" cta-card-left":""}${"right"===e.attributes.imgLocation&&"horizontal"===e.attributes.layout?" cta-card-right":""} ${"1by1"===e.attributes.imageRatio&&"vertical"===e.attributes.layout?" cta-card-1by1":""}${"auto"===e.attributes.height?" cta-card--height-auto":""}`}),(0,t.createElement)("div",{className:"columns is-multiline"},(0,t.createElement)("div",{className:`column${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-two-fifths-desktop is-two-fifths-tablet is-full-mobile":""}${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-one-third-desktop is-one-third-tablet is-full-mobile":""}${"vertical"===e.attributes.layout?" cta-card-vertical__image":""}`},(0,t.createElement)("figure",{className:"image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))),(0,t.createElement)("div",{className:`column${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-three-fifths-desktop is-three-fifths-tablet is-full-mobile":""}${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-two-third-desktop is-two-third-tablet is-full-mobile":""}`},e.attributes.title?(0,t.createElement)(cl.Content,{className:`title${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}${"center"===e.attributes.titleAlign&&"vertical"===e.attributes.layout?" header-centered":""}\n `,tagName:e.attributes.titleLevel,value:e.attributes.title}):"",("small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout)&&e.attributes.subText?(0,t.createElement)(cl.Content,{className:"content"+("center"===e.attributes.contentAlign?" content-centered":""),tagName:"p",value:e.attributes.subText}):"","small"===e.attributes.cardType&&"horizontal"===e.attributes.layout&&!0===e.attributes.hasLink&&e.attributes.linkText?(0,t.createElement)("a",{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",className:"read-more-button",rel:"noopener noreferrer"},(0,t.createElement)("span",null,e.attributes.linkText)):"","large"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout?(0,t.createElement)(bl.Content,null):"","vertical"===e.attributes.layout&&e.attributes.hasLink?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-light",href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText):"")))},deprecated:[{attributes:{cardType:{type:"string",default:"small"},title:{type:"string",source:"html",selector:".title"},titleLevel:{type:"string",default:"p"},subText:{type:"string",source:"html",selector:"p.content"},hasLink:{type:"boolean",default:!1},link:{type:"string",default:""},linkText:{type:"string",default:""},imgLocation:{type:"string",default:"left"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1},height:{type:"string",default:"100"},headerColor:{type:"string",default:"black"}},save:e=>"small"===e.attributes.cardType&&!0===e.attributes.hasLink?(0,t.createElement)("a",{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",className:`cta-card-horizonal${"small"===e.attributes.cardType?" cta-card-small":" cta-card-large"}${"left"===e.attributes.imgLocation?" cta-card-left":" cta-card-right"}${"auto"===e.attributes.height?" cta-card--height-auto":""}`,rel:"noopener noreferrer"},(0,t.createElement)("div",{className:"columns is-multiline"},(0,t.createElement)("div",{className:"column"+("small"===e.attributes.cardType?" is-two-fifths-desktop is-two-fifths-tablet is-full-mobile":" is-one-third-desktop is-one-third-tablet is-full-mobile")},(0,t.createElement)("figure",{className:"image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))),(0,t.createElement)("div",{className:"column"+("small"===e.attributes.cardType?" is-three-fifths-desktop is-three-fifths-tablet is-full-mobile":" is-two-thirds-desktop is-two-thirds-tablet is-full-mobile")},e.attributes.title?(0,t.createElement)(cl.Content,{className:`title${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}`,tagName:e.attributes.titleLevel,value:e.attributes.title}):"","small"===e.attributes.cardType&&e.attributes.subText?(0,t.createElement)(cl.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"","large"===e.attributes.cardType?(0,t.createElement)(bl.Content,null):"",e.attributes.linkText?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.linkText)):""))):(0,t.createElement)("div",{className:` cta-card-horizonal${"small"===e.attributes.cardType?" cta-card-small":" cta-card-large"}${"left"===e.attributes.imgLocation?" cta-card-left":" cta-card-right"}${"auto"===e.attributes.height?" cta-card--height-auto":""}`},(0,t.createElement)("div",{className:"columns is-multiline"},(0,t.createElement)("div",{className:"column"+("small"===e.attributes.cardType?" is-two-fifths-desktop is-two-fifths-tablet is-full-mobile":" is-one-third-desktop is-one-third-tablet is-full-mobile")},(0,t.createElement)("figure",{className:"image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))),(0,t.createElement)("div",{className:"column"+("small"===e.attributes.cardType?" is-three-fifths-desktop is-three-fifths-tablet is-full-mobile":" is-two-thirds-desktop is-two-thirds-tablet is-full-mobile")},e.attributes.title?(0,t.createElement)(cl.Content,{className:`title${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}`,tagName:e.attributes.titleLevel,value:e.attributes.title}):"","small"===e.attributes.cardType&&e.attributes.subText?(0,t.createElement)(cl.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"","large"===e.attributes.cardType?(0,t.createElement)(bl.Content,null):"")))}]});var gl=window.wp.primitives,vl=(0,t.createElement)(gl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(gl.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{__:El}=wp.i18n,{registerBlockType:fl}=wp.blocks,{PanelBody:kl,PanelRow:yl,CheckboxControl:wl,TextareaControl:_l,TextControl:xl,RadioControl:Cl,SelectControl:Nl,Button:Tl,ToolbarGroup:Al}=wp.components,{RichText:Ll,InspectorControls:Sl,MediaUploadCheck:Bl,MediaUpload:Hl,InnerBlocks:Ul,BlockControls:Il}=wp.blockEditor,{apiFetch:Pl}=wp,{useState:Ml}=wp.element;function $l(e){return(0,t.createElement)("div",{className:"card feed-item"},(0,t.createElement)("a",{href:e.link},e.imgURL&&""!==e.imgURL?(0,t.createElement)("div",{className:"card-bg-image image is-2by1",role:"img",style:{backgroundImage:`url(${e.imgURL})`},"aria-label":e.imgALT}):"",(0,t.createElement)("div",{className:"card-content"},(0,t.createElement)("div",{className:"media"},(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("p",{className:"title is-4"},e.title))),(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,"Read More")))))}function Rl(e){return(0,t.createElement)("a",{className:"meida feed-item-noimage",href:e.link},(0,t.createElement)("div",{className:"media-left"},(0,t.createElement)("p",{className:"month"},e.month),(0,t.createElement)("p",{className:"day"},e.day)),(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("p",{className:"title"},e.title),(0,t.createElement)("p",{className:"desc"},e.text))))}function Ol(e){return(0,t.createElement)("div",{className:"card feed-item"},(0,t.createElement)("a",{href:e.link},e.imgURL&&""!==e.imgURL?(0,t.createElement)("div",{className:"card-bg-image image is-2by1",role:"img",style:{backgroundImage:`url(${e.imgURL})`},"aria-label":e.imgALT}):"",(0,t.createElement)("div",{className:"card-content"},(0,t.createElement)("div",{className:"media"},(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("p",{className:"subtitle"},e.date),(0,t.createElement)("p",{className:"title is-4"},e.title))),(0,t.createElement)("div",{className:"content-text"},e.text),(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,"Read More")))))}fl("purdue-blocks/purdue-rss",{title:El("Purdue RSS feed"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 66.67"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"newspaper",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M100,21.83V80.16a4.17,4.17,0,0,1-4.17,4.17H9.72A9.73,9.73,0,0,1,0,74.6V27.38a4.17,4.17,0,0,1,4.17-4.17h7.42a8.34,8.34,0,0,1,7.85-5.55H95.83A4.17,4.17,0,0,1,100,21.83ZM9.72,76a1.39,1.39,0,0,0,1.39-1.39v-43H8.33V74.6A1.39,1.39,0,0,0,9.72,76Zm82-50H19.44V74.6a9.1,9.1,0,0,1-.1,1.39H91.67ZM27.78,53.08V36.41a2.08,2.08,0,0,1,2.08-2.08H53.47a2.08,2.08,0,0,1,2.08,2.08V53.08a2.08,2.08,0,0,1-2.08,2.08H29.86A2.08,2.08,0,0,1,27.78,53.08Zm0,8.33a2.08,2.08,0,0,1,2.08-2.08H53.47a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H29.86a2.08,2.08,0,0,1-2.08-2.08Zm6.94-13.2H48.61V41.27H34.72Zm26.39-11.8a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Zm0,12.5a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Zm0,12.5a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Z",transform:"translate(0 -17.66)"})))),category:"purdue-blocks",keywords:[],attributes:{type:{type:"string",default:"withImage"},feedURL:{type:"string",default:""},title:{type:"string",source:"html",selector:".feed-header"},titleLevel:{type:"string",default:"p"},hasLink:{type:"boolean",default:!1},link:{type:"string",default:""},linkText:{type:"string",default:""},imgLocation:{type:"string",default:"left"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1},data:[],error:{type:"string",default:"Loading..."}},supports:{className:!1},description:El('Display entries from RSS feed. Entries will not update automatically. Please use "Purdue News" block instead.'),edit:e=>{const a=e.attributes.data&&e.attributes.data.length>0?e.attributes.data.slice(0,3).map((e=>(0,t.createElement)("div",{key:e.id,className:"column is-one-third-desktop is-one-third-tablet is-full-mobile"},$l(e)))):"",l=e.attributes.data&&e.attributes.data.length>0?[...e.attributes.data].slice(0,4).map((e=>(0,t.createElement)("div",{key:e.id,class:"feed-item-noimage"},Rl(e)))):"",r=e.attributes.data&&e.attributes.data.length>0?[...e.attributes.data].map((e=>(0,t.createElement)("div",{key:e.id,className:"column is-one-third-desktop is-half-tablet is-full-mobile"},Ol(e)))):"",[n,s]=Ml(!e.attributes.feedURL),o=[{icon:vl,title:El("Edit RSS URL"),onClick:()=>s(!0)}];return[(0,t.createElement)(Il,null,(0,t.createElement)(Al,{controls:o})),(0,t.createElement)(Sl,null,(0,t.createElement)(kl,null,(0,t.createElement)(yl,null,(0,t.createElement)(Cl,{label:"Layout of the RSS feed",selected:e.attributes.type,options:[{label:"Recent news with image",value:"withImage"},{label:"Recent news without image",value:"withoutImage"},{label:"All News/Events",value:"all"}],onChange:t=>{e.setAttributes({type:t})}})),(0,t.createElement)(yl,null,(0,t.createElement)(Nl,{label:"Heading level of the Header",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),e.attributes.imgUrl?(0,t.createElement)(yl,null,(0,t.createElement)(_l,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})):"",e.attributes.imgUrl?(0,t.createElement)(yl,null,(0,t.createElement)(Tl,{className:"remove-image-button",onClick:()=>{e.setAttributes({imgUrl:""})}},"Remove image")):"",(0,t.createElement)(yl,null,(0,t.createElement)(wl,{label:"Add a link to the news/events page?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(yl,null,(0,t.createElement)(xl,{label:"Link text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",e.attributes.hasLink?(0,t.createElement)(yl,null,(0,t.createElement)(xl,{label:"Link URL",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})):"",e.attributes.hasLink?(0,t.createElement)(yl,null,(0,t.createElement)(wl,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"")),(0,t.createElement)("div",null,n?(0,t.createElement)("div",{className:"news-feed-editor"},(0,t.createElement)("p",null,'Enter feed URL in the box and then click "Use URL" to retrive the feed'),(0,t.createElement)("form",{onSubmit:t=>{t.preventDefault(),e.attributes.feedURL&&s(!1),Pl({path:"/purduerssfeed/v2/getFeed/?url="+e.attributes.feedURL,method:"GET"}).then((t=>{t&&(JSON.parse(t).error?(e.setAttributes({error:JSON.parse(t).error}),e.setAttributes({data:null})):(e.setAttributes({data:JSON.parse(t)}),e.setAttributes({error:""})))}))},className:"rss-form"},(0,t.createElement)(xl,{placeholder:El("Enter URL here…"),value:e.attributes.feedURL,onChange:t=>e.setAttributes({feedURL:t}),className:"rss-input"}),(0,t.createElement)(Tl,{isPrimary:!0,type:"submit"},El("Use URL")))):(0,t.createElement)("div",{className:"news-feed"},(0,t.createElement)(Ll,{className:"feed-header",tagname:e.setAttributes.titleLevel,value:e.attributes.title,onChange:t=>{e.setAttributes({title:t})},placeholder:"Add A Header (Optional)",keepPlaceholderOnFocus:!0,allowedFormats:[]}),""!==e.attributes.error?(0,t.createElement)("p",{className:"error"},e.attributes.error):"",!e.attributes.data||"withImage"!==e.attributes.type&&"all"!==e.attributes.type?"":(0,t.createElement)("div",{className:"columns is-multiline feed-items components-disabled"},"withImage"===e.attributes.type?a:r),e.attributes.data&&"withImage"===e.attributes.type&&e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button components-disabled"},(0,t.createElement)("a",{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText)):"",e.attributes.data&&"withoutImage"===e.attributes.type?(0,t.createElement)("div",{className:"feed-grid"},(0,t.createElement)("div",{className:"feed-image"},(0,t.createElement)(Bl,null,(0,t.createElement)(Hl,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{className:"image is-3by2",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)(Tl,{onClick:l},""!==e.attributes.imgUrl?"Select a new image":"Select an image"))}}))),(0,t.createElement)("div",{className:"feed-items components-disabled"},l),e.attributes.hasLink?(0,t.createElement)("a",{className:"button components-disabled",href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText):""):""))]},save:e=>{const a=e.attributes.data&&e.attributes.data.length>0?e.attributes.data.slice(0,3).map((e=>(0,t.createElement)("div",{key:e.id,className:"column is-one-third-desktop is-one-third-tablet is-full-mobile"},$l(e)))):"",l=e.attributes.data&&e.attributes.data.length>0?[...e.attributes.data].slice(0,4).map((e=>(0,t.createElement)("div",{key:e.id,class:"feed-item-noimage"},Rl(e)))):"",r=e.attributes.data&&e.attributes.data.length>0?[...e.attributes.data].map((e=>(0,t.createElement)("div",{key:e.id,className:"column is-one-third-desktop is-half-tablet is-full-mobile"},Ol(e)))):"";return(0,t.createElement)("div",{className:"news-feed"},(0,t.createElement)("div",{className:"container"},e.attributes.title?(0,t.createElement)(Ll.Content,{className:"feed-header",tagName:e.attributes.titleLevel,value:e.attributes.title}):"",""!==e.attributes.error?(0,t.createElement)("p",{className:"error"},e.attributes.error):"",!e.attributes.data||"withImage"!==e.attributes.type&&"all"!==e.attributes.type?"":(0,t.createElement)("div",{className:"columns is-multiline feed-items"},"withImage"===e.attributes.type?a:r),e.attributes.data&&"withImage"===e.attributes.type&&e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("a",{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText)):"",e.attributes.data&&"withoutImage"===e.attributes.type?(0,t.createElement)("div",{className:"feed-grid"},e.attributes.imgUrl?(0,t.createElement)("figure",{className:"feed-image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText})):"",(0,t.createElement)("div",{className:"feed-items"},l),e.attributes.hasLink?(0,t.createElement)("a",{className:"button",href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText):""):""))}});const{__:Dl}=wp.i18n,{registerBlockType:Vl}=wp.blocks,{PanelBody:Gl,PanelRow:Fl,CheckboxControl:Zl,TextareaControl:ql,TextControl:zl,RadioControl:jl,SelectControl:Wl,Button:Yl}=wp.components,{RichText:Xl,InspectorControls:Kl,InnerBlocks:Ql,useBlockProps:Jl}=wp.blockEditor;Vl("purdue-blocks/anchor-link-navigation",{title:Dl("Right Column - Anchor Link Navigation"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("rect",{width:"100",height:"100",rx:"8.55"}),(0,t.createElement)("g",{id:"Arrow-right",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-fff",d:"M47.85,9.91a4.54,4.54,0,0,1,6.43,0L91.16,46.77a4.53,4.53,0,0,1,0,6.44L54.28,90.09a4.54,4.54,0,0,1-6.43,0l-4.21-4.22a4.55,4.55,0,0,1,.08-6.5L66.58,57.59H12.05A4.54,4.54,0,0,1,7.5,53V47a4.54,4.54,0,0,1,4.55-4.55H66.58L43.72,20.63a4.52,4.52,0,0,1-.08-6.5Z"})))),category:"purdue-blocks",keywords:[],attributes:{accordion:{type:"boolean",default:!1},includeH2:{type:"boolean",default:!0},includeH3:{type:"boolean",default:!1},includeH4:{type:"boolean",default:!1},includeH5:{type:"boolean",default:!1},includeH6:{type:"boolean",default:!1},range:{type:"string",default:"page"}},supports:{className:!1,anchor:!0},description:Dl("Create a single level menu from the headers that have an HTML anchor."),edit:e=>[(0,t.createElement)(Kl,null,(0,t.createElement)(Gl,null,(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Include Headings on accordion block?",checked:e.attributes.accordion,onChange:()=>e.setAttributes({accordion:!e.attributes.accordion})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H2 heading level only?",checked:e.attributes.includeH2,onChange:()=>e.setAttributes({includeH2:!e.attributes.includeH2})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H3 heading level only?",checked:e.attributes.includeH3,onChange:()=>e.setAttributes({includeH3:!e.attributes.includeH3})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H4 heading level only?",checked:e.attributes.includeH4,onChange:()=>e.setAttributes({includeH4:!e.attributes.includeH4})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H5 heading level only?",checked:e.attributes.includeH5,onChange:()=>e.setAttributes({includeH5:!e.attributes.includeH5})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H6 heading level only?",checked:e.attributes.includeH6,onChange:()=>e.setAttributes({includeH6:!e.attributes.includeH6})})),(0,t.createElement)(Fl,null,(0,t.createElement)(jl,{label:"Where to pull the headings?",help:"The block needs to be placed in a columns block or content page layout block in order to use 'This Section' option.",selected:e.attributes.range,options:[{label:"This Section",value:"section"},{label:"Whole Page",value:"page"}],onChange:t=>{e.setAttributes({range:t})}})))),(0,t.createElement)("div",{className:"anchor-link-block-editor"},"Preview/Publish the page to see the anchor link navigation menu.")],save:e=>{const a=Jl.save();return(0,t.createElement)("div",x({},a,{className:"anchor-link-block"}),(0,t.createElement)("div",{class:`anchor-link-block-links\n ${e.attributes.accordion?" has-accordion":""}\n ${e.attributes.includeH2?"":" no-H2"}\n ${e.attributes.includeH3?" has-H3":""}\n ${e.attributes.includeH4?" has-H4":""}\n ${e.attributes.includeH5?" has-H5":""}\n ${e.attributes.includeH6?" has-H6":""}\n ${"page"===e.attributes.range?"":" pull-from-section"}\n `}),(0,t.createElement)("button",{id:"to-top-sidebar",class:"to-top-sidebar"},(0,t.createElement)("span",null,"Back To Top")))}});let er='',tr='',ar='',lr='',rr='',nr='',sr='',or='',ir='',cr='',ur='',dr='',mr='',br='',pr='',hr='',gr='',vr='',Er='',fr='',kr='',yr='',wr='';const{__:_r}=wp.i18n,{registerBlockType:xr}=wp.blocks,{PanelBody:Cr,PanelRow:Nr,CheckboxControl:Tr,TextareaControl:Ar,TextControl:Lr,RadioControl:Sr,SelectControl:Br,Button:Hr}=wp.components,{RichText:Ur,InspectorControls:Ir,InnerBlocks:Pr,MediaUploadCheck:Mr,MediaUpload:$r,useBlockProps:Rr}=wp.blockEditor;xr("purdue-blocks/image-toggle-card",{title:_r("Image Toggle Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("rect",{width:"100",height:"100",rx:"8.55"}),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-fff",d:"M78.15,37.21a28,28,0,0,1-7,18.51c-2.66,3-6.83,9.41-8.38,14.74H55.12a8.9,8.9,0,0,1,.36-2.29,50.5,50.5,0,0,1,9.93-17.51,20.46,20.46,0,1,0-30.82,0A50.45,50.45,0,0,1,44.54,68.2a7.82,7.82,0,0,1,.34,2.25v0H37.2c-1.55-5.33-5.72-11.7-8.38-14.74A28.14,28.14,0,1,1,78.15,37.21ZM52.56,24.41A2.56,2.56,0,0,1,50,27,10.25,10.25,0,0,0,39.76,37.21a2.56,2.56,0,1,1-5.11,0A15.37,15.37,0,0,1,50,21.85,2.56,2.56,0,0,1,52.56,24.41ZM37.21,75.59H62.79v6.9a2.55,2.55,0,0,1-.43,1.42L58.44,89.8a2.58,2.58,0,0,1-2.14,1.14H43.69a2.58,2.58,0,0,1-2.13-1.14l-3.92-5.89a2.54,2.54,0,0,1-.42-1.42Z"})))),category:"purdue-blocks",keywords:[],attributes:{images:{type:"array",default:[]},cardTitle:{type:"string",default:""},firstTitle:{type:"string",default:""},secondTitle:{type:"string",default:""},linkText:{type:"string",default:""},linkUrl:{type:"string",default:""},includeLink:{type:"boolean",default:!1},openInNewTab:{type:"boolean",default:!1},icon:{type:"string",default:""},cardStyle:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:_r("Add a block with up to two images that can be toggled with an optional link."),edit:a=>{const l=()=>{a.setAttributes({images:""})};return[(0,t.createElement)(Ir,null,(0,t.createElement)(Cr,null,(0,t.createElement)(Nr,null,(0,t.createElement)(Br,{label:"Card Header Style",value:a.attributes.cardStyle,options:[{value:"",label:"Light Gray"},{value:"has-header-black",label:"Black"}],onChange:e=>{a.setAttributes({cardStyle:e})}})),(0,t.createElement)(Nr,null,(0,t.createElement)(Tr,{label:"Add a link to this card?",checked:a.attributes.includeLink,onChange:()=>a.setAttributes({includeLink:!a.attributes.includeLink})})),a.attributes.includeLink?(0,t.createElement)(Cr,null,(0,t.createElement)(Nr,null,(0,t.createElement)(Lr,{label:"Link Text",value:a.attributes.linkText,onChange:e=>a.setAttributes({linkText:e})})),(0,t.createElement)(Nr,null,(0,t.createElement)(Lr,{label:"Link URL",value:a.attributes.linkUrl,onChange:e=>a.setAttributes({linkUrl:e})}))):"",(0,t.createElement)(Nr,null,(0,t.createElement)(Tr,{label:"Open link in new tab?",checked:a.attributes.openInNewTab,onChange:()=>a.setAttributes({openInNewTab:!a.attributes.openInNewTab})})))),(0,t.createElement)("div",{className:"image-toggle-card-block-editor"},(0,t.createElement)("div",{className:"image-toggle-card-block-editor__inputs"},(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",null,"Card Heading"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==a.attributes.cardTitle?a.attributes.cardTitle:"",className:"input",type:"text",placeholder:"Card Heading...",onChange:e=>{a.setAttributes({cardTitle:e.target.value})}})),(0,t.createElement)("div",{className:"image-toggle-card-block-editor__icon-selector"},(0,t.createElement)("button",{id:"iconSelectorButton",onClick:Or,className:"image-toggle-card-block-editor__button"},"Select Optional Icon"),(0,t.createElement)("div",{id:"iconPopup",className:"image-toggle-card-block-editor__icon-selector--popup"},Object.values(e).map((e=>(0,t.createElement)("button",{className:"image-toggle-card-block-editor__icon-selector--icon",dangerouslySetInnerHTML:{__html:e},onClick:t=>{a.setAttributes({icon:e})}})))),a.attributes.icon?(0,t.createElement)(Hr,{className:"image-toggle-card-block-editor__button",onClick:()=>{a.setAttributes({icon:""})}},"Remove Icon"):"",(0,t.createElement)("div",{className:"image-toggle-card-block-editor__icon-selector--selected-icon",dangerouslySetInnerHTML:{__html:a.attributes.icon}})))),(0,t.createElement)(Mr,null,(0,t.createElement)($r,{multiple:!0,gallery:!0,onSelect:e=>{e.length>0&&e.length<3&&a.setAttributes({images:e})},render:e=>{let{open:r}=e;return a.attributes.images.length>0&&a.attributes.images.length<3?(0,t.createElement)("div",{className:"image-toggle-card-block-editor__preview"},(0,t.createElement)("div",{className:"image-toggle-card-block-editor__imgGroup"},a.attributes.images.map((e=>(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:"",src:e.url}))))),(0,t.createElement)(Hr,{className:"image-toggle-card-block-editor__button",onClick:r},"Select New Images"),(0,t.createElement)(Hr,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Remove images")):(0,t.createElement)("div",{className:"image-toggle-card-block-editor__container"},(0,t.createElement)("span",{className:"image-toggle-card-block-editor__heading"},(0,t.createElement)("span",{className:"dashicons dashicons-format-image"}),(0,t.createElement)("span",null,"Image Toggle Card")),(0,t.createElement)("p",{className:"image-toggle-card-block-editor__description"},"Pick up to two images from the media library."),(0,t.createElement)(Hr,{className:"image-toggle-card-block-editor__button",onClick:r},"Open Media Library"))}})),(0,t.createElement)("span",{style:{color:"gray",paddingLeft:"0.75rem",paddingBottom:"0.5rem"}},"Note: Toggle buttons will only appear when two images are selected."),a.attributes.images.length>1?(0,t.createElement)("div",{className:"image-toggle-card-block-editor__inputs"},(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",null,"First Image Title"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==a.attributes.firstTitle?a.attributes.firstTitle:"",className:"input",type:"text",placeholder:"First Image Title...",onChange:e=>{a.setAttributes({firstTitle:e.target.value})}}))),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",null,"Second Image Title"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==a.attributes.secondTitle?a.attributes.secondTitle:"",className:"input",type:"text",placeholder:"Second Image Title...",onChange:e=>{a.setAttributes({secondTitle:e.target.value})}})))):"")]},save:e=>{const a=Rr.save();return(0,t.createElement)("div",x({},a,{className:"pu-image-toggle box"}),(0,t.createElement)("div",{className:"pu-image-toggle__heading"+(""!==e.attributes.cardStyle?` ${e.attributes.cardStyle}`:"")},(0,t.createElement)("span",null,""!==e.attributes.icon?(0,t.createElement)("span",{className:"pu-image-toggle__heading--icon"+(e.attributes.icon.includes('data-bg="true"')?" has-bg-white":""),dangerouslySetInnerHTML:{__html:e.attributes.icon}}):""," ",e.attributes.cardTitle),e.attributes.includeLink?(0,t.createElement)("a",{href:e.attributes.linkUrl,target:e.attributes.openInNewTab?"_blank":"",rel:"noopener noreferrer"},e.attributes.linkText):""),(0,t.createElement)("div",{className:"pu-image-toggle__images"},e.attributes.images?e.attributes.images.map(((e,a)=>(0,t.createElement)("img",{className:0===a?"show":"",alt:e.alt,src:e.url}))):""),e.attributes.images.length>1?(0,t.createElement)("div",{className:"pu-image-toggle__buttons"},(0,t.createElement)("button",{className:"toggle-button selected"},e.attributes.firstTitle),(0,t.createElement)("button",{className:"toggle-button"},e.attributes.secondTitle)):"")}});const Or=e=>{const t=e.target.nextSibling;t.classList.contains("open")?t.classList.remove("open"):t.classList.add("open")},{__:Dr}=wp.i18n,{registerBlockType:Vr}=wp.blocks,{PanelBody:Gr,PanelRow:Fr,CheckboxControl:Zr,TextareaControl:qr,TextControl:zr,RadioControl:jr,SelectControl:Wr,Button:Yr}=wp.components,{RichText:Xr,InspectorControls:Kr,InnerBlocks:Qr,useBlockProps:Jr}=wp.blockEditor;Vr("purdue-blocks/content-page-layout",{title:Dr("Content Page Layout"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Columns",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-d9ab28",d:"M100,15.62V84.38a9.38,9.38,0,0,1-9.38,9.37H9.37A9.38,9.38,0,0,1,0,84.38V15.62A9.38,9.38,0,0,1,9.37,6.25H90.62A9.38,9.38,0,0,1,100,15.62ZM43.75,31.25H12.5v50H43.75Zm43.75,0H56.25v50H87.5Z",transform:"translate(0 -6.25)"})))),category:"purdue-blocks",keywords:[],attributes:{width:{type:"string",default:"narrow"},withSidebar:{type:"boolean",default:!1},sidebarLocationDesktop:{type:"string",default:"right"},sidebarLocationMobile:{type:"string",default:"below"},contentLocation:{type:"string",default:"center"},bgColor:{type:"string",default:""},border:{type:"boolean",default:!1},twoColumn:{type:"boolean",default:!1},paddingTop:{type:"string",default:""},paddingBottom:{type:"string",default:""},stackReverseMobile:{type:"boolean",default:!1},divider:{type:"boolean",default:!1},verticalCenter:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:Dr("A content page layout with a main content area with/without a sidebar area."),edit:e=>[(0,t.createElement)(Kr,null,(0,t.createElement)(Gr,null,(0,t.createElement)(Fr,null,(0,t.createElement)(Wr,{label:"Background Color",value:e.attributes.bgColor,options:[{value:"",label:"None"},{value:"has-background-black",label:"Black"},{value:"has-background-grey-lighter",label:"Light Gray"},{value:"has-background-black-ter",label:"Dark Gray"},{value:"has-background-boiler-gold",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({bgColor:t})}})),(0,t.createElement)(Fr,null,(0,t.createElement)(Wr,{label:"Padding at the top",value:e.attributes.paddingTop,options:[{value:"has-padding-top-none",label:"None"},{value:"has-padding-top-small",label:"Small"},{value:"",label:"Medium"},{value:"has-padding-top-large",label:"Large"}],onChange:t=>{e.setAttributes({paddingTop:t})}})),(0,t.createElement)(Fr,null,(0,t.createElement)(Wr,{label:"Padding at the bottom",value:e.attributes.paddingBottom,options:[{value:"has-padding-bottom-none",label:"None"},{value:"has-padding-bottom-small",label:"Small"},{value:"",label:"Medium"},{value:"has-padding-bottom-large",label:"Large"}],onChange:t=>{e.setAttributes({paddingBottom:t})}})),(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Add a border at the bottom?",checked:e.attributes.border,onChange:()=>{e.setAttributes({border:!e.attributes.border})}})),(0,t.createElement)(Fr,null,(0,t.createElement)(jr,{label:"Main content aria width",selected:e.attributes.width,options:[{label:"Narrow",value:"narrow"},{label:"Wide",value:"wide"}],onChange:t=>{e.setAttributes({width:t})}})),"narrow"!==e.attributes.width||e.attributes.withSidebar?"":(0,t.createElement)(Fr,null,(0,t.createElement)(jr,{label:"Main content aria location",selected:e.attributes.contentLocation,options:[{label:"Center",value:"center"},{label:"Left",value:"left"}],onChange:t=>{e.setAttributes({contentLocation:t})}})),"narrow"===e.attributes.width?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Add A Sidebar?",help:"Would you like to add sidebar to this page?",checked:e.attributes.withSidebar,onChange:()=>{e.attributes.withSidebar?e.setAttributes({withSidebar:!1}):e.setAttributes({withSidebar:!0})}})):"","narrow"===e.attributes.width&&e.attributes.withSidebar?(0,t.createElement)(Fr,null,(0,t.createElement)(jr,{label:"Sidebar Location On Desktop",help:"Choose to place sidebar on the left/right side of the main content.",selected:e.attributes.sidebarLocationDesktop,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({sidebarLocationDesktop:t})}})):"","narrow"===e.attributes.width&&e.attributes.withSidebar?(0,t.createElement)(Fr,null,(0,t.createElement)(jr,{label:"Sidebar Location On Mobile",help:"Choose to place sidebar above/below the main content.",selected:e.attributes.sidebarLocationMobile,options:[{label:"Above main content",value:"above"},{label:"Below main content",value:"below"}],onChange:t=>{e.setAttributes({sidebarLocationMobile:t})}})):"","wide"===e.attributes.width?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Put content in two columns?",checked:e.attributes.twoColumn,onChange:()=>{e.setAttributes({twoColumn:!e.attributes.twoColumn})}})):"","wide"===e.attributes.width&&e.attributes.twoColumn?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Center content vertically?",checked:e.attributes.verticalCenter,onChange:()=>{e.setAttributes({verticalCenter:!e.attributes.verticalCenter})}})):"","wide"===e.attributes.width&&e.attributes.twoColumn?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Reverse the stack order the columns on mobile?",checked:e.attributes.stackReverseMobile,onChange:()=>{e.setAttributes({stackReverseMobile:!e.attributes.stackReverseMobile})}})):"","wide"===e.attributes.width&&e.attributes.twoColumn?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Add a divider between columns?",checked:e.attributes.divider,onChange:()=>{e.setAttributes({divider:!e.attributes.divider})}})):"")),(0,t.createElement)("div",{className:`section\n ${e.attributes.withSidebar?" page-layout-with-sidebar":""}\n ${e.attributes.bgColor?` ${e.attributes.bgColor}`:""}\n ${e.attributes.paddingTop?` ${e.attributes.paddingTop}`:""}\n ${e.attributes.paddingBottom?` ${e.attributes.paddingBottom}`:""}\n ${e.attributes.border?" has-border-bottom":""}\n ${"narrow"!==e.attributes.width||e.attributes.withSidebar||"left"!==e.attributes.contentLocation?"":" align-left"}\n ${"wide"===e.attributes.width?" page-layout-wide":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn?" page-layout-two-column":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.stackReverseMobile?" page-layout-two-column-reverser":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.divider?" page-layout-two-column-divider":""}\n `},(0,t.createElement)("div",{className:`container${"left"===e.attributes.sidebarLocationDesktop&&"narrow"===e.attributes.width?" desktop-reverse":""}${"narrow"===e.attributes.width&&"above"===e.attributes.sidebarLocationMobile||"wide"===e.attributes.width&&e.attributes.stackReverseMobile?" mobile-reverse":""}`},(0,t.createElement)(Qr,{template:[["core/columns",{className:"page-layout-columns columns is-multiline"},[["core/column",{className:"column is-two-thirds-desktop is-full-tablet is-full-mobile page-layout-main"},[["core/paragraph",{placeholder:"Start typing to add content, or remove this default paragraph block and then add new blocks."}]]],["core/column",{className:"column is-one-quarter-desktop is-full-tablet is-full-mobile page-layout-sidebar"},[["core/paragraph",{placeholder:"Start typing to add content, or remove this default paragraph block and then add new blocks."}]]]]]],templateInsertUpdatesSelection:!1})))],save:e=>{const a=Jr.save();return(0,t.createElement)("div",x({},a,{className:`section\n ${e.attributes.withSidebar?" page-layout-with-sidebar":""}\n ${e.attributes.bgColor?` ${e.attributes.bgColor}`:""}\n ${e.attributes.paddingTop?` ${e.attributes.paddingTop}`:""}\n ${e.attributes.paddingBottom?` ${e.attributes.paddingBottom}`:""}\n ${e.attributes.border?" has-border-bottom":""}\n ${"narrow"!==e.attributes.width||e.attributes.withSidebar||"left"!==e.attributes.contentLocation?"":" align-left"}\n ${"wide"===e.attributes.width?" page-layout-wide":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn?" page-layout-two-column":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.stackReverseMobile?" page-layout-two-column-reverser":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.divider?" page-layout-two-column-divider":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.verticalCenter?" page-layout-two-column-verticalCenter":""}\n `}),(0,t.createElement)("div",{className:`container${"left"===e.attributes.sidebarLocationDesktop&&"narrow"===e.attributes.width?" desktop-reverse":""}${"narrow"===e.attributes.width&&"above"===e.attributes.sidebarLocationMobile||"wide"===e.attributes.width&&e.attributes.stackReverseMobile?" mobile-reverse":""}`},(0,t.createElement)(Qr.Content,null)))}});const{__:en}=wp.i18n,{registerBlockType:tn}=wp.blocks,{PanelBody:an,PanelRow:ln,TextControl:rn,Button:nn,CheckboxControl:sn,RadioControl:on,ToolbarGroup:cn}=wp.components,{RichText:un,InspectorControls:dn,MediaUploadCheck:mn,MediaUpload:bn,InnerBlocks:pn,BlockControls:hn,useBlockProps:gn}=wp.blockEditor;tn("purdue-blocks/sidebar-cta",{title:en("Right Column - Sidebar CTA"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 97.47"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Arrow-right",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M47.47,2.84a5.34,5.34,0,0,1,7.57,0L98.43,46.21a5.34,5.34,0,0,1,0,7.56L55,97.16a5.34,5.34,0,0,1-7.57,0l-4.95-5a5.35,5.35,0,0,1,.09-7.65L69.5,58.93H5.36A5.35,5.35,0,0,1,0,53.57V46.43a5.35,5.35,0,0,1,5.36-5.36H69.5L42.61,15.45a5.31,5.31,0,0,1-.09-7.65Z",transform:"translate(0 -1.27)"})))),category:"purdue-blocks",keywords:[],attributes:{backgroundColor:{type:"string",default:"white"},header:{type:"string",source:"html",selector:"p.header"},content:{type:"string",source:"html",selector:"p.content"},ctaText:{type:"string",source:"html",selector:"a.cta-button"},ctaUrl:{type:"string",default:""},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:en("Use this block to add a CTA card on the sidebar."),edit:e=>[(0,t.createElement)(dn,null,(0,t.createElement)(an,null,(0,t.createElement)(ln,null,(0,t.createElement)(on,{label:"Background Color",help:"Choose to background color of the proofpoint.",selected:e.attributes.backgroundColor,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({backgroundColor:t})}}))),(0,t.createElement)(an,null,(0,t.createElement)("h2",null,"Button Link settings"),(0,t.createElement)(ln,null,(0,t.createElement)(rn,{label:"Link URL",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})),(0,t.createElement)(ln,null,(0,t.createElement)(sn,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:`purdue-blocks-sidebar-cta${"black"===e.attributes.backgroundColor?" purdue-blocks-sidebar-cta-black":""}\n ${"gray"===e.attributes.backgroundColor?" purdue-blocks-sidebar-cta-gray":""}`},(0,t.createElement)(un,{tagname:"p",value:e.attributes.header,className:"header",onChange:t=>{e.setAttributes({header:t})},placeholder:"Add Header Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)(un,{tagname:"p",value:e.attributes.content,className:"content",onChange:t=>{e.setAttributes({content:t})},placeholder:"Add Content Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)(un,{tagname:"a",value:e.attributes.ctaText,className:"cta-button",onChange:t=>{e.setAttributes({ctaText:t})},placeholder:"Add Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}))],save:e=>{const a=gn.save();return(0,t.createElement)("div",x({},a,{className:`purdue-blocks-sidebar-cta${"black"===e.attributes.backgroundColor?" purdue-blocks-sidebar-cta-black":""}\n ${"gray"===e.attributes.backgroundColor?" purdue-blocks-sidebar-cta-gray":""}`}),e.attributes.header?(0,t.createElement)(un.Content,{className:"header",tagName:"p",value:e.attributes.header}):"",e.attributes.content?(0,t.createElement)(un.Content,{className:"content",tagName:"p",value:e.attributes.content}):"",e.attributes.ctaUrl||e.attributes.ctaText?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"cta-button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):"")}});var vn=window.wp.serverSideRender,En=a.n(vn);const{__:fn}=wp.i18n,{registerBlockType:kn}=wp.blocks,{PanelBody:yn,PanelRow:wn,CheckboxControl:xn,TextareaControl:Cn,TextControl:Nn,RadioControl:Tn,SelectControl:An,Button:Ln,ToolbarGroup:Sn,Disabled:Bn}=wp.components,{RichText:Hn,InspectorControls:Un,MediaUploadCheck:In,MediaUpload:Pn,InnerBlocks:Mn,BlockControls:$n,useBlockProps:Rn}=wp.blockEditor,{apiFetch:On}=wp,{useState:Dn}=wp.element;kn("purdue-blocks/purdue-news",{title:fn("Purdue News"),description:fn("Display entries from RSS feed."),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 66.67"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"newspaper",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M100,21.83V80.16a4.17,4.17,0,0,1-4.17,4.17H9.72A9.73,9.73,0,0,1,0,74.6V27.38a4.17,4.17,0,0,1,4.17-4.17h7.42a8.34,8.34,0,0,1,7.85-5.55H95.83A4.17,4.17,0,0,1,100,21.83ZM9.72,76a1.39,1.39,0,0,0,1.39-1.39v-43H8.33V74.6A1.39,1.39,0,0,0,9.72,76Zm82-50H19.44V74.6a9.1,9.1,0,0,1-.1,1.39H91.67ZM27.78,53.08V36.41a2.08,2.08,0,0,1,2.08-2.08H53.47a2.08,2.08,0,0,1,2.08,2.08V53.08a2.08,2.08,0,0,1-2.08,2.08H29.86A2.08,2.08,0,0,1,27.78,53.08Zm0,8.33a2.08,2.08,0,0,1,2.08-2.08H53.47a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H29.86a2.08,2.08,0,0,1-2.08-2.08Zm6.94-13.2H48.61V41.27H34.72Zm26.39-11.8a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Zm0,12.5a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Zm0,12.5a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Z",transform:"translate(0 -17.66)"})))),category:"purdue-blocks",keywords:[],edit:e=>{const[a,l]=Dn(!e.attributes.feedURL),r=[{icon:vl,title:fn("Edit RSS URL"),onClick:()=>l(!0)}],n=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)($n,null,(0,t.createElement)(Sn,{controls:r})),(0,t.createElement)(Un,null,(0,t.createElement)(yn,null,(0,t.createElement)(wn,null,(0,t.createElement)(Tn,{label:"Layout of the RSS feed",selected:e.attributes.type,options:[{label:"Recent news with image",value:"withImage"},{label:"Recent news without image",value:"withoutImage"},{label:"All News/Events from the feed (max 10) ",value:"all"}],onChange:t=>{e.setAttributes({type:t})}})),(0,t.createElement)(wn,null,(0,t.createElement)(Nn,{label:"Add a header to this region?",value:e.attributes.header,onChange:t=>e.setAttributes({header:t})})),(0,t.createElement)(wn,null,(0,t.createElement)(Nn,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})),e.attributes.header?(0,t.createElement)(wn,null,(0,t.createElement)(An,{label:"Heading level of the Header",value:e.attributes.headerLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({headerLevel:t})}})):"","withoutImage"===e.attributes.type?(0,t.createElement)(wn,null,(0,t.createElement)("p",null,"Choose a hero Image")):"","withoutImage"===e.attributes.type?(0,t.createElement)(wn,null,(0,t.createElement)(In,null,(0,t.createElement)(Pn,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"purdue-blocks-editor-news__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(Ln,{className:"purdue-blocks-editor-feature-story__button",onClick:l},"Select a New Image"),(0,t.createElement)(Ln,{className:"bulma-blocks-editor-site-hero__button purdue-news__remove-image-button",onClick:n},"Remove image")):(0,t.createElement)("div",{className:"purdue-blocks-editor-news__container"},(0,t.createElement)("p",{className:"purdue-blocks-editor-news__description"},"Pick an image from the media library. The recommended aspect ratio is 3:2."),(0,t.createElement)(Ln,{className:"purdue-blocks-editor-feature-story__button",onClick:l},"Open Media Library"))}}))):"","withoutImage"===e.attributes.type?(0,t.createElement)(wn,null,(0,t.createElement)(Cn,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})):"","all"!==e.attributes.type?(0,t.createElement)(wn,null,(0,t.createElement)(xn,{label:"Add a link to the news/events page?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})):"","all"!==e.attributes.type&&e.attributes.hasLink?(0,t.createElement)(wn,null,(0,t.createElement)(Nn,{label:"Link text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"","all"!==e.attributes.type&&e.attributes.hasLink?(0,t.createElement)(wn,null,(0,t.createElement)(Nn,{label:"Link URL",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})):"","all"!==e.attributes.type&&e.attributes.hasLink?(0,t.createElement)(wn,null,(0,t.createElement)(xn,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"")),(0,t.createElement)("div",null,a?(0,t.createElement)("div",{className:"news-feed-editor"},(0,t.createElement)("p",null,'Enter feed URL in the box and then click "Use URL" to retrive the feed'),(0,t.createElement)("form",{onSubmit:t=>{t.preventDefault(),e.attributes.feedURL&&l(!1)},className:"rss-form"},(0,t.createElement)(Nn,{placeholder:fn("Enter URL here…"),value:e.attributes.feedURL,onChange:t=>e.setAttributes({feedURL:t}),className:"rss-input"}),(0,t.createElement)(Ln,{isPrimary:!0,type:"submit"},fn("Use URL")))):(0,t.createElement)(Bn,null,(0,t.createElement)(En(),{block:"purdue-blocks/purdue-news",attributes:e.attributes})))]}});const{__:Vn}=wp.i18n,{registerBlockType:Gn}=wp.blocks,{PanelBody:Fn,PanelRow:Zn,SelectControl:qn,CheckboxControl:zn,TextControl:jn}=wp.components,{InspectorControls:Wn}=wp.blockEditor,{withSelect:Yn}=wp.data,{apiFetch:Xn}=wp;var Kn=[];Gn("purdue-blocks/custom-side-menu",{title:Vn("Custom Side Menu"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 85 82.85"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Arrow-right",class:"color-dust-gold"},(0,t.createElement)("path",{class:"cls-1",d:"M47.85,9.91a4.54,4.54,0,0,1,6.42,0h0L91.16,46.77a4.53,4.53,0,0,1,0,6.41l0,0L54.28,90.09a4.54,4.54,0,0,1-6.42,0h0l-4.21-4.22a4.55,4.55,0,0,1,0-6.43l.07-.07L66.58,57.59H12.05A4.54,4.54,0,0,1,7.5,53.06V47A4.54,4.54,0,0,1,12,42.45H66.58L43.72,20.63a4.52,4.52,0,0,1-.19-6.39l.11-.11Z",transform:"translate(-7.5 -8.58)"}))),category:"purdue-blocks",keywords:[],description:Vn('Select a menu to create a side navigation for this page. It requires the installation of "WP-REST-API V2 Menus" to work.'),edit:Yn((e=>{const t=Xn({path:"/menus/v1/menus/",method:"GET"}).then((e=>(Kn=e,e)));return{menus:Kn,response:t}}))((e=>{const{menus:a,response:l}=e;if(!l)return(0,t.createElement)("div",{className:"custom-side-menu"},(0,t.createElement)("p",{className:"error-message"},"Loading..."));if(0===l.length)return(0,t.createElement)("div",{className:"custom-side-menu"},(0,t.createElement)("p",{className:"error-message"},"No menus found!"));const r=[{value:"",label:"Select a menu"}];for(let e=0;e{e.setAttributes({selectedMenu:t})}})),(0,t.createElement)(Zn,null,(0,t.createElement)(zn,{label:"Add a back to top button at the bottom?",checked:e.attributes.toTop,onChange:()=>e.setAttributes({toTop:!e.attributes.toTop})})),(0,t.createElement)(Zn,null,(0,t.createElement)(jn,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})))),(0,t.createElement)("div",{className:"custom-side-menu-editor components-disabled"},(0,t.createElement)(En(),{block:"purdue-blocks/custom-side-menu",attributes:e.attributes}))]}))});const{__:Qn}=wp.i18n,{registerBlockType:Jn}=wp.blocks,{PanelBody:es,PanelRow:ts,TextControl:as,TextareaControl:ls,Button:rs,CheckboxControl:ns,RadioControl:ss,Popover:os,ToolbarButton:is,KeyboardShortcuts:cs}=wp.components,{InspectorControls:us,MediaUploadCheck:ds,MediaUpload:ms,InnerBlocks:bs,RichText:ps,BlockControls:hs,useBlockProps:gs}=wp.blockEditor;Jn("purdue-blocks/purdue-button",{title:Qn("Purdue Button"),icon:(0,t.createElement)("svg",{id:"e39343d6-a9a0-44c7-9f48-599e26c08610","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("g",{id:"clone",class:"cls-2"},(0,t.createElement)("g",{class:"cls-2"},(0,t.createElement)("path",{class:"a5e7d352-d338-4ff0-9c2b-3bce1de664a1",d:"M100,89.28571A10.718,10.718,0,0,1,89.28571,100H10.71429A10.718,10.718,0,0,1,0,89.28571V10.71429A10.718,10.718,0,0,1,10.71429,0H89.28571A10.718,10.718,0,0,1,100,10.71429ZM89.28571,12.0529a1.34289,1.34289,0,0,0-1.33861-1.33861H12.0529a1.34289,1.34289,0,0,0-1.33861,1.33861V87.9471a1.34289,1.34289,0,0,0,1.33861,1.33861H87.9471a1.34289,1.34289,0,0,0,1.33861-1.33861ZM21.42857,53.57143V46.42857a2.68655,2.68655,0,0,1,2.679-2.679H75.89241a2.68655,2.68655,0,0,1,2.679,2.679v7.14286a2.68655,2.68655,0,0,1-2.679,2.679H24.10759A2.68655,2.68655,0,0,1,21.42857,53.57143Z",transform:"translate(0)"})))),category:"purdue-blocks",keywords:[],attributes:{buttonStyle:{type:"string",default:"fill"},backgroundColor:{type:"string",default:"black"},fontStyle:{type:"string",default:"primary"},width:{type:"string",default:"auto"},buttonText:{type:"string",source:"html",selector:"span.purdue-blocks__button__text"},hasLink:{type:"boolean",default:!1},buttonURL:{type:"string",default:""},external:{type:"boolean",default:!1},fancyColor:{type:"string",default:"black"},height:{type:"string",default:"auto"},isDownload:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:Qn("This block adds a button styled in line with Purdue brand."),edit:e=>[(0,t.createElement)(us,null,(0,t.createElement)(es,null,(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Font style",selected:e.attributes.fontStyle,options:[{label:"Primary (Regular and uppercase)",value:"primary"},{label:"Narrow (Condesed and capitalized",value:"narrow"},{label:"Fancy",value:"fancy"}],onChange:t=>{e.setAttributes({fontStyle:t})}})),"fancy"===e.attributes.fontStyle?"":(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Button Style",selected:e.attributes.buttonStyle,options:[{label:"Fill",value:"fill"},{label:"Outline",value:"outline"}],onChange:t=>{e.setAttributes({buttonStyle:t}),e.setAttributes({backgroundColor:"black"})}})),"fancy"===e.attributes.fontStyle?(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Button Background Color",selected:e.attributes.fancyColor,options:[{label:"Black",value:"black"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({fancyColor:t})}})):(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Button Background Color",selected:e.attributes.backgroundColor,options:"fill"===e.attributes.buttonStyle?[{label:"Black",value:"black"},{label:"Gold (use on light background)",value:"goldLignt"},{label:"Gold (use on dark background)",value:"goldDark"},{label:"Opaque",value:"opaque"}]:[{label:"Black",value:"black"},{label:"Gold (use on light background)",value:"goldLignt"},{label:"Gold (use on dark background)",value:"goldDark"}],onChange:t=>{e.setAttributes({backgroundColor:t})}})),(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Button Width",selected:e.attributes.width,options:[{label:"Full width",value:"full"},{label:"Full width on mobile only",value:"fullMobile"},{label:"Auto",value:"auto"}],onChange:t=>{e.setAttributes({width:t}),wp.hooks.addFilter("editor.BlockListBlock","purdue-blocks/purdue-button-modify-element",Es)}})),(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Height",help:"Choose to the height of the button.",selected:e.attributes.height,options:[{label:"Auto",value:"auto"},{label:"100%",value:"full"}],onChange:t=>{e.setAttributes({height:t})}}))),(0,t.createElement)(es,null,(0,t.createElement)(ts,null,(0,t.createElement)(ns,{label:"Add a link to this button?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(ts,null,(0,t.createElement)(as,{label:"Link URL",value:e.attributes.buttonURL,onChange:t=>e.setAttributes({buttonURL:t})})):"",e.attributes.hasLink?(0,t.createElement)(ts,null,(0,t.createElement)(ns,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",e.attributes.hasLink&&"fancy"!==e.attributes.fontStyle?(0,t.createElement)(ts,null,(0,t.createElement)(ns,{label:"Is this a download button?",checked:e.attributes.isDownload,onChange:()=>e.setAttributes({isDownload:!e.attributes.isDownload})})):"")),"fancy"===e.attributes.fontStyle?(0,t.createElement)("div",{className:`purdue-blocks-editor-button purdue-blocks__button purdue-blocks__button--fancy\n ${"black"===e.attributes.fancyColor?" purdue-blocks__button--fancy-black":""}\n ${"white"===e.attributes.fancyColor?" purdue-blocks__button--fancy-white":""}\n ${"full"===e.attributes.width?" purdue-blocks__button--full":""}\n ${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}\n ${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}\n ${"full"===e.attributes.height?" purdue-blocks__button--height":""}\n `},(0,t.createElement)(ps,{tagName:"span",value:e.attributes.buttonText,className:"purdue-blocks__button__text",onChange:t=>{e.setAttributes({buttonText:t})},placeholder:"Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)("span",{className:"purdue-blocks__button__icon"},(0,t.createElement)("i",{class:"fas fa-angle-right"}))):(0,t.createElement)("div",{className:`purdue-blocks-editor-button purdue-blocks__button\n ${"goldLignt"===e.attributes.backgroundColor?" purdue-blocks__button--gold-light":""}\n ${"goldDark"===e.attributes.backgroundColor?" purdue-blocks__button--gold-dark":""}\n ${"opaque"===e.attributes.backgroundColor?" purdue-blocks__button--opaque":""}\n ${"fill"===e.attributes.buttonStyle?"":" purdue-blocks__button--outline"}\n ${"full"===e.attributes.width?" purdue-blocks__button--full":""}\n ${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}\n ${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}\n ${"full"===e.attributes.height?" purdue-blocks__button--height":""}\n `},(0,t.createElement)("span",{class:"shrink-padding"}),(0,t.createElement)(ps,{tagName:"span",value:e.attributes.buttonText,className:"purdue-blocks__button__text",onChange:t=>{e.setAttributes({buttonText:t})},placeholder:"Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)("span",{class:"shrink-padding"}))],save:e=>{const a=gs.save();return e.attributes.hasLink&&e.attributes.buttonURL?"fancy"===e.attributes.fontStyle?(0,t.createElement)("a",x({},a,{className:`purdue-blocks__button purdue-blocks__button--fancy\n ${"black"===e.attributes.fancyColor?" purdue-blocks__button--fancy-black":""}\n ${"white"===e.attributes.fancyColor?" purdue-blocks__button--fancy-white":""}\n ${"full"===e.attributes.width?" purdue-blocks__button--full":""}\n ${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}\n ${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}\n ${"full"===e.attributes.height?" purdue-blocks__button--height":""}\n `,href:e.attributes.buttonURL,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"}),(0,t.createElement)(ps.Content,{className:"purdue-blocks__button__text",tagName:"span",value:e.attributes.buttonText}),(0,t.createElement)("span",{className:"purdue-blocks__button__icon"},(0,t.createElement)("i",{class:"fas fa-angle-right"}))):(0,t.createElement)("a",x({},a,{role:"link",className:`purdue-blocks__button${"full"===e.attributes.height?" purdue-blocks__button--height":""}${"goldLignt"===e.attributes.backgroundColor?" purdue-blocks__button--gold-light":""}${"goldDark"===e.attributes.backgroundColor?" purdue-blocks__button--gold-dark":""}${"opaque"===e.attributes.backgroundColor?" purdue-blocks__button--opaque":""}${"fill"===e.attributes.buttonStyle?"":" purdue-blocks__button--outline"}${"full"===e.attributes.width?" purdue-blocks__button--full":""}${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}`,href:e.attributes.buttonURL,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"}),(0,t.createElement)("span",{class:"shrink-padding"}),(0,t.createElement)(ps.Content,{className:"purdue-blocks__button__text",tagName:"span",value:e.attributes.buttonText}),(0,t.createElement)("span",{class:"shrink-padding"})):(0,t.createElement)("div",x({role:"button",className:`purdue-blocks__button${"full"===e.attributes.height?" purdue-blocks__button--height":""}${"goldLignt"===e.attributes.backgroundColor?" purdue-blocks__button--gold-light":""}${"goldDark"===e.attributes.backgroundColor?" purdue-blocks__button--gold-dark":""}${"opaque"===e.attributes.backgroundColor?" purdue-blocks__button--opaque":""}${"fill"===e.attributes.buttonStyle?"":" purdue-blocks__button--outline"}${"full"===e.attributes.width?" purdue-blocks__button--full":""}${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}`},a),(0,t.createElement)("span",{class:"shrink-padding"}),(0,t.createElement)(ps.Content,{className:"purdue-blocks__button__text",tagName:"span",value:e.attributes.buttonText}),(0,t.createElement)("span",{class:"shrink-padding"}))}});const{createHigherOrderComponent:vs}=wp.compose,Es=vs((e=>a=>{let l;return"purdue-blocks/purdue-button"===a.block.name&&(l=["fullMobile"===a.attributes.width?" purdue-button-block-editor-width--full-mobile":"","auto"===a.attributes.width?" purdue-button-block-editor-width--auto":""].join("")),(0,t.createElement)(e,x({},a,{className:l}))}),"modifyBlockListBlockButton");wp.hooks.addFilter("editor.BlockListBlock","purdue-blocks/purdue-button-modify-element",Es);const{__:fs}=wp.i18n,{registerBlockType:ks}=wp.blocks,{PanelBody:ys,PanelRow:ws,RadioControl:_s,SelectControl:xs,Button:Cs,CheckboxControl:Ns}=wp.components,{InnerBlocks:Ts,InspectorControls:As,MediaUploadCheck:Ls,MediaUpload:Ss,RichText:Bs,useBlockProps:Hs}=wp.blockEditor,{select:Us}=wp.data;ks("purdue-blocks/columns-row",{title:fs("Row of Columns"),icon:(0,t.createElement)("svg",{id:"ef9c2100-31be-4639-82c5-0ef6f30faf8a","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 71.42857"},(0,t.createElement)("g",{id:"e07d924f-208c-4ad5-884f-434897ed4326","data-name":"Grip-horizontal",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M28.57143,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H7.14286A7.14374,7.14374,0,0,1,0,29.46429V15.17857A7.14375,7.14375,0,0,1,7.14286,8.03571H21.42857A7.14375,7.14375,0,0,1,28.57143,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H7.14286A7.14375,7.14375,0,0,1,0,72.32143V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H21.42857A7.14374,7.14374,0,0,1,28.57143,58.03571ZM64.28571,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14285,7.14285H42.85714a7.14374,7.14374,0,0,1-7.14285-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14285-7.14286H57.14286A7.14375,7.14375,0,0,1,64.28571,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14285,7.14286H42.85714a7.14375,7.14375,0,0,1-7.14285-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14285-7.14285H57.14286A7.14374,7.14374,0,0,1,64.28571,58.03571ZM100,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H78.57143a7.14374,7.14374,0,0,1-7.14286-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14286-7.14286H92.85714A7.14375,7.14375,0,0,1,100,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H78.57143a7.14375,7.14375,0,0,1-7.14286-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H92.85714A7.14374,7.14374,0,0,1,100,58.03571Z",transform:"translate(0 -8.03571)"})))),category:"purdue-blocks",keywords:[],attributes:{sectionPadding:{type:"string",default:"small"},bgColor:{type:"string",default:""},title:{type:"string",default:""},titleLevel:{type:"string",default:"p"},headerColor:{type:"string",default:"black"},subText:{type:"string",default:""},subTextColor:{type:"string",default:"black"},titleAlign:{type:"string",default:"left"},subTextAlign:{type:"string",default:"left"},numColumns:{type:"number",default:1},dividers:{type:"boolean",default:!1},centerColumns:{type:"boolean",default:!1},addBackground:{type:"boolean",default:!1},backgroundImageType:{type:"string",default:"fabric"},backgroundImageUrl:{type:"string",default:file_data.fabric_url},backgroundImageAlt:{type:"string",default:""},backgroundOverlay:{type:"string",default:"has-overlay-black"},rowType:{type:"string",default:"regular"},addSpace:{type:"boolean",default:!0},addSpaceMobile:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:fs("Add a row of columns to the page."),edit:e=>{if(1===e.attributes.numColumns){const t=e.clientId,a=Us("core/editor").getBlocksByClientId(t)[0].innerBlocks[0]||null;a?a.innerBlocks.length<1&&Is(e,1,1):Is(e,1,1)}return"fabric"===e.attributes.backgroundImageType?(e.setAttributes({backgroundImageUrl:file_data.fabric_url}),e.setAttributes({backgroundImageAlt:""})):"concrete"===e.attributes.backgroundImageType&&(e.setAttributes({backgroundImageUrl:file_data.concrete_url}),e.setAttributes({backgroundImageAlt:""})),[(0,t.createElement)(As,null,(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(_s,{label:"Add a row",selected:e.attributes.rowType,options:[{value:"regular",label:"Regular Row with content"},{value:"empty",label:"Empty Row"},{value:"emptyLine",label:"Empty Row With A Guide Line"}],onChange:t=>{e.setAttributes({rowType:t})}})),"regular"===e.attributes.rowType?(0,t.createElement)(ws,null,(0,t.createElement)(_s,{label:"Padding Size",help:"Select the amount of spacing at the top and bottom of the section.",selected:e.attributes.sectionPadding,options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"is-medium"},{label:"Large",value:"is-large"}],onChange:t=>{e.setAttributes({sectionPadding:t})}})):"",(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Add Background Image",checked:e.attributes.addBackground,onChange:t=>{e.setAttributes({addBackground:t}),e.setAttributes({bgColor:""})}})),e.attributes.addBackground?(0,t.createElement)(ws,null,(0,t.createElement)(_s,{label:"Select Background Image",selected:e.attributes.backgroundImageType,options:[{value:"fabric",label:"Fabric"},{value:"concrete",label:"Concrete"},{value:"own",label:"Choose Your Own Image"}],onChange:t=>{e.setAttributes({backgroundImageType:t})}})):"",e.attributes.addBackground&&"own"===e.attributes.backgroundImageType?(0,t.createElement)(ws,null,(0,t.createElement)(Ls,null,(0,t.createElement)(Ss,{onSelect:t=>{e.setAttributes({backgroundImageUrl:t.url,backgroundImageAlt:""!==e.attributes.backgroundImageAlt?e.attributes.backgroundImageAlt:t.alt})},render:a=>{let{open:l}=a;return""!==e.attributes.backgroundImageUrl?(0,t.createElement)("div",{className:"purdue-blocks-editor-news__preview"},(0,t.createElement)(Cs,{className:"remove-image-button has-margin-left",onClick:l},"Select a New Image"),(0,t.createElement)("p",{className:"has-margin-bottom"},"For best results, use an image with no people or text.")):(0,t.createElement)("div",{className:"purdue-blocks-editor-news__container"},(0,t.createElement)(Cs,{className:"remove-image-button has-margin-left",onClick:l},"Open Media Library"),(0,t.createElement)("p",{className:"has-margin-bottom"},(0,t.createElement)("i",null,"For best results, use an image with no people or text.")))}}))):"",e.attributes.addBackground&&"concrete"!==e.attributes.backgroundImageType?(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Image Overlay Color",value:e.attributes.backgroundOverlay,options:[{value:"",label:"None"},{value:"has-overlay-black",label:"Black"},{value:"has-overlay-white",label:"White"},{value:"has-overlay-steel",label:"Steel Gray"},{value:"has-overlay-gold",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({backgroundOverlay:t})}})):"",e.attributes.addBackground?"":(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Background Color",value:e.attributes.bgColor,options:[{value:"",label:"None"},{value:"has-background-black",label:"Black"},{value:"has-background-light-gray",label:"Lightest Digital Gray"},{value:"has-background-grey-lighter",label:"Medium Digital Gray"},{value:"has-background-black-ter",label:"Steel(Dark) Gray"},{value:"has-background-boiler-gold",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({bgColor:t})}}))),"regular"===e.attributes.rowType?(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Number of Columns",value:e.attributes.numColumns,options:[{value:1,label:"One Column"},{value:2,label:"Two Columns"},{value:3,label:"Three Columns"},{value:4,label:"Four Columns"}],onChange:t=>{let a=parseInt(t);Is(e,e.attributes.numColumns,a),e.setAttributes({numColumns:a})}})),(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Include dividers between columns?",checked:e.attributes.dividers,onChange:t=>e.setAttributes({dividers:t})})),(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Center the columns?",checked:e.attributes.centerColumns,onChange:t=>e.setAttributes({centerColumns:t})}))):"","regular"===e.attributes.rowType?(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Heading level of the title",value:e.attributes.titleLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Heading Color",value:e.attributes.headerColor,options:[{label:"Black",value:"black"},{label:"Steel",value:"steel"},{label:"Digital Gold",value:"gold"},{label:"Aged Gold",value:"aged"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({headerColor:t})}})),(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Subtext Color",value:e.attributes.subTextColor,options:[{label:"Black",value:"black"},{label:"Steel",value:"steel"},{label:"Digital Gold",value:"gold"},{label:"Aged Gold",value:"aged"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({subTextColor:t})}}))):"","regular"===e.attributes.rowType?(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Heading alignment",value:e.attributes.titleAlign,options:[{label:"Left Aligned",value:"left"},{label:"Centered",value:"center"}],onChange:t=>{e.setAttributes({titleAlign:t})}})),(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Sub text alignment",value:e.attributes.subTextAlign,options:[{label:"Left Aligned",value:"left"},{label:"Centered",value:"center"}],onChange:t=>{e.setAttributes({subTextAlign:t})}})),(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Add space below subtext?",checked:e.attributes.addSpace,onChange:t=>e.setAttributes({addSpace:t})}))):"",(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Add space at the bottom on mobile?",checked:e.attributes.addSpaceMobile,onChange:t=>e.setAttributes({addSpaceMobile:t})})))),(0,t.createElement)("div",{className:`pu-columns-row pu-columns-row-editor section\n ${e.attributes.bgColor?` ${e.attributes.bgColor}`:""}\n ${"none"===e.attributes.sectionPadding?"no-padding":""}\n ${"small"!==e.attributes.sectionPadding&&"none"!==e.attributes.sectionPadding&&"regular"===e.attributes.rowType?` ${e.attributes.sectionPadding}`:""}\n ${e.attributes.addBackground&&"concrete"!==e.attributes.backgroundImageType?` ${e.attributes.backgroundOverlay}`:""}\n ${e.attributes.addBackground&&"concrete"===e.attributes.backgroundImageType?" has-overlay-concrete":""}\n ${"empty"===e.attributes.rowType?" pu-columns-row--empty":""}\n ${"emptyLine"===e.attributes.rowType?" pu-columns-row--empty-line":""}\n ${e.attributes.addSpaceMobile?" pu-columns-row--space-mobile":""}\n `,style:{backgroundImage:`url(${e.attributes.addBackground?e.attributes.backgroundImageUrl:""})`},"aria-label":e.attributes.backgroundImageAlt},"regular"===e.attributes.rowType?(0,t.createElement)("div",{className:"content"+("none"!==e.attributes.sectionPadding?" container":"")},(0,t.createElement)("div",{className:"bulma-blocks-editor-columns"},(0,t.createElement)("div",{className:"title"},(0,t.createElement)(Bs,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:`title align--${e.attributes.titleAlign} title--${e.attributes.headerColor}`,onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Heading",keepPlaceholderOnFocus:!0,allowedFormats:[]})),(0,t.createElement)("div",{className:"content"+(e.attributes.addSpace?"":" content--no-margin")},(0,t.createElement)(Bs,{tagName:"p",value:e.attributes.subText,className:`align--${e.attributes.subTextAlign} content subtext--${e.attributes.subTextColor}`,onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Sub-Text",allowedFormats:[]})),(0,t.createElement)(Ts,{templateLock:"all"}))):"")]},save:e=>{const a=`url(${e.attributes.backgroundImageUrl})`,l=Hs.save();return(0,t.createElement)("div",x({},l,{className:`pu-columns-row section\n ${e.attributes.bgColor?` ${e.attributes.bgColor}`:""}\n ${"none"===e.attributes.sectionPadding?"no-padding":""}\n ${"small"!==e.attributes.sectionPadding&&"none"!==e.attributes.sectionPadding&&"regular"===e.attributes.rowType?` ${e.attributes.sectionPadding}`:""}\n ${e.attributes.addBackground&&"concrete"!==e.attributes.backgroundImageType?` ${e.attributes.backgroundOverlay}`:""}\n ${e.attributes.addBackground&&"concrete"===e.attributes.backgroundImageType?" has-overlay-concrete":""}\n ${"empty"===e.attributes.rowType?" pu-columns-row--empty":""}\n ${"emptyLine"===e.attributes.rowType?" pu-columns-row--empty-line":""}\n ${e.attributes.addSpaceMobile?" pu-columns-row--space-mobile":""}\n `,style:{backgroundImage:`${e.attributes.addBackground?a:"none"}`},"aria-label":e.attributes.backgroundImageAlt}),"regular"===e.attributes.rowType?(0,t.createElement)("div",{className:"content"+("none"!==e.attributes.sectionPadding?" container":"")},""!==e.attributes.title&&e.attributes.title||""!==e.attributes.subText&&e.attributes.subText?(0,t.createElement)("div",{className:"content"+(e.attributes.addSpace?"":" content--no-margin")},(0,t.createElement)("div",{className:"columns is-centered"},(0,t.createElement)("div",{className:"column is-8"},""!==e.attributes.title&&void 0!==e.attributes.title?(0,t.createElement)(Bs.Content,{className:`title align--${e.attributes.titleAlign} title--${e.attributes.headerColor}`,tagName:e.attributes.titleLevel,value:e.attributes.title}):"",""!==e.attributes.subText&&void 0!==e.attributes.subText?(0,t.createElement)(Bs.Content,{className:`align--${e.attributes.subTextAlign} subtext--${e.attributes.subTextColor}`,tagName:"p",value:e.attributes.subText}):""))):"",(0,t.createElement)("div",{className:`columns is-multiline ${e.attributes.dividers?"has-dividers":""}${e.attributes.centerColumns?" is-centered":""}`},(0,t.createElement)(Ts.Content,null))):"")}});const Is=(e,t,a)=>{let l=wp.data.select("core/block-editor").getBlock(e.clientId).innerBlocks;const r=a>t,n=0===a;if(1===t&&t===a)l=[(0,na.createBlock)("bulma-blocks/column")],wp.data.dispatch("core/block-editor").replaceInnerBlocks(e.clientId,l,!1);else if(r&&!n){const r=a-t;for(let e=0;e{let a,l;if(0===e.attributes.quoteGroup.length&&e.setAttributes({quoteGroup:[{quoteContent:"",name:"",nameTitle:"",hasLink:!1,ctaText:"",ctaLink:"",external:!1}]}),e.attributes.quoteGroup.length>0){let r=e.attributes.quoteGroup.length-1;a=e.attributes.quoteGroup.map(((a,l)=>(0,t.createElement)(qs,{key:l,className:"quote-block-details",title:`Quote ${l+1} Details`,initialOpen:!0},(0,t.createElement)(zs,null,(0,t.createElement)(Qs,{label:"Add a CTA link to this quote?",checked:a.hasLink,onChange:()=>(t=>{let a=[...e.attributes.quoteGroup];a[t].hasLink=!a[t].hasLink,e.setAttributes({quoteGroup:a})})(l)})),a.hasLink?(0,t.createElement)(zs,null,(0,t.createElement)(Ys,{label:"Call to action text",value:a.ctaText,onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].ctaText=t,e.setAttributes({quoteGroup:l})})(t,l)})):"",a.hasLink?(0,t.createElement)(zs,null,(0,t.createElement)(Ys,{label:"Link address",value:a.ctaLink,onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].ctaLink=t,e.setAttributes({quoteGroup:l})})(t,l)})):"",a.hasLink?(0,t.createElement)(zs,null,(0,t.createElement)(Qs,{label:"Open link in new tab?",checked:a.external,onChange:()=>(t=>{let a=[...e.attributes.quoteGroup];a[t].external=!a[t].external,e.setAttributes({quoteGroup:a})})(l)})):"",e.attributes.quoteGroup.length>1?(0,t.createElement)("hr",null):"",e.attributes.quoteGroup.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this quote:")),l(t=>{let a=[...e.attributes.quoteGroup],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({quoteGroup:a})})(l),icon:Ps}):"",l>0?(0,t.createElement)(Ds,{className:"remove-image-button move-quote",onClick:()=>(t=>{let a=[...e.attributes.quoteGroup],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({quoteGroup:a})})(l),icon:Ms}):""):"",e.attributes.quoteGroup.length>1?(0,t.createElement)("hr",null):"",e.attributes.quoteGroup.length>1?(0,t.createElement)(zs,null,(0,t.createElement)(Ds,{className:"remove-image-button remove-quote",onClick:()=>(t=>{let a=[...e.attributes.quoteGroup];a.splice(t,1),e.setAttributes({quoteGroup:a})})(l)},"Remove this Quote")):""))),l=e.attributes.quoteGroup.map(((a,l)=>(0,t.createElement)("div",{key:l,className:"purdue-block-editor-quote"},(0,t.createElement)("div",{className:"purdue-block-quote__content"},(0,t.createElement)("textarea",{value:""!==a.quoteContent?a.quoteContent:"",className:"textarea",placeholder:"Add quote content here...",onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].quoteContent=t.target.value,e.setAttributes({quoteGroup:l})})(t,l)})),(0,t.createElement)("div",{className:"purdue-block-quote__name"},(0,t.createElement)("input",{value:a.name,className:"input",type:"text",placeholder:"Quote Name...",onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].name=t.target.value,e.setAttributes({quoteGroup:l})})(t,l)})),(0,t.createElement)("div",null,(0,t.createElement)(lo,{tagname:"p",value:a.nameTitle,className:"purdue-block-quote__title",onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].nameTitle=t,e.setAttributes({quoteGroup:l})})(t,l),placeholder:"Quote Name Title...",keepPlaceholderOnFocus:!0})))))}return[(0,t.createElement)(Js,{key:"1"},(0,t.createElement)(qs,null,(0,t.createElement)(zs,null,(0,t.createElement)(Xs,{label:"Background Color",help:"Choose the background color of the quote.",selected:e.attributes.background,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({background:t})}}))),a,(0,t.createElement)(qs,null,e.attributes.quoteGroup.length<5?(0,t.createElement)(Ds,{className:"remove-image-button add-quote",onClick:(()=>{let t=[...e.attributes.quoteGroup];t.push({quoteContent:"",name:"",nameTitle:"",hasLink:!1,ctaText:"",ctaLink:"",external:!1}),e.setAttributes({quoteGroup:t})}).bind(void 0)},$s("Add Another Quote")):"")),(0,t.createElement)("div",{key:"2",className:`purdue-block-quote-group-editor purdue-block-quote-group section${"black"===e.attributes.background?" background-black":""}${"gray"===e.attributes.background?" background-black-ter":""}`},l)]},save:e=>{const a=ao.save(),l=e.attributes.quoteGroup.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"purdue-block-quote"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns is-centered"},(0,t.createElement)("div",{className:"column is-two-thirds-desktop is-full-tablet is-full-mobile"},(0,t.createElement)("p",{className:"purdue-block-quote__content"},e.quoteContent),(0,t.createElement)("div",{className:"purdue-block-quote__bottom"},(0,t.createElement)("div",{className:"purdue-block-quote__info"},""!==e.name?(0,t.createElement)("p",{className:"purdue-block-quote__name"},e.name):"",""!==e.nameTitle?(0,t.createElement)(lo.Content,{className:"purdue-block-quote__title",tagName:"p",value:e.nameTitle}):""),""!==e.ctaLink?(0,t.createElement)("a",{className:"purdue-block-quote__cta",href:e.ctaLink,target:e.external?"_blank":"_self",rel:"noopener noreferrer"},e.ctaText):""))))))),r=e.attributes.quoteGroup.map(((e,a)=>{let l=a+1;return(0,t.createElement)("span",{key:a,className:"purdue-block-quote-group__dot"+(0===a?" active":""),"data-target":a,"aria-label":`quote ${l}`})}));return(0,t.createElement)("div",x({},a,{className:`purdue-block-quote-group ${"black"===e.attributes.background?" has-background-black":""}${"gray"===e.attributes.background?" has-background-black-ter":""}`}),(0,t.createElement)("div",{className:"purdue-block-quote-wrapper"},l),e.attributes.quoteGroup.length>1?(0,t.createElement)("div",{className:"purdue-block-quote-group__arrow-wrapper"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"purdue-block-quote-group__arrow purdue-block-quote-group__arrow-left","aria-label":"previous"},(0,t.createElement)("i",{class:"fas fa-chevron-left"})),(0,t.createElement)("div",{className:"purdue-block-quote-group__arrow purdue-block-quote-group__arrow-right","aria-label":"next"},(0,t.createElement)("i",{class:"fas fa-chevron-right"})))):"",e.attributes.quoteGroup.length>1?(0,t.createElement)("div",{className:"purdue-block-quote-group__dots"},r):"")}});const{__:so}=wp.i18n,{registerBlockType:oo}=wp.blocks,{PanelBody:io,PanelRow:co,RadioControl:uo,SelectControl:mo,CheckboxControl:bo,TextareaControl:po,TextControl:ho,Button:go}=wp.components,{InspectorControls:vo,RichText:Eo,useBlockProps:fo}=wp.blockEditor;oo("purdue-blocks/alert-banner",{title:so("Alert Banner"),icon:(0,t.createElement)("svg",{id:"a8ae3902-6091-40f1-ba15-728f5bf1f742","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100.0008 88.88934"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"e2c1153f-a3b0-433f-9633-3fec02e357e5","data-name":"Exclamation-triangle",class:"a7b4a3b0-640a-46e0-a18c-acb6750103c6"},(0,t.createElement)("g",{class:"a7b4a3b0-640a-46e0-a18c-acb6750103c6"},(0,t.createElement)("path",{class:"cls-2",d:"M91.65678,94.44467H8.34279A8.33857,8.33857,0,0,1,1.124,81.94631L42.78228,9.72008a8.33709,8.33709,0,0,1,14.43588,0L98.87472,81.94631A8.33821,8.33821,0,0,1,91.65678,94.44467ZM42.01405,75.00008a7.98617,7.98617,0,1,0,7.98617-7.98617A7.98564,7.98564,0,0,0,42.01405,75.00008Zm1.69185-13.0817a2.083,2.083,0,0,0,2.07988,1.97051h8.42888a2.083,2.083,0,0,0,2.07988-1.97051l1.2882-23.61128A2.08352,2.08352,0,0,0,55.502,36.1109H44.49844a2.08352,2.08352,0,0,0-2.08074,2.1962Z",transform:"translate(0.0004 -5.55533)"})))),category:"purdue-blocks",keywords:[],attributes:{content:{type:"string",default:""},link:{type:"string",default:""},linkText:{type:"string",default:""},type:{type:"string",default:"notice"},noticeColor:{type:"string",default:"gray"},alertColor:{type:"string",default:"green"},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:so("Create a notice or alert banner with a link."),edit:e=>[(0,t.createElement)(vo,null,(0,t.createElement)(io,null,(0,t.createElement)(co,{className:"blocks-editor-alert--recommendations"},(0,t.createElement)("h2",null,"Text Recommendations"),(0,t.createElement)("p",null,"The recommended maximum character count for the alert content is 90 characters."))),(0,t.createElement)(io,null,(0,t.createElement)(co,null,(0,t.createElement)(uo,{label:"Banner type",selected:e.attributes.type,options:[{label:"Notice",value:"notice"},{label:"Alert",value:"alert"}],onChange:t=>{e.setAttributes({type:t})}}))),(0,t.createElement)(io,null,"notice"===e.attributes.type?(0,t.createElement)(co,null,(0,t.createElement)(mo,{label:"Notice Color",help:"Select the color for your notice banner.",value:e.attributes.noticeColor,options:[{value:"gray",label:"Default (Gray)"},{value:"green",label:"Success (Green)"},{value:"blue",label:"Info (Blue)"},{value:"gold",label:"Message (Gold)"},{value:"orange",label:"Error (Orange)"}],onChange:t=>{e.setAttributes({noticeColor:t})}})):(0,t.createElement)(co,null,(0,t.createElement)(mo,{label:"Alert Color",help:"Select the color for your alert banner.",value:e.attributes.alertColor,options:[{value:"green",label:"All Clear (Green)"},{value:"blue",label:"Minor Alert (Blue)"},{value:"gold",label:"Moderate Alert (Gold)"},{value:"orange",label:"Severe Alert (Orange)"},{value:"red",label:"Extreme Alert (Red)"}],onChange:t=>{e.setAttributes({alertColor:t})}})))),(0,t.createElement)("div",{className:`blocks-editor-alert blocks-editor-alert--${e.attributes.type} ${e.attributes.type}--${"notice"===e.attributes.type?e.attributes.noticeColor:e.attributes.alertColor}`},(0,t.createElement)("div",{className:"content"},(0,t.createElement)(Eo,{tagName:"p",value:e.attributes.content,className:"editor-alert-content",onChange:t=>{e.setAttributes({content:t})},placeholder:"Alert content...",allowedFormats:[]})),(0,t.createElement)("div",{className:"alert-link"},(0,t.createElement)(Eo,{tagName:"div",value:e.attributes.linkText,className:"editor-link-content",onChange:t=>{e.setAttributes({linkText:t})},placeholder:"Alert Link (optional)"})))],save:e=>{const a=fo.save();return(0,t.createElement)("div",x({},a,{className:`alert-banner alert-banner--${e.attributes.type} ${e.attributes.type}--${"notice"===e.attributes.type?e.attributes.noticeColor:e.attributes.alertColor}`}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)(Eo.Content,{className:"alert-banner--content",tagName:"p",value:e.attributes.content}),""!==e.attributes.linkText&&void 0!==e.attributes.linkText?(0,t.createElement)(Eo.Content,{className:"alert-banner--link link-effect",tagName:"div",value:e.attributes.linkText}):""))}});const{__:ko}=wp.i18n,{registerBlockType:yo}=wp.blocks,{PanelBody:wo,PanelRow:_o,CheckboxControl:xo,TextareaControl:Co,TextControl:No,RadioControl:To,SelectControl:Ao}=wp.components,{RichText:Lo,InspectorControls:So,MediaUploadCheck:Bo,MediaUpload:Ho,InnerBlocks:Uo,useBlockProps:Io}=wp.blockEditor;yo("purdue-blocks/mini-hero",{title:ko("Mini Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",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)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".title"},subText:{type:"string",source:"html",selector:"p.content"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},includeLink:{type:"boolean",default:!1},linkExternal:{type:"boolean",default:!1},linkUrl:{type:"string",default:""},linkText:{type:"string",default:""},background:{type:"string",default:"dark"}},supports:{className:!1,anchor:!0},description:ko("Create a mini Hero row with a 7:1 background image."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(So,null,(0,t.createElement)(wo,null,(0,t.createElement)(_o,null,(0,t.createElement)(Ao,{label:"Background Color",help:"The color that is overlaid on the background image",value:e.attributes.background,options:[{label:"Dark",value:"dark"},{label:"Light",value:"light"}],onChange:t=>{e.setAttributes({background:t})}})),(0,t.createElement)(_o,null,(0,t.createElement)(Co,{label:"Hero Background Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})}))),(0,t.createElement)(wo,null,(0,t.createElement)(_o,null,(0,t.createElement)(xo,{label:"Include a Link?",checked:e.attributes.includeLink,onChange:()=>e.setAttributes({includeLink:!e.attributes.includeLink})})),e.attributes.includeLink?(0,t.createElement)(_o,null,(0,t.createElement)(No,{label:"Call to action text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",e.attributes.includeLink?(0,t.createElement)(_o,null,(0,t.createElement)(No,{label:"Link address",value:e.attributes.linkUrl,onChange:t=>e.setAttributes({linkUrl:t})})):"",e.attributes.includeLink?(0,t.createElement)(_o,null,(0,t.createElement)(xo,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({linkExternal:!e.attributes.linkExternal})})):"")),(0,t.createElement)("div",{className:"mini-hero mini-hero-editor"+("light"===e.attributes.background?" mini-hero-light":"")},(0,t.createElement)(Bo,null,(0,t.createElement)(Ho,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{class:"remove-button",onClick:a},"Remove image"):""),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{class:"columns is-centered"},(0,t.createElement)("div",{class:"column is-two-thirds-desktop is-full-tablet is-full-mobile"},(0,t.createElement)("div",{className:"mini-hero--content"},(0,t.createElement)(Lo,{tagname:"h1",value:e.attributes.title,className:"title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)(Lo,{tagName:"p",value:e.attributes.subText,className:"content",onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Text"}))))))}})))]},save:e=>{const a=Io.save();return(0,t.createElement)("div",x({},a,{className:"mini-hero"+("light"===e.attributes.background?" mini-hero-light":"")}),(0,t.createElement)("div",{className:"image",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{class:"columns is-centered"},(0,t.createElement)("div",{class:"column is-two-thirds-desktop is-full-tablet is-full-mobile"},(0,t.createElement)("div",{className:"mini-hero--content"},(0,t.createElement)(Lo.Content,{className:"title",tagName:"h1",value:e.attributes.title}),""!==e.attributes.subText&&void 0!==e.attributes.subText?(0,t.createElement)(Lo.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"",e.attributes.includeLink&&""!==e.attributes.linkText&&""!==e.attributes.linkUrl?(0,t.createElement)("a",{href:e.attributes.linkUrl,className:"link"+("light"===e.attributes.background?" has-bg-light":" has-bg-dark"),target:e.attributes.linkExternal?"_blank":"_self",rel:"noopener"},e.attributes.linkText):""))))))}});const{__:Po}=wp.i18n,{registerBlockType:Mo}=wp.blocks,{PanelBody:$o,PanelRow:Ro,RadioControl:Oo,SelectControl:Do,CheckboxControl:Vo,TextControl:Go,TextareaControl:Fo}=wp.components,{InspectorControls:Zo,MediaUploadCheck:qo,MediaUpload:zo,RichText:jo,useBlockProps:Wo}=wp.blockEditor;Mo("purdue-blocks/profile-gallery",{title:Po("Profile Gallery"),icon:(0,t.createElement)("svg",{id:"ef9c2100-31be-4639-82c5-0ef6f30faf8a","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 71.42857"},(0,t.createElement)("g",{id:"e07d924f-208c-4ad5-884f-434897ed4326","data-name":"Grip-horizontal",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M28.57143,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H7.14286A7.14374,7.14374,0,0,1,0,29.46429V15.17857A7.14375,7.14375,0,0,1,7.14286,8.03571H21.42857A7.14375,7.14375,0,0,1,28.57143,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H7.14286A7.14375,7.14375,0,0,1,0,72.32143V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H21.42857A7.14374,7.14374,0,0,1,28.57143,58.03571ZM64.28571,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14285,7.14285H42.85714a7.14374,7.14374,0,0,1-7.14285-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14285-7.14286H57.14286A7.14375,7.14375,0,0,1,64.28571,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14285,7.14286H42.85714a7.14375,7.14375,0,0,1-7.14285-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14285-7.14285H57.14286A7.14374,7.14374,0,0,1,64.28571,58.03571ZM100,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H78.57143a7.14374,7.14374,0,0,1-7.14286-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14286-7.14286H92.85714A7.14375,7.14375,0,0,1,100,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H78.57143a7.14375,7.14375,0,0,1-7.14286-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H92.85714A7.14374,7.14374,0,0,1,100,58.03571Z",transform:"translate(0 -8.03571)"})))),category:"purdue-blocks",keywords:[],attributes:{profiles:{type:"array",default:[{name:"add",title:"",photoUrl:"",photoAlt:"",bio:"",bioEditorOpen:!1}]},numColumns:{type:"number",default:4},header:{type:"string",default:""},headerLocation:{type:"string",default:"center"}},supports:{className:!1,anchor:!0},description:Po("A gallery view of 1-4 columns of profiles with a modal overlay to view the full bio."),edit:e=>{const a=e.attributes.profiles,l=parseInt(e.attributes.numColumns);return[(0,t.createElement)(Zo,null,(0,t.createElement)($o,null,(0,t.createElement)(Ro,null,(0,t.createElement)(Do,{label:"Number of Columns",value:e.attributes.numColumns,options:[{value:1,label:"One Column"},{value:2,label:"Two Columns"},{value:3,label:"Three Columns"},{value:4,label:"Four Columns"}],onChange:t=>{e.setAttributes({numColumns:t})}})),(0,t.createElement)(Ro,null,(0,t.createElement)(Go,{label:"Add a header to this region",value:e.attributes.header,onChange:t=>e.setAttributes({header:t})})),e.attributes.header?(0,t.createElement)(Ro,null,(0,t.createElement)(Oo,{label:"Choose how to align the header.",selected:e.attributes.headerLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({headerLocation:t})}})):"")),(0,t.createElement)("div",{className:"editor-profile-gallery"},e.attributes.header?(0,t.createElement)("h2",{className:`align-${e.attributes.headerLocation}`},e.attributes.header):"",(0,t.createElement)("div",{className:`columns ${2===l?"editor-profile-gallery--md":1===l?"editor-profile-gallery--sm":""} is-multiline ${e.attributes.bioEditorOpen?"bio-editor-open":""}`},a.map(((a,r,n)=>{const s=4===l?"is-3":3===l?"is-4":2===l?"is-6":"is-12";return"add"===a.name?(0,t.createElement)("div",{className:`editor-profile-add column ${s}`},(0,t.createElement)("button",{onClick:t=>{const a=[...n];a.push({name:"",title:"",photoUrl:"",photoAlt:"",bio:""});const l=a.length;let r=a[l-2];a[l-2]=a[l-1],a[l-1]=r,e.setAttributes({profiles:a})},className:"editor-add-profile-button"},"Add a card")):(0,t.createElement)("div",{className:`column ${s}`},(0,t.createElement)("div",{className:"editor-profile-form"},(0,t.createElement)("div",{className:"editor-profile-order"},(0,t.createElement)("label",null,"Swap Position: "),(0,t.createElement)("select",{onChange:t=>{const a=t.target.value,l=[...n];let s=l[a];l[a]=l[r],l[r]=s,t.target.selectedIndex=r,e.setAttributes({profiles:l})}},n.map(((e,a,l)=>{if("add"!==e.name)return(0,t.createElement)("option",{selected:r===a?"selected":"",value:a},`${a+1}`)})))),(0,t.createElement)(qo,null,(0,t.createElement)(zo,{onSelect:t=>{const l=[...n];a.photoUrl=t.url,a.photoAlt=t.alt,l[r]=a,e.setAttributes({profiles:l})},render:e=>{let{open:l}=e;return(0,t.createElement)("div",{className:"image is-square "+(""===a.photoUrl?"is-empty":""),role:"img",style:{backgroundImage:`url(${a.photoUrl})`},"aria-label":a.photoAlt},(0,t.createElement)("button",{onClick:l},""!==a.photoUrl?"Select a new image":"Select an image"))}})),(0,t.createElement)("input",{className:"editor-profile-text-input",value:a.name,type:"text",placeholder:"Full Name",onChange:t=>{const l=[...n];a.name=t.target.value,l[r]=a,e.setAttributes({profiles:l})}}),(0,t.createElement)("textarea",{className:"editor-profile-text-input",value:a.title,type:"text",placeholder:"Title",onChange:t=>{const l=[...n];a.title=t.target.value,l[r]=a,e.setAttributes({profiles:l})}}),(0,t.createElement)("div",{className:"editor-profile-buttons"},(0,t.createElement)("button",{className:"editor-profile-buttons--edit",onClick:t=>{const l=[...n];a.bioEditorOpen=!a.bioEditorOpen,l[r]=a,l.forEach(((e,t)=>{r!==t&&(e.bioEditorOpen=!1)})),e.setAttributes({profiles:l})}},a.bioEditorOpen?"Close":"Edit Biography"),(0,t.createElement)("button",{className:"editor-profile-buttons--delete",onClick:t=>{const a=[...n];a.splice(r,1),e.setAttributes({profiles:a})}},"Remove card"))),a.bioEditorOpen?(0,t.createElement)("div",{className:"editor-profile-bio "+(l>3?"editor-profile-bio--wide":"")},(0,t.createElement)(jo,{tagName:"p",className:"pu-profile-gallery--bio",value:a.bio,placeholder:"Biography...",onChange:t=>{const l=[...n];a.bio=t,l[r]=a,e.setAttributes({profiles:l})}})):"")}))))]},save:e=>{const a=Wo.save(),l=e.attributes.profiles,r=parseInt(e.attributes.numColumns),n=4===r?"is-3":3===r?"is-4":2===r?"is-6":"is-12";return e.attributes.header?(0,t.createElement)("div",{className:"pu-profile-gallery"},(0,t.createElement)("h2",{className:`align-${e.attributes.headerLocation}`},e.attributes.header),(0,t.createElement)("div",x({},a,{className:"pu-profile-gallery columns is-multiline"}),l.map(((e,a,l)=>{if("add"!==e.name){const l=`${a}-${e.name}`;return(0,t.createElement)("div",{className:`column ${n} is-half-mobile`},(0,t.createElement)("div",{className:"profile-gallery-open"+(e.bio?"":" profile-no-bio"),"data-toggle":l},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${e.photoUrl})`},"aria-label":e.photoAlt}),e.bio?(0,t.createElement)("button",{className:"modal-open-button","aria-label":"More information"},(0,t.createElement)("i",{class:"fas fa-plus","aria-hidden":"true"})):""),(0,t.createElement)("p",{className:"pu-profile-gallery--name"},e.name),(0,t.createElement)("p",{className:"pu-profile-gallery--title"},e.title),e.bio?(0,t.createElement)("div",{className:"pu-profile-gallery--modal","data-modal":l},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"box"},(0,t.createElement)("div",{className:"modal--close-button","aria-label":"close"},(0,t.createElement)("i",{class:"fas fa-times","aria-hidden":"true"})),(0,t.createElement)("div",{className:"modal--img-container"},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${e.photoUrl})`},"aria-label":e.photoAlt})),(0,t.createElement)("div",{className:"modal--content-container"},(0,t.createElement)("p",{className:"pu-profile-gallery--name"},e.name),(0,t.createElement)("p",{className:"pu-profile-gallery--title"},e.title),(0,t.createElement)(jo.Content,{className:"pu-profile-gallery--bio",tagName:"p",value:e.bio}),(0,t.createElement)("button",{className:"modal--secondary-close-button"},"< BACK TO ARTICLE"))))):"")}})))):(0,t.createElement)("div",x({},a,{className:"pu-profile-gallery columns is-multiline"}),l.map(((e,a,l)=>{if("add"!==e.name){const l=`${a}-${e.name}`;return(0,t.createElement)("div",{className:`column ${n} is-half-mobile`},(0,t.createElement)("div",{className:"profile-gallery-open"+(e.bio?"":" profile-no-bio"),"data-toggle":l},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${e.photoUrl})`},"aria-label":e.photoAlt}),e.bio?(0,t.createElement)("button",{className:"modal-open-button","aria-label":"More information"},(0,t.createElement)("i",{class:"fas fa-plus","aria-hidden":"true"})):""),(0,t.createElement)("p",{className:"pu-profile-gallery--name"},e.name),(0,t.createElement)("p",{className:"pu-profile-gallery--title"},e.title),e.bio?(0,t.createElement)("div",{className:"pu-profile-gallery--modal","data-modal":l},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"box"},(0,t.createElement)("div",{className:"modal--close-button","aria-label":"close"},(0,t.createElement)("i",{class:"fas fa-times","aria-hidden":"true"})),(0,t.createElement)("div",{className:"modal--img-container"},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${e.photoUrl})`},"aria-label":e.photoAlt})),(0,t.createElement)("div",{className:"modal--content-container"},(0,t.createElement)("p",{className:"pu-profile-gallery--name"},e.name),(0,t.createElement)("p",{className:"pu-profile-gallery--title"},e.title),(0,t.createElement)(jo.Content,{className:"pu-profile-gallery--bio",tagName:"p",value:e.bio}),(0,t.createElement)("button",{className:"modal--secondary-close-button"},"< BACK TO ARTICLE"))))):"")}})))}});const{__:Yo}=wp.i18n,{registerBlockType:Xo}=wp.blocks,{PanelBody:Ko,PanelRow:Qo,RangeControl:Jo,CheckboxControl:ei,SelectControl:ti,Button:ai}=wp.components,{RichText:li,InnerBlocks:ri,InspectorControls:ni,useBlockProps:si}=wp.blockEditor;Xo("purdue-blocks/tabs",{title:Yo("Tabs"),icon:(0,t.createElement)("svg",{id:"ef9c2100-31be-4639-82c5-0ef6f30faf8a","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 71.42857"},(0,t.createElement)("g",{id:"e07d924f-208c-4ad5-884f-434897ed4326","data-name":"Grip-horizontal",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M28.57143,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H7.14286A7.14374,7.14374,0,0,1,0,29.46429V15.17857A7.14375,7.14375,0,0,1,7.14286,8.03571H21.42857A7.14375,7.14375,0,0,1,28.57143,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H7.14286A7.14375,7.14375,0,0,1,0,72.32143V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H21.42857A7.14374,7.14374,0,0,1,28.57143,58.03571ZM64.28571,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14285,7.14285H42.85714a7.14374,7.14374,0,0,1-7.14285-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14285-7.14286H57.14286A7.14375,7.14375,0,0,1,64.28571,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14285,7.14286H42.85714a7.14375,7.14375,0,0,1-7.14285-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14285-7.14285H57.14286A7.14374,7.14374,0,0,1,64.28571,58.03571ZM100,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H78.57143a7.14374,7.14374,0,0,1-7.14286-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14286-7.14286H92.85714A7.14375,7.14375,0,0,1,100,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H78.57143a7.14375,7.14375,0,0,1-7.14286-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H92.85714A7.14374,7.14374,0,0,1,100,58.03571Z",transform:"translate(0 -8.03571)"})))),category:"purdue-blocks",keywords:[],attributes:{numTabs:{type:"number",default:0},headers:{type:"array",default:[]},headerSize:{type:"string",default:"large"},addPadding:{type:"boolean",default:!0}},supports:{className:!1,anchor:!0},description:Yo("Add tabs."),edit:e=>(0===e.attributes.numTabs&&oi(e,1,1),[(0,t.createElement)(ni,null,(0,t.createElement)(Ko,null,(0,t.createElement)(Qo,null,(0,t.createElement)(ti,{label:"Number of Tabs",value:e.attributes.numTabs,options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5},{label:"6",value:6}],onChange:t=>{oi(e,e.attributes.numTabs,parseInt(t))}})),(0,t.createElement)(Qo,null,(0,t.createElement)(ti,{label:"Font size of the tabs' header",value:e.attributes.headerSize,options:[{label:"Large",value:"large"},{label:"Medium",value:"medium"},{label:"Small",value:"small"}],onChange:t=>{e.setAttributes({headerSize:t})}})),(0,t.createElement)(Qo,null,(0,t.createElement)(ei,{label:"Add paddings to the panels on desktop?",checked:e.attributes.addPadding,onChange:()=>e.setAttributes({addPadding:!e.attributes.addPadding})})))),(0,t.createElement)("div",{className:"pu-blocks-editor-tabs pu-blocks-tabs"+(e.attributes.addPadding?" has-padding":"")},(0,t.createElement)("div",{className:"pu-blocks-tabs__headers"},e.attributes.headers.map(((a,l)=>(0,t.createElement)(ai,{onClick:t=>{wp.data.select("core/block-editor").getBlock(e.clientId).innerBlocks.forEach((e=>{e.attributes.aria===a.id?wp.data.dispatch("core/block-editor").updateBlockAttributes(e.clientId,{editorSelected:!0}):wp.data.dispatch("core/block-editor").updateBlockAttributes(e.clientId,{editorSelected:!1})}));let l=[...e.attributes.headers];l.forEach((e=>{a.id===e.id?e.active=!0:e.active=!1})),e.setAttributes({headers:l})},role:"tab"},(0,t.createElement)(li,{tagname:"p",value:a.text,className:`pu-blocks-tabs__header\n ${"medium"===e.attributes.headerSize?" pu-blocks-tabs__header-medium":""}\n ${"small"===e.attributes.headerSize?" pu-blocks-tabs__header-small":""}${a.active?" active":""}\n `,onChange:t=>{let a=[...e.attributes.headers];a[l].text=t,e.setAttributes({headers:a})},placeholder:"Add tab header text"}))))),(0,t.createElement)(ri,{templateLock:"all"}))]),save:e=>{const a=si.save();return(0,t.createElement)("div",x({className:"pu-blocks-tabs"+(e.attributes.addPadding?" has-padding":"")},a),(0,t.createElement)("div",{className:"pu-blocks-tabs__headers"},e.attributes.headers.length>0?e.attributes.headers.map((a=>(0,t.createElement)(li.Content,{id:`header-${a.id}`,className:`pu-blocks-tabs__header\n ${"medium"===e.attributes.headerSize?" pu-blocks-tabs__header-medium":""}\n ${"small"===e.attributes.headerSize?" pu-blocks-tabs__header-small":""}\n ${a.active?" active":""}\n `,tagName:"button",role:"tab",value:a.text,"aria-controls":`panel-${a.id}`,"aria-selected":a.active?"true":"false"}))):""),(0,t.createElement)(ri.Content,null))}});const oi=(e,t,a)=>{const l=wp.data.select("core/block-editor");let r=l.getBlock(e.clientId).innerBlocks;e.setAttributes({numTabs:a});const n=a>t,s=0===a;let o=[...e.attributes.headers];if(1===t&&t===a){const t=(0,na.createBlock)("purdue-blocks/tab"),a={id:e.clientId+"-0",text:"",active:!0};r=[t],o.push(a),e.setAttributes({headers:o}),wp.data.dispatch("core/block-editor").replaceInnerBlocks(e.clientId,r,!1),wp.data.dispatch("core/block-editor").updateBlockAttributes(l.getBlock(e.clientId).innerBlocks[0].clientId,{editorSelected:!0,selected:!0})}else if(n&&!s){const l=a-t;for(let e=0;e[(0,t.createElement)("div",{className:"pu-blocks-tabs__panel"+(e.attributes.editorSelected?" active":"")},(0,t.createElement)(pi,{template:gi,templateLock:!1,templateInsertUpdatesSelection:!1}))],save:e=>(0,t.createElement)("div",{className:"pu-blocks-tabs__panel"+(e.attributes.editorSelected?" active":""),"aria-labelledby":`header-${e.attributes.aria}`,id:`panel-${e.attributes.aria}`},(0,t.createElement)(pi.Content,null))});const{__:vi}=wp.i18n,{registerBlockType:Ei}=wp.blocks,{PanelBody:fi,PanelRow:ki,SelectControl:yi}=wp.components,{RichText:wi,InspectorControls:_i,MediaUploadCheck:xi,MediaUpload:Ci,InnerBlocks:Ni,useBlockProps:Ti}=wp.blockEditor;Ei("purdue-blocks/shape-separator",{title:vi("Shape Separator"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",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)"})))),category:"purdue-blocks",keywords:[],attributes:{topColor:{type:"string",default:"black"},bottomColor:{type:"string",default:"boiler"}},supports:{className:!1,anchor:!0},description:vi("Add a separator section with a downward pointing arrow shape to be placed between two other sections."),edit:e=>[(0,t.createElement)(_i,null,(0,t.createElement)(fi,null,(0,t.createElement)(ki,null,(0,t.createElement)(yi,{label:"Top Color",help:"The color of the arrow shape. This should match the previous section.",value:e.attributes.topColor,options:[{value:"black",label:"Black"},{value:"white",label:"White"},{value:"lightest",label:"Lightest Digital Gray"},{value:"light",label:"Light Digital Gray"},{value:"medium",label:"Medium Digital Gray"},{value:"steel",label:"Steel(Dark) Gray"},{value:"boiler",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({topColor:t})}})),(0,t.createElement)(ki,null,(0,t.createElement)(yi,{label:"Bottom Color",help:"The color behind the arrow shape. This should match the following section.",value:e.attributes.bottomColor,options:[{value:"black",label:"Black"},{value:"white",label:"White"},{value:"lightest",label:"Lightest Digital Gray"},{value:"light",label:"Light Digital Gray"},{value:"medium",label:"Medium Digital Gray"},{value:"steel",label:"Steel(Dark) Gray"},{value:"boiler",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({bottomColor:t})}})))),(0,t.createElement)("div",{className:`pu-shape-separator bg-${e.attributes.bottomColor}`},(0,t.createElement)("div",{className:`pu-shape-separator--top bg-${e.attributes.topColor}`}))],save:e=>{const a=Ti.save();return(0,t.createElement)("div",x({},a,{className:`pu-shape-separator bg-${e.attributes.bottomColor}`}),(0,t.createElement)("div",{className:`pu-shape-separator--top bg-${e.attributes.topColor}`}))}});const{__:Ai}=wp.i18n,{registerBlockType:Li}=wp.blocks,{PanelBody:Si,PanelRow:Bi,CheckboxControl:Hi,TextareaControl:Ui,TextControl:Ii,RadioControl:Pi,SelectControl:Mi}=wp.components,{RichText:$i,InspectorControls:Ri,MediaUploadCheck:Oi,MediaUpload:Di,InnerBlocks:Vi,useBlockProps:Gi}=wp.blockEditor;Li("purdue-blocks/video-hero",{title:Ai("Video Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",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)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".title"},buttonText:{type:"string",source:"html",selector:".cta-button"},buttonURL:{type:"string",default:""},external:{type:"boolean",default:!1},videoUrl:{type:"string",default:""},posterUrl:{type:"string",default:""},type:{type:"string",default:"video"},imgUrl:{type:"string",default:""},altTexti:{type:"string",default:""},altTextv:{type:"string",default:""},images:{type:"array",default:[]},currentImage:{type:"number",default:1}},supports:{className:!1,anchor:!0},description:Ai("Create a hero banner that will display a background image, video or carousel."),edit:e=>[(0,t.createElement)(Ri,null,(0,t.createElement)(Si,null,(0,t.createElement)(Bi,null,(0,t.createElement)(Pi,{label:"Type of the background",help:"If you want to use one single image as the background of this block, select Image; if you want to use carousel as the background, select Carousel; otherwise, select Video.",selected:e.attributes.type,options:[{label:"Video",value:"video"},{label:"Image",value:"image"},{label:"Carousel",value:"carousel"}],onChange:t=>{e.setAttributes({type:t})}}))),(0,t.createElement)(Si,null,"video"===e.attributes.type?(0,t.createElement)(Bi,null,(0,t.createElement)("p",null,(0,t.createElement)("strong",null,"Select an image to replace the video as the hero on mobile devices."))):"","video"===e.attributes.type?(0,t.createElement)(Bi,null,(0,t.createElement)(Oi,null,(0,t.createElement)(Di,{allowedTypes:["image"],onSelect:t=>{e.setAttributes({posterUrl:t.url,altTextv:""!==e.attributes.altTextv?e.attributes.altTextv:img.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",null,(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},""!==e.attributes.posterUrl?"Select a new image":"Select an image")),""!==e.attributes.posterUrl?(0,t.createElement)("img",{src:e.attributes.posterUrl}):"")}}))):"","carousel"!==e.attributes.type?(0,t.createElement)(Bi,null,(0,t.createElement)(Ui,{label:"Hero Image Alt Text",help:"When video is selected as hero media type, this is the Alt text of the image displaying on mobile devices.",value:"image"===e.attributes.type?e.attributes.altTexti:e.attributes.altTextv,onChange:t=>"image"===e.attributes.type?e.setAttributes({altTexti:t}):e.setAttributes({altTextv:t})})):"",(0,t.createElement)(Bi,null,(0,t.createElement)(Ii,{label:"CTA Link URL",value:e.attributes.buttonURL,onChange:t=>e.setAttributes({buttonURL:t})})),(0,t.createElement)(Bi,null,(0,t.createElement)(Hi,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:"video-hero-editor"},"carousel"===e.attributes.type?(0,t.createElement)(Oi,null,(0,t.createElement)(Di,{addToGallery:!0,multiple:!0,gallery:!0,onSelect:t=>{e.setAttributes({images:t})},render:a=>{let{open:l}=a,r=[...e.attributes.images],n=parseInt(e.attributes.currentImage),s=r.length>0?r[n-1].url:"",o=r.length>0?r[n-1].alt:"";return(0,t.createElement)("div",{class:"video-hero--background-image",role:"img",style:{backgroundImage:`url(${s})`},"aria-label":o},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},0===e.attributes.images.length?"Select images":"Select new images")),e.attributes.images.length>1?(0,t.createElement)("div",{className:"video-hero__carousel__arrow-wrapper"},(0,t.createElement)("span",{className:"video-hero--carousel__arrow video-hero--carousel__arrow-left",onClick:()=>{e.attributes.currentImage>1?e.setAttributes({currentImage:e.attributes.currentImage-1}):e.setAttributes({currentImage:e.attributes.images.length})}},(0,t.createElement)("i",{class:"fas fa-chevron-left"})),(0,t.createElement)("span",{className:"video-hero--carousel__current"},e.attributes.currentImage),(0,t.createElement)("span",{className:"video-hero--carousel__total"},"/",e.attributes.images.length),(0,t.createElement)("span",{className:"video-hero--carousel__arrow video-hero--carousel__arrow-right",onClick:()=>{e.attributes.currentImage{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)($i,{tagname:"span",value:e.attributes.buttonText,className:"cta-button",onChange:t=>{e.setAttributes({buttonText:t})},placeholder:"Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]})))}})):"","image"===e.attributes.type||"video"===e.attributes.type?(0,t.createElement)(Oi,null,(0,t.createElement)(Di,{multiple:!1,gallery:!1,onSelect:t=>{"video"===e.attributes.type?(e.setAttributes({videoUrl:""}),e.setAttributes({videoUrl:t.url})):e.setAttributes({imgUrl:t.url,altTexti:""!==e.attributes.altTexti?e.attributes.altTexti:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{class:"video-hero--background-image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},"video"===e.attributes.type&&""!==e.attributes.videoUrl?(0,t.createElement)("video",{className:"video-hero-editor--video",muted:""},(0,t.createElement)("source",{src:e.attributes.videoUrl,type:"video/mp4"})):"",(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},"video"===e.attributes.type?""!==e.attributes.videoUrl?"Select a new video":"Select a video":""!==e.attributes.imgUrl?"Select a new image":"Select an image")),(0,t.createElement)("div",{className:"video-hero-editor--overlay"}),(0,t.createElement)("div",{className:"video-hero-editor--content"},(0,t.createElement)($i,{tagname:"h1",value:e.attributes.title,className:"title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)($i,{tagname:"span",value:e.attributes.buttonText,className:"cta-button",onChange:t=>{e.setAttributes({buttonText:t})},placeholder:"Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]})))}})):"")],save:e=>{const a=Gi.save();return"carousel"===e.attributes.type?(0,t.createElement)("div",x({},a,{className:"video-hero video-hero--carousel"}),(0,t.createElement)("div",{className:"video-hero--carousel__wrapper"},e.attributes.images.length>0?e.attributes.images.map((e=>(0,t.createElement)("div",{className:"video-hero--carousel__image",style:{backgroundImage:`url(${e.url})`},"aria-label":e.alt}))):""),e.attributes.images.length>1?(0,t.createElement)("div",{class:"video-hero--control"},(0,t.createElement)("button",{class:"video-hero--pause-button"},(0,t.createElement)("span",{class:"sr-only"},"Pause"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-pause-circle","aria-hidden":"true"}))),(0,t.createElement)("button",{class:"video-hero--play-button hide"},(0,t.createElement)("span",{class:"sr-only"},"Play"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-play-circle","aria-hidden":"true"})))):"",e.attributes.images.length>1?(0,t.createElement)("div",{className:"video-hero--carousel__arrow-wrapper"},(0,t.createElement)("span",{className:"video-hero--carousel__arrow video-hero--carousel__arrow-left"},(0,t.createElement)("i",{class:"fas fa-chevron-left"})),(0,t.createElement)("span",{className:"video-hero--carousel__current"},"1"),(0,t.createElement)("span",{className:"video-hero--carousel__total"},"/",e.attributes.images.length),(0,t.createElement)("span",{className:"video-hero--carousel__arrow video-hero--carousel__arrow-right"},(0,t.createElement)("i",{class:"fas fa-chevron-right"}))):"",(0,t.createElement)("div",{className:"video-hero--content"},(0,t.createElement)($i.Content,{className:"title",tagName:"h1",value:e.attributes.title}),e.attributes.buttonURL||e.attributes.buttonText?(0,t.createElement)("a",{href:e.attributes.buttonURL,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)($i.Content,{className:"cta-button",tagName:"span",value:e.attributes.buttonText})):"")):(0,t.createElement)("div",x({},a,{className:"video-hero video-hero--background-image",style:{backgroundImage:`url(${"video"===e.attributes.type?e.attributes.posterUrl:e.attributes.imgUrl})`},"aria-label":"video"===e.attributes.type?e.attributes.altTextv:e.attributes.altTexti}),"video"===e.attributes.type?(0,t.createElement)("video",{autobuffer:"",autoplay:"",className:"video-hero--video",loop:"",muted:"",playsinline:"",poster:e.attributes.posterUrl||"",src:e.attributes.videoUrl}):"",(0,t.createElement)("div",{className:"video-hero--overlay"}),"video"===e.attributes.type?(0,t.createElement)("div",{class:"video-hero--control"},(0,t.createElement)("button",{class:"video-hero--pause-button"},(0,t.createElement)("span",{class:"sr-only"},"Pause"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-pause-circle","aria-hidden":"true"}))),(0,t.createElement)("button",{class:"video-hero--play-button hide"},(0,t.createElement)("span",{class:"sr-only"},"Play"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-play-circle","aria-hidden":"true"})))):"",(0,t.createElement)("div",{className:"video-hero--content"},(0,t.createElement)($i.Content,{className:"title",tagName:"h1",value:e.attributes.title}),e.attributes.buttonURL||e.attributes.buttonText?(0,t.createElement)("a",{href:e.attributes.buttonURL,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)($i.Content,{className:"cta-button",tagName:"span",value:e.attributes.buttonText})):""))}});const{__:Fi}=wp.i18n,{registerBlockType:Zi}=wp.blocks,{PanelBody:qi,PanelRow:zi,TextareaControl:ji,TextControl:Wi,Button:Yi,RadioControl:Xi,CheckboxControl:Ki,SelectControl:Qi,Disabled:Ji}=wp.components,{RichText:ec,InspectorControls:tc,MediaUploadCheck:ac,MediaUpload:lc,InnerBlocks:rc}=wp.blockEditor,{RawHTML:nc}=wp.element,sc=[["core/paragraph",{placeholder:"Body content copy"}]];function oc(e){const t=null==e?void 0:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null}Zi("purdue-blocks/story-line",{title:Fi("Storyline"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 68.75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M84.38,34.38A34.21,34.21,0,0,1,75.87,57c-3.25,3.71-8.35,11.49-10.24,18H56.26v0a11,11,0,0,1,.43-2.79A61.73,61.73,0,0,1,68.82,50.81a25,25,0,1,0-37.64,0A61.7,61.7,0,0,1,43.33,72.23,9.49,9.49,0,0,1,43.74,75v0H34.37c-1.89-6.51-7-14.29-10.24-18A34.37,34.37,0,1,1,84.38,34.38ZM53.12,18.75A3.12,3.12,0,0,1,50,21.88a12.51,12.51,0,0,0-12.5,12.5,3.13,3.13,0,0,1-6.25,0A18.77,18.77,0,0,1,50,15.63,3.11,3.11,0,0,1,53.12,18.75ZM34.38,81.25H65.62v8.43a3.11,3.11,0,0,1-.52,1.73L60.3,98.6a3.1,3.1,0,0,1-2.6,1.4H42.3a3.1,3.1,0,0,1-2.6-1.4l-4.79-7.19a3.11,3.11,0,0,1-.52-1.73Z",transform:"translate(-15.62)"})))),category:"purdue-blocks",keywords:[],attributes:{storyTitle:{type:"string",source:"html",selector:".story-title"},backgroundColor:{type:"string",default:"white"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},imageAlign:{type:"string",default:"left"},contentAlign:{type:"string",default:"bottom"},hasLink:{type:"boolean",default:!1},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h2"},addPaddingTop:{type:"boolean",default:!1},addPaddingBottom:{type:"boolean",default:!1},backgroundImageUrl:{type:"string",default:""},addExtraLineTop:{type:"boolean",default:!1},id:{type:"string",default:""},type:{type:"string",default:"image"},youtubeTitle:{type:"string",default:""},youtubeURL:{type:"string",default:""},uploadURL:{type:"string",default:""},uploadTitle:{type:"string",default:""}},supports:{className:!1},description:Fi("This block adds a storyline row on the page."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:"",altText:"",uploadURL:"",uploadTitle:""})};"dark"===e.attributes.backgroundColor?e.setAttributes({backgroundImageUrl:file_data.concreteDark_url}):e.setAttributes({backgroundImageUrl:""});const l=oc(e.attributes.youtubeURL),r=(0,t.createElement)("iframe",{id:l,class:"storyline-youtube",title:e.attributes.youtubeTitle,src:`https://www.youtube.com/embed/${l}`,frameborder:"0",allowfullscreen:!0});return[(0,t.createElement)(tc,null,(0,t.createElement)(qi,null,(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})),(0,t.createElement)(zi,null,(0,t.createElement)(Xi,{label:"Background Color",help:"Choose the background color.",selected:e.attributes.backgroundColor,options:[{label:"White",value:"white"},{label:"Light Gray",value:"gray"},{label:"Dark",value:"dark"},{label:"Transparent on Dark Background",value:"tDark"},{label:"Transparent on Lignt Background",value:"tLight"}],onChange:t=>{e.setAttributes({backgroundColor:t})}})),(0,t.createElement)(zi,null,(0,t.createElement)(Xi,{label:"Media Type",help:"Choose between image, upload video, or Youtube video.",selected:e.attributes.type,options:[{label:"Image",value:"image"},{label:"Upload Video",value:"upload"},{label:"Youtube Video",value:"youtube"}],onChange:t=>{e.setAttributes({type:t})}})),"youtube"===e.attributes.type?(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"Youtube video URL",value:e.attributes.youtubeURL,onChange:t=>e.setAttributes({youtubeURL:t})})):"","youtube"===e.attributes.type?(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"Youtube Video Title",value:e.attributes.youtubeTitle,onChange:t=>{e.setAttributes({youtubeTitle:t})}})):"",(0,t.createElement)(zi,null,(0,t.createElement)(Xi,{label:"Media Alignment",help:"Choose to place the media to the left or right.",selected:e.attributes.imageAlign,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({imageAlign:t})}})),(0,t.createElement)(zi,null,(0,t.createElement)(Xi,{label:"Content Alignment",help:"Choose to align the content to the bottom of the image when it's short or the center of the image when it's tall.",selected:e.attributes.contentAlign,options:[{label:"Bottom",value:"bottom"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({contentAlign:t})}})),(0,t.createElement)(zi,null,(0,t.createElement)(Qi,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}}))),(0,t.createElement)(qi,null,(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Add a CTA link?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})):"",e.attributes.hasLink?(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(zi,null,(0,t.createElement)(ji,{label:"Featured Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Add padding above guide line?",checked:e.attributes.addPaddingTop,onChange:t=>e.setAttributes({addPaddingTop:t})})),(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Add padding below top guide line on mobile?",checked:e.attributes.addExtraLineTop,onChange:t=>e.setAttributes({addExtraLineTop:t})})),(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Add padding below guide line?",checked:e.attributes.addPaddingBottom,onChange:t=>e.setAttributes({addPaddingBottom:t})})))),(0,t.createElement)("div",{className:`purdue-blocks-storyline purdue-blocks-editor-storyline\n ${e.attributes.addExtraLineTop&&!e.attributes.addPaddingTop?" purdue-blocks-storyline-top-line":""}\n ${e.attributes.addPaddingTop?" purdue-blocks-storyline-top-space":""}\n ${e.attributes.addPaddingBottom?" purdue-blocks-storyline-bottom-space":""}\n ${"gray"===e.attributes.backgroundColor?" purdue-blocks-storyline-gray":""}\n ${"dark"===e.attributes.backgroundColor?" purdue-blocks-storyline-dark":""}\n ${"white"===e.attributes.backgroundColor?" purdue-blocks-storyline-white":""}\n ${"tDark"===e.attributes.backgroundColor?" purdue-blocks-storyline-tDark":""}\n `,style:{backgroundImage:`url(${"dark"===e.attributes.backgroundColor?e.attributes.backgroundImageUrl:""})`},"aria-label":""},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns is-multiline"+("left"===e.attributes.imageAlign?"":" columns-reversed")},(0,t.createElement)("div",{className:"column is-half-desktop is-half-tablet is-full-mobile"},"youtube"===e.attributes.type?(0,t.createElement)(Ji,null,r):"image"===e.attributes.type?(0,t.createElement)(ac,null,(0,t.createElement)(lc,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"image-container"},(0,t.createElement)("img",{className:"image",src:e.attributes.imgUrl,alt:e.attributes.altText}),(0,t.createElement)("div",{className:"image-buttons"},(0,t.createElement)(Yi,{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),e.attributes.imgUrl?(0,t.createElement)(Yi,{className:"remove-image-button",onClick:a},"Remove image"):""))}})):"upload"===e.attributes.type?(0,t.createElement)(ac,null,(0,t.createElement)(lc,{onSelect:t=>{e.setAttributes({uploadURL:t.url,uploadTitle:t.title})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"image-container"},(0,t.createElement)(Ji,null,(0,t.createElement)("video",{muted:!0,playsinline:"",title:e.attributes.uploadTitle,src:e.attributes.uploadURL})),(0,t.createElement)("div",{className:"image-buttons"},(0,t.createElement)(Yi,{className:"remove-image-button",onClick:r},""!==e.attributes.uploadURL?"Select a new Video":"Select an Video"),e.attributes.uploadURL?(0,t.createElement)(Yi,{className:"remove-image-button",onClick:a},"Remove Video"):""))}})):""),(0,t.createElement)("div",{className:`column is-half-desktop is-half-tablet is-full-mobile${"bottom"===e.attributes.contentAlign?" column-align-bottom":""}${"center"===e.attributes.contentAlign?" column-align-center":""}`},(0,t.createElement)("div",{className:"content-container"},(0,t.createElement)(ec,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title",onChange:t=>{e.setAttributes({storyTitle:t})},placeholder:"Add header",keepPlaceholderOnFocus:!0}),(0,t.createElement)(rc,{template:sc,templateLock:!1}),e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.ctaText),(0,t.createElement)("span",{className:"read-more-button-icon"})):"")))))]},save:e=>{const a=oc(e.attributes.youtubeURL),l=`https://www.youtube.com/embed/${a}`,r=`[iframe id=${a} title=${e.attributes.youtubeTitle} src=${l} frameborder="0" allow="fullscreen"]`,n=`url(${e.attributes.backgroundImageUrl})`;return(0,t.createElement)("div",{id:e.attributes.id?e.attributes.id:null,className:`purdue-blocks-storyline\n ${e.attributes.addExtraLineTop?" purdue-blocks-storyline-top-line":""}\n ${e.attributes.addPaddingTop?" purdue-blocks-storyline-top-space":""}\n ${e.attributes.addPaddingBottom?" purdue-blocks-storyline-bottom-space":""}\n ${"gray"===e.attributes.backgroundColor?" purdue-blocks-storyline-gray":""}\n ${"dark"===e.attributes.backgroundColor?" purdue-blocks-storyline-dark":""}\n ${"white"===e.attributes.backgroundColor?" purdue-blocks-storyline-white":""}\n ${"tDark"===e.attributes.backgroundColor?" purdue-blocks-storyline-tDark":""}\n `,style:{backgroundImage:`${"dark"===e.attributes.backgroundColor?n:"none"}`},"aria-label":""},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns is-multiline"+("left"===e.attributes.imageAlign?"":" columns-reversed")},(0,t.createElement)("div",{className:"column is-half-desktop is-half-tablet is-full-mobile"},(0,t.createElement)("div",{className:"image-container"},e.attributes.imgUrl&&"image"===e.attributes.type?(0,t.createElement)("img",{className:"image",src:e.attributes.imgUrl,alt:e.attributes.altText}):"",e.attributes.youtubeURL&&"youtube"===e.attributes.type?(0,t.createElement)("div",{class:"iframe-container"},(0,t.createElement)(nc,null,r)):"",e.attributes.uploadURL&&"upload"===e.attributes.type?(0,t.createElement)("video",{controls:!0,playsinline:"",src:e.attributes.uploadURL,title:e.attributes.uploadTitle}):"")),(0,t.createElement)("div",{className:`column is-half-desktop is-half-tablet is-full-mobile${"bottom"===e.attributes.contentAlign?" column-align-bottom":""}${"center"===e.attributes.contentAlign?" column-align-center":""}`},(0,t.createElement)("div",{className:"content-container"},e.attributes.storyTitle?(0,t.createElement)(ec.Content,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title"}):"",(0,t.createElement)(rc.Content,null),e.attributes.hasLink?(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText,(0,t.createElement)("span",{className:"read-more-button-icon"})):"")))))}});const{__:ic}=wp.i18n,{registerBlockType:cc}=wp.blocks,{PanelBody:uc,PanelRow:dc,CheckboxControl:mc,TextareaControl:bc,SelectControl:pc,TextControl:hc,RadioControl:gc,Button:vc,Disabled:Ec}=wp.components,{RichText:fc,InspectorControls:kc,MediaUploadCheck:yc,MediaUpload:wc,InnerBlocks:_c,useBlockProps:xc}=wp.blockEditor,{select:Cc}=wp.data,Nc=[["core/paragraph",{placeholder:"Body content copy"}]],Tc=["video"];cc("purdue-blocks/large-featured-story",{title:ic("Large Image Featured Story"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{layout:{type:"string",default:"gradient"},storyTitle:{type:"string",source:"html",selector:".story-title"},ctaOptionalSub:{type:"string",default:""},hasLink:{type:"boolean",default:!1},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h2"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},addLightBox:{type:"boolean",default:!1},buttonText:{type:"string",default:""},videoPlatform:{type:"string",default:"youtube"},videoUrlYoutube:{type:"string",default:""},videoUrlUpload:{type:"string",default:""},videoTitle:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:ic("Adds a large image featured story."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})},l=()=>{e.setAttributes({videoUrlUpload:""})};return[(0,t.createElement)(kc,null,(0,t.createElement)(uc,null,(0,t.createElement)(dc,null,(0,t.createElement)(gc,{label:"Layout",selected:e.attributes.layout,options:[{label:"Gradient",value:"gradient"},{label:"Text Box",value:"box"}],onChange:t=>{e.setAttributes({layout:t})}})),(0,t.createElement)(dc,null,(0,t.createElement)(pc,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}})),(0,t.createElement)(dc,null,(0,t.createElement)(mc,{label:"Add a CTA link?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})):"",e.attributes.hasLink?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(dc,null,(0,t.createElement)(mc,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(dc,null,(0,t.createElement)(bc,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(dc,null,(0,t.createElement)(mc,{label:"Add a video lightbox?",checked:e.attributes.addLightBox,onChange:()=>e.setAttributes({addLightBox:!e.attributes.addLightBox})})),e.attributes.addLightBox?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Button Text",help:"The text on the button that opens the lightbox.",value:e.attributes.buttonText,onChange:t=>e.setAttributes({buttonText:t})})):"",e.attributes.addLightBox?(0,t.createElement)(dc,null,(0,t.createElement)(gc,{label:"Video Platform",help:"Select the platform of the video",selected:e.attributes.videoPlatform,options:[{label:"Youtube",value:"youtube"},{label:"Upload a video",value:"upload"}],onChange:t=>{e.setAttributes({videoPlatform:t})}})):"",e.attributes.addLightBox&&"youtube"===e.attributes.videoPlatform?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Youtube Video URL",value:e.attributes.videoUrlYoutube,onChange:t=>e.setAttributes({videoUrlYoutube:t})})):"",e.attributes.addLightBox&&"youtube"===e.attributes.videoPlatform?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Youtube Video Title",value:e.attributes.videoTitle,onChange:t=>{e.setAttributes({videoTitle:""}),e.setAttributes({videoTitle:t})}})):"",e.attributes.addLightBox&&"upload"===e.attributes.videoPlatform?(0,t.createElement)(yc,null,(0,t.createElement)(wc,{accept:"video",allowedTypes:Tc,onSelect:t=>{e.setAttributes({videoUrlUpload:t.url,videoTitle:t.title})},render:a=>{let{open:r}=a;return""!==e.attributes.videoUrlUpload?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("video",{controls:!0,playsinline:"",src:e.attributes.videoUrlUpload,title:e.attributes.videoTitle}),(0,t.createElement)(vc,{className:"remove-image-button multiple",onClick:r},"Select a New Video"),(0,t.createElement)(vc,{className:"remove-image-button multiple",onClick:l},"Remove video")):(0,t.createElement)("div",null,(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick a video from the media library."),(0,t.createElement)(vc,{className:"remove-image-button",onClick:r},"Open Media Library"))}})):"")),(0,t.createElement)("div",{className:"pu-cta-hero pu-large-image pu-large-image-editor animate"+("box"===e.attributes.layout?" pu-large-image--box":"")},(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)(yc,null,(0,t.createElement)(wc,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{className:"remove-image-button",onClick:a},"Remove image"):""))}})),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)(fc,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title",onChange:t=>{e.setAttributes({storyTitle:t})},placeholder:"Add header",keepPlaceholderOnFocus:!0}),(0,t.createElement)(_c,{template:Nc,templateLock:!1}),e.attributes.hasLink&&!e.attributes.addLightBox?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.ctaText),(0,t.createElement)("span",{className:"read-more-button-icon"})):"",e.attributes.addLightBox?(0,t.createElement)("div",{className:"button-container"},e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},e.attributes.ctaText,(0,t.createElement)("span",{className:"read-more-button-icon"})):"",(0,t.createElement)("button",{className:"pu-lightbox-button"},e.attributes.buttonText)):"")))))]},save:e=>{const a=xc.save(),l=function(e){const t=null==e?void 0:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null}(e.attributes.videoUrlYoutube),r=(0,t.createElement)("iframe",{id:l,class:"pu-lightbox-youtube",title:e.attributes.videoTitle,src:`https://www.youtube.com/embed/${l}`,frameborder:"0",allowfullscreen:!0});return(0,t.createElement)("div",x({},a,{className:"pu-cta-hero pu-large-image"+("box"===e.attributes.layout?" pu-large-image--box animate":"")}),(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"background-image","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},e.attributes.storyTitle?(0,t.createElement)(fc.Content,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title"}):"",(0,t.createElement)(_c.Content,null),e.attributes.hasLink&&!e.attributes.addLightBox?(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText,(0,t.createElement)("span",{className:"read-more-button-icon"})):"",e.attributes.addLightBox?(0,t.createElement)("div",{className:"button-container"},e.attributes.hasLink?(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText,(0,t.createElement)("span",{className:"read-more-button-icon"})):"",(0,t.createElement)("button",{className:"pu-lightbox-button"},e.attributes.buttonText)):"")))),e.attributes.addLightBox?(0,t.createElement)("div",{className:"pu-lightbox"},(0,t.createElement)("div",{className:"modal--close-button"},(0,t.createElement)("i",{class:"fas fa-times","aria-hidden":"true"})),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"video-container"},(0,t.createElement)("div",{className:"video"},"youtube"===e.attributes.videoPlatform?r:"","upload"===e.attributes.videoPlatform?(0,t.createElement)("video",{controls:!0,playsinline:"",src:e.attributes.videoUrlUpload,title:e.attributes.videoTitle}):"")))):"")}});const{__:Ac}=wp.i18n,{registerBlockType:Lc}=wp.blocks,{PanelBody:Sc,PanelRow:Bc,CheckboxControl:Hc,TextareaControl:Uc,SelectControl:Ic,TextControl:Pc,Button:Mc}=wp.components,{RichText:$c,InspectorControls:Rc,MediaUploadCheck:Oc,MediaUpload:Dc,InnerBlocks:Vc,useBlockProps:Gc}=wp.blockEditor,{select:Fc}=wp.data;Lc("purdue-blocks/large-text",{title:Ac("Large Text"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{largeText:{type:"string",source:"html",selector:"span.large-text"},smallText:{type:"string",source:"html",selector:"span.small-text"},ctaOptionalSub:{type:"string",default:""},hasLink:{type:"boolean",default:!1},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h2"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:Ac("Adds a large image featured story."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};var l=e.attributes.headerLevel;return[(0,t.createElement)(Rc,null,(0,t.createElement)(Sc,null,(0,t.createElement)(Bc,null,(0,t.createElement)(Ic,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}})),(0,t.createElement)(Bc,null,(0,t.createElement)(Hc,{label:"Add a CTA link?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(Bc,null,(0,t.createElement)(Pc,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})):"",e.attributes.hasLink?(0,t.createElement)(Bc,null,(0,t.createElement)(Pc,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(Bc,null,(0,t.createElement)(Hc,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(Bc,null,(0,t.createElement)(Uc,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"pu-cta-hero pu-large-image pu-large-image-editor pu-large-text animate"},(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)(Oc,null,(0,t.createElement)(Dc,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"background-image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"remove-button",class:"buttons-container"},(0,t.createElement)("button",{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{className:"remove-image-button",onClick:a},"Remove image"):""))}})),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("div",{className:"columns is-centered"},(0,t.createElement)("div",{className:"column is-two-thirds-desktop is-three-quarters-tablet is-full-mobile"},(0,t.createElement)(l,null,(0,t.createElement)($c,{tagName:"span",value:e.attributes.largeText,className:"large-text",onChange:t=>{e.setAttributes({largeText:t})},placeholder:"Add Large text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)($c,{tagName:"span",value:e.attributes.smallText,className:"small-text",onChange:t=>{e.setAttributes({smallText:t})},placeholder:"Add regular text",keepPlaceholderOnFocus:!0,allowedFormats:[]})),e.attributes.hasLink?(0,t.createElement)("div",{className:"bottom-content"},(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",{className:"read-more-button-text"},e.attributes.ctaText))):"")))))))]},save:e=>{var a=e.attributes.headerLevel;const l=Gc.save();return(0,t.createElement)("div",x({},l,{className:"pu-cta-hero pu-large-image pu-large-text"}),(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"background-image","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("div",{className:"columns is-centered"},(0,t.createElement)("div",{className:"column is-two-thirds-desktop is-three-quarters-tablet is-full-mobile"},(0,t.createElement)(a,null,e.attributes.largeText?(0,t.createElement)($c.Content,{tagName:"span",value:e.attributes.largeText,className:"large-text"}):"",e.attributes.smallText?(0,t.createElement)($c.Content,{tagName:"span",value:e.attributes.smallText,className:"small-text"}):""),e.attributes.hasLink?(0,t.createElement)("div",{className:"bottom-content"},(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("span",{className:"read-more-button-text"},e.attributes.ctaText))):"")))))))}});const{__:Zc}=wp.i18n,{registerBlockType:qc}=wp.blocks,{Placeholder:zc,Button:jc,FormFileUpload:Wc,SelectControl:Yc,IconButton:Xc,Panel:Kc,PanelBody:Qc,PanelRow:Jc,Toolbar:eu,BaseControl:tu,TextControl:au,RadioControl:lu,TextareaControl:ru,CheckboxControl:nu}=wp.components,{InspectorControls:su,MediaUploadCheck:ou,MediaUpload:iu,InnerBlocks:cu,RichText:uu,useBlockProps:du}=wp.blockEditor,{Component:mu,Fragment:bu}=wp.element,pu=[["core/paragraph",{placeholder:"Add content"}]];qc("purdue-blocks/sidebar-box",{title:Zc("Sidebar Box"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".sidebar-box__title"},titleLevel:{type:"string",default:"p"},addMargin:{type:"string",default:""},linkGroup:{type:"array",default:[]}},supports:{className:!1,anchor:!0},description:Zc("Add a box with optional header and CTA buttons."),edit:e=>{const a=()=>{let t=[...e.attributes.linkGroup];t.push({ctaText:"",ctaLink:"",external:!1}),e.setAttributes({linkGroup:t})};let l;if(e.attributes.linkGroup.length>0){let a=e.attributes.linkGroup.length-1;l=e.attributes.linkGroup.map(((l,r)=>(0,t.createElement)(Qc,{key:r,className:"quote-block-details",title:`Link ${r+1} Details`,initialOpen:!0},(0,t.createElement)(Jc,null,(0,t.createElement)(au,{label:"Call to action text",value:l.ctaText,onChange:t=>((t,a)=>{let l=[...e.attributes.linkGroup];l[a].ctaText=t,e.setAttributes({linkGroup:l})})(t,r)})),(0,t.createElement)(Jc,null,(0,t.createElement)(au,{label:"Link address",value:l.ctaLink,onChange:t=>((t,a)=>{let l=[...e.attributes.linkGroup];l[a].ctaLink=t,e.setAttributes({linkGroup:l})})(t,r)})),(0,t.createElement)(Jc,null,(0,t.createElement)(nu,{label:"Open link in new tab?",checked:l.external,onChange:()=>(t=>{let a=[...e.attributes.linkGroup];a[t].external=!a[t].external,e.setAttributes({linkGroup:a})})(r)})),e.attributes.linkGroup.length>1?(0,t.createElement)("hr",null):"",e.attributes.linkGroup.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this Link:")),r(t=>{let a=[...e.attributes.linkGroup],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({linkGroup:a})})(r),icon:Ps}):"",r>0?(0,t.createElement)(jc,{className:"remove-image-button move-quote",onClick:()=>(t=>{let a=[...e.attributes.linkGroup],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({linkGroup:a})})(r),icon:Ms}):""):"",e.attributes.linkGroup.length>0?(0,t.createElement)("hr",null):"",e.attributes.linkGroup.length>0?(0,t.createElement)(Jc,null,(0,t.createElement)(jc,{className:"remove-image-button remove-quote",onClick:()=>(t=>{let a=[...e.attributes.linkGroup];a.splice(t,1),e.setAttributes({linkGroup:a})})(r)},"Remove this Link")):"")))}return[(0,t.createElement)(su,{key:"1"},(0,t.createElement)(Qc,null,(0,t.createElement)(Jc,null,(0,t.createElement)(Yc,{label:"Heading level of the Header",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(Jc,null,(0,t.createElement)(nu,{label:"Add margin below?",checked:e.attributes.addMargin,onChange:()=>e.setAttributes({addMargin:!e.attributes.addMargin})}))),l,(0,t.createElement)(Qc,null,0===e.attributes.linkGroup.length?(0,t.createElement)(jc,{className:"remove-image-button add-quote",onClick:a.bind(void 0)},Zc("Add A CTA Link")):"",e.attributes.linkGroup.length>0&&e.attributes.linkGroup.length<5?(0,t.createElement)(jc,{className:"remove-image-button add-quote",onClick:a.bind(void 0)},Zc("Add Another CTA Link")):"")),(0,t.createElement)("div",{key:"2",className:"purdue-block-sidebar-box-editor purdue-block-sidebar-box"+(e.attributes.addMargin?" purdue-block-sidebar-box--margin":"")},(0,t.createElement)(uu,{tagname:e.setAttributes.titleLevel,value:e.attributes.title,className:"sidebar-box__title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)("div",{className:"sidebar-box__content"},(0,t.createElement)(cu,{template:pu,templateLock:!1})),e.attributes.linkGroup.length>0?e.attributes.linkGroup.map(((e,a)=>""!==e.ctaLink||""!==e.ctaText?(0,t.createElement)("a",{key:a,className:"sidebar-box__link components-disabled",href:e.ctaLink,target:e.external?"_blank":"_self",rel:"noopener noreferrer"},e.ctaText):"")):"")]},save:e=>{const a=du.save();return(0,t.createElement)("div",x({},a,{className:"purdue-block-sidebar-box"+(e.attributes.addMargin?" purdue-block-sidebar-box--margin":"")}),e.attributes.title?(0,t.createElement)(uu.Content,{className:"sidebar-box__title",tagName:e.attributes.titleLevel,value:e.attributes.title}):"",(0,t.createElement)("div",{className:"sidebar-box__content"},(0,t.createElement)(cu.Content,null)),e.attributes.linkGroup.length>0?e.attributes.linkGroup.map(((e,a)=>""!==e.ctaLink||""!==e.ctaText?(0,t.createElement)("a",{key:a,className:"sidebar-box__link",href:e.ctaLink,target:e.external?"_blank":"_self",rel:"noopener noreferrer"},e.ctaText):"")):"")}});const{__:hu}=wp.i18n,{registerBlockType:gu}=wp.blocks,{Placeholder:vu,Button:Eu,FormFileUpload:fu,SelectControl:ku,IconButton:yu,Panel:wu,PanelBody:_u,PanelRow:xu,Toolbar:Cu,BaseControl:Nu,TextControl:Tu,RadioControl:Au,TextareaControl:Lu,CheckboxControl:Su}=wp.components,{InspectorControls:Bu,MediaUploadCheck:Hu,MediaUpload:Uu,InnerBlocks:Iu,RichText:Pu,useBlockProps:Mu}=wp.blockEditor,{Component:$u,Fragment:Ru}=wp.element;gu("purdue-blocks/contact-card",{title:hu("Contact Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".contact-card__title"},titleLevel:{type:"string",default:"p"},addMargin:{type:"string",default:""},contactGroup:{type:"array",default:[]}},supports:{className:!1,anchor:!0},description:hu("Add a contact card."),edit:e=>{let a,l;if(0===e.attributes.contactGroup.length&&e.setAttributes({contactGroup:[{icon:"",text:{type:"string",source:"html",selector:".contact-card__text"}}]}),e.attributes.contactGroup.length>0){let r=e.attributes.contactGroup.length-1;a=e.attributes.contactGroup.map(((a,l)=>(0,t.createElement)(_u,{key:l,className:"quote-block-details",title:`Contact ${l+1} Details`,initialOpen:!0},(0,t.createElement)(xu,null,(0,t.createElement)(Tu,{label:"Icon",help:"Add a fontawesome icon in front of this piiece of contact info.",value:a.icon,onChange:t=>((t,a)=>{let l=[...e.attributes.contactGroup];l[a].icon=t,e.setAttributes({contactGroup:l})})(t,l)})),e.attributes.contactGroup.length>1?(0,t.createElement)("hr",null):"",e.attributes.contactGroup.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this piece of contact info:")),l(t=>{let a=[...e.attributes.contactGroup],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({contactGroup:a})})(l),icon:Ms}):"",l>0?(0,t.createElement)(Eu,{className:"remove-image-button move-quote",onClick:()=>(t=>{let a=[...e.attributes.contactGroup],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({contactGroup:a})})(l),icon:Ps}):""):"",e.attributes.contactGroup.length>0?(0,t.createElement)("hr",null):"",e.attributes.contactGroup.length>0?(0,t.createElement)(xu,null,(0,t.createElement)(Eu,{className:"remove-image-button remove-quote",onClick:()=>(t=>{let a=[...e.attributes.contactGroup];a.splice(t,1),e.setAttributes({contactGroup:a})})(l)},"Remove This Contact Info")):""))),l=e.attributes.contactGroup.map(((a,l)=>(0,t.createElement)("div",{key:l,className:"columns"},a.icon?(0,t.createElement)("div",{className:"column non-flex"},(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:a.icon}})):"",(0,t.createElement)("div",{className:"column"},(0,t.createElement)(Pu,{tagName:"p",value:a.text,className:"contact-card__text",onChange:t=>((t,a)=>{let l=[...e.attributes.contactGroup];l[a].text=t,e.setAttributes({contactGroup:l})})(t,l),placeholder:"Add Contact Info",keepPlaceholderOnFocus:!0})))))}return[(0,t.createElement)(Bu,{key:"1"},(0,t.createElement)(_u,null,(0,t.createElement)(xu,null,(0,t.createElement)(ku,{label:"Heading level of the Header",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(xu,null,(0,t.createElement)(Su,{label:"Add margin below?",checked:e.attributes.addMargin,onChange:()=>e.setAttributes({addMargin:!e.attributes.addMargin})}))),a,(0,t.createElement)(_u,null,(0,t.createElement)(Eu,{className:"remove-image-button add-quote",onClick:(()=>{let t=[...e.attributes.contactGroup];t.push({icon:"",text:{type:"string",source:"html",selector:".contact-card__text"}}),e.setAttributes({contactGroup:t})}).bind(void 0)},hu("Add Another Contact Info")))),(0,t.createElement)("div",{key:"2",className:"pu-contact-card-editor pu-contact-card"+(e.attributes.addMargin?" pu-contact-card--margin":"")},(0,t.createElement)(Pu,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:"contact-card__title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)("div",{className:"contact-card__content"},l))]},save:e=>{const a=Mu.save();return(0,t.createElement)("div",x({},a,{className:"pu-contact-card"+(e.attributes.addMargin?" pu-contact-card--margin":"")}),e.attributes.title?(0,t.createElement)(Pu.Content,{className:"contact-card__title",tagName:e.attributes.titleLevel,value:e.attributes.title}):"",(0,t.createElement)("div",{className:"contact-card__content"},e.attributes.contactGroup.length>0?e.attributes.contactGroup.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"columns"},e.icon?(0,t.createElement)("div",{className:"column non-flex"},(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:e.icon}})):"",(0,t.createElement)("div",{className:"column"},(0,t.createElement)(Pu.Content,{className:"contact-card__text",tagName:"p",value:e.text}))))):""))}});const{__:Ou}=wp.i18n,{registerBlockType:Du}=wp.blocks,{PanelBody:Vu,PanelRow:Gu,CheckboxControl:Fu,TextareaControl:Zu,SelectControl:qu,TextControl:zu,RadioControl:ju,Button:Wu,Disabled:Yu}=wp.components,{RichText:Xu,InspectorControls:Ku,MediaUploadCheck:Qu,MediaUpload:Ju,InnerBlocks:ed,useBlockProps:td}=wp.blockEditor,{select:ad}=wp.data,ld=[["core/paragraph",{placeholder:"Optional subtext"}]];Du("purdue-blocks/text-hero",{title:Ou("Text Block Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{storyTitle:{type:"string",source:"html",selector:".story-title"},ctaOptionalSub:{type:"string",default:""},hasLink:{type:"boolean",default:!1},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h1"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},position:{type:"string",default:"left"}},supports:{className:!1,anchor:!0},description:Ou("Adds a large image featured story."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(Ku,null,(0,t.createElement)(Vu,null,(0,t.createElement)(Gu,null,(0,t.createElement)(ju,{label:"Text Box Position",selected:e.attributes.position,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({position:t})}})),(0,t.createElement)(Gu,null,(0,t.createElement)(qu,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}})),(0,t.createElement)(Gu,null,(0,t.createElement)(Fu,{label:"Add a CTA link?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(Gu,null,(0,t.createElement)(zu,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})):"",e.attributes.hasLink?(0,t.createElement)(Gu,null,(0,t.createElement)(zu,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(Gu,null,(0,t.createElement)(Fu,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(Gu,null,(0,t.createElement)(Zu,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"pu-cta-hero pu-text-hero pu-text-hero-editor"+("right"===e.attributes.position?" pu-text-hero--right":"")},(0,t.createElement)("div",{className:"hero is-medium"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)(Qu,null,(0,t.createElement)(Ju,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"background-image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{className:"remove-image-button",onClick:a},"Remove image"):""))}})),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)(Xu,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title",onChange:t=>{e.setAttributes({storyTitle:t})},placeholder:"Add header",keepPlaceholderOnFocus:!0}),(0,t.createElement)(ed,{template:ld,templateLock:!1}),e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",{className:"read-more-button-text"},e.attributes.ctaText),(0,t.createElement)("span",{className:"read-more-button-icon"})):"")))))]},save:e=>{const a=td.save();return(0,t.createElement)("div",x({},a,{className:"pu-cta-hero pu-text-hero"+("right"===e.attributes.position?" pu-text-hero--right":"")}),(0,t.createElement)("div",{className:"hero is-medium"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{role:e.attributes.altText?"img":"",className:"background-image","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},e.attributes.storyTitle?(0,t.createElement)(Xu.Content,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title"}):"",(0,t.createElement)(ed.Content,null),e.attributes.hasLink?(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("span",{className:"read-more-button-text"},e.attributes.ctaText),(0,t.createElement)("span",{className:"read-more-button-icon"})):"")))))}});const{__:rd}=wp.i18n,{registerBlockType:nd}=wp.blocks,{PanelBody:sd,PanelRow:od,CheckboxControl:id,TextareaControl:cd,TextControl:ud,RadioControl:dd,SelectControl:md,Button:bd,Disabled:pd}=wp.components,{InspectorControls:hd,MediaUploadCheck:gd,MediaUpload:vd,useBlockProps:Ed,RichText:fd}=wp.blockEditor,{apiFetch:kd}=wp,{useState:yd}=wp.element;nd("purdue-blocks/purdue-slider",{title:rd("Purdue Slider"),description:rd("Create a slider."),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],edit:e=>{0===e.attributes.cards.length&&e.setAttributes({cards:[{header:"",storyType:"",ctaText:"",ctaLink:"",external:!1,imageURL:"",imageAlt:"",tag:""}]}),0===e.attributes.tabs.length&&e.setAttributes({tabs:[{header:"",subtext:"",ctaText:"",ctaLink:"",external:!1,imageURL:"",imageAlt:""}]}),0===e.attributes.rtb.length&&e.setAttributes({rtb:[{leadText:"",largeText:"",smallText:"",source:"",ctaText:"",ctaLink:"",external:!1}]});const a=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards];a.splice(t,1),e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs];a.splice(t,1),e.setAttributes({tabs:a})}else if("rtb"===e.attributes.type){let a=[...e.attributes.rtb];a.splice(t,1),e.setAttributes({rtb:a})}},l=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards];a[t].imageURL="",a[t].imageAlt="",e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs];a[t].imageURL="",a[t].imageAlt="",e.setAttributes({tabs:a})}},r=(t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].ctaText=t,e.setAttributes({cards:l})}else if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].ctaText=t,e.setAttributes({tabs:l})}else if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].ctaText=t,e.setAttributes({rtb:l})}},n=(t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].ctaLink=t,e.setAttributes({cards:l})}else if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].ctaLink=t,e.setAttributes({tabs:l})}else if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].ctaLink=t,e.setAttributes({rtb:l})}},s=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards];a[t].external=!a[t].external,e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs];a[t].external=!a[t].external,e.setAttributes({tabs:a})}else if("rtb"===e.attributes.type){let a=[...e.attributes.rtb];a[t].external=!a[t].external,e.setAttributes({rtb:a})}},o=(t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].imageURL=t.url,l[a].imageAlt=t.alt,e.setAttributes({cards:l})}else if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].imageURL=t.url,l[a].imageAlt=t.alt,e.setAttributes({tabs:l})}},i=(t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].header=t,e.setAttributes({cards:l})}else if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].header=t,e.setAttributes({tabs:l})}},c=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({tabs:a})}else if("rtb"===e.attributes.type){let a=[...e.attributes.rtb],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({rtb:a})}},u=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({tabs:a})}else if("rtb"===e.attributes.type){let a=[...e.attributes.rtb],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({rtb:a})}};let d;if("slider"===e.attributes.type&&e.attributes.cards.length>0){let m=e.attributes.cards.length-1;d=e.attributes.cards.map(((d,b)=>(0,t.createElement)(sd,{key:b,className:"quote-block-details",title:`Slides ${b+1} Details`,initialOpen:!0},(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Media Type",value:d.storyType,onChange:t=>((t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].storyType=t,e.setAttributes({cards:l})}})(t,b)})),(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Title",value:d.header,onChange:e=>i(e,b)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Text",value:d.ctaText,onChange:e=>r(e,b)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Link address",value:d.ctaLink,onChange:e=>n(e,b)})),(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Open link in new tab?",checked:d.external,onChange:()=>s(b)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Story Tag",value:d.tag,onChange:t=>((t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].tag=t,e.setAttributes({cards:l})}})(t,b)})),(0,t.createElement)(od,null,(0,t.createElement)(gd,null,(0,t.createElement)(vd,{onSelect:e=>o(e,b),render:e=>{let{open:a}=e;return""!==d.imageURL?(0,t.createElement)("div",{className:"purdue-blocks-editor-news__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:d.imageAlt,src:d.imageURL})),(0,t.createElement)(bd,{className:"purdue-blocks-editor-feature-story__button",onClick:a},"Select a New Image"),(0,t.createElement)(bd,{className:"bulma-blocks-editor-site-hero__button purdue-news__remove-image-button",onClick:()=>l(b)},"Remove image")):(0,t.createElement)("div",{className:"purdue-blocks-editor-news__container"},(0,t.createElement)("p",{className:"purdue-blocks-editor-news__description"},"Pick an image from the media library."),(0,t.createElement)(bd,{className:"purdue-blocks-editor-feature-story__button",onClick:a},"Open Media Library"))}}))),e.attributes.cards.length>1?(0,t.createElement)("hr",null):"",e.attributes.cards.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this slide:")),bc(b),icon:Ps}):"",b>0?(0,t.createElement)(bd,{className:"remove-image-button move-quote",onClick:()=>u(b),icon:Ms}):""):"",e.attributes.cards.length>1?(0,t.createElement)("hr",null):"",e.attributes.cards.length>1?(0,t.createElement)(od,null,(0,t.createElement)(bd,{className:"remove-image-button remove-quote",onClick:()=>a(b)},"Remove this slide")):"")))}else if("tabs"===e.attributes.type&&e.attributes.tabs.length>0){let l=e.attributes.tabs.length-1;d=e.attributes.tabs.map(((o,i)=>(0,t.createElement)(sd,{key:i,className:"quote-block-details",title:`Slides ${i+1} Details`,initialOpen:!0},(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Text",value:o.ctaText,onChange:e=>r(e,i)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Link address",value:o.ctaLink,onChange:e=>n(e,i)})),(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Open link in new tab?",checked:o.external,onChange:()=>s(i)})),e.attributes.tabs.length>1?(0,t.createElement)("hr",null):"",e.attributes.tabs.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this slide:")),ic(i),icon:Ps}):"",i>0?(0,t.createElement)(bd,{className:"remove-image-button move-quote",onClick:()=>u(i),icon:Ms}):""):"",e.attributes.tabs.length>1?(0,t.createElement)("hr",null):"",e.attributes.tabs.length>1?(0,t.createElement)(od,null,(0,t.createElement)(bd,{className:"remove-image-button remove-quote",onClick:()=>a(i)},"Remove this slide")):"")))}else if("rtb"===e.attributes.type&&e.attributes.rtb.length>0){let l=e.attributes.rtb.length-1;d=e.attributes.rtb.map(((o,i)=>(0,t.createElement)(sd,{key:i,className:"quote-block-details",title:`Slides ${i+1} Details`,initialOpen:!0},e.attributes.hasLead?(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Lead Text",value:o.leadText,onChange:t=>((t,a)=>{if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].leadText=t,e.setAttributes({rtb:l})}})(t,i)})):"",(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Highlighted Text",value:o.largeText,onChange:t=>((t,a)=>{if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].largeText=t,e.setAttributes({rtb:l})}})(t,i)})),(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Small Text",value:o.smallText,onChange:t=>((t,a)=>{if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].smallText=t,e.setAttributes({rtb:l})}})(t,i)})),(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Source",value:o.source,onChange:t=>((t,a)=>{if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].source=t,e.setAttributes({rtb:l})}})(t,i)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Text",value:o.ctaText,onChange:e=>r(e,i)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Link address",value:o.ctaLink,onChange:e=>n(e,i)})),(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Open link in new tab?",checked:o.external,onChange:()=>s(i)})),e.attributes.rtb.length>1?(0,t.createElement)("hr",null):"",e.attributes.rtb.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this slide:")),ic(i),icon:Ps}):"",i>0?(0,t.createElement)(bd,{className:"remove-image-button move-quote",onClick:()=>u(i),icon:Ms}):""):"",e.attributes.rtb.length>1?(0,t.createElement)("hr",null):"",e.attributes.rtb.length>1?(0,t.createElement)(od,null,(0,t.createElement)(bd,{className:"remove-image-button remove-quote",onClick:()=>a(i)},"Remove this slide")):"")))}let m=e.attributes.headerLevel;return[(0,t.createElement)(hd,{key:"1"},(0,t.createElement)(sd,null,(0,t.createElement)(od,null,(0,t.createElement)(dd,{label:"Slider Type",help:"Use the rich text on the page editor to edit the full width cards option",selected:e.attributes.type,options:[{label:"Cards link to stories",value:"slider"},{label:"Full width image and text",value:"tabs"},{label:"RTB cards",value:"rtb"},{label:"Images",value:"img"}],onChange:t=>{e.setAttributes({type:t})}})),(0,t.createElement)(od,null,(0,t.createElement)(md,{label:"Choose a background",value:e.attributes.background,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({background:t})}})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Add a header to this region",value:e.attributes.header,onChange:t=>e.setAttributes({header:t})})),e.attributes.header?(0,t.createElement)(od,null,(0,t.createElement)(md,{label:"Heading level of the Header",value:e.attributes.headerLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({headerLevel:t})}})):"",e.attributes.header?(0,t.createElement)(od,null,(0,t.createElement)(dd,{label:"Choose how to align the header.",selected:e.attributes.headerLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({headerLocation:t})}})):"",(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})),"rtb"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Add Lead Text above Highlighted Text?",checked:e.attributes.hasLead,onChange:()=>e.setAttributes({hasLead:!e.attributes.hasLead})})):"","rtb"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(md,{label:"Choose the number of cards to display on desktop.",value:e.attributes.displayNumber,options:[{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"}],onChange:t=>{e.setAttributes({displayNumber:t})}})):"","img"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(md,{label:"Choose the type of the image.",value:e.attributes.imgType,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:t=>{e.setAttributes({imgType:t})}})):"","img"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Loop the slides?",checked:e.attributes.loop,onChange:()=>e.setAttributes({loop:!e.attributes.loop})})):"","img"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Link the image to the image file?",checked:e.attributes.linkImg,onChange:()=>e.setAttributes({linkImg:!e.attributes.linkImg})})):"","rtb"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Include dividers between cards?",checked:e.attributes.divider,onChange:()=>e.setAttributes({divider:!e.attributes.divider})})):"",(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Add CTA button?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Link text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",e.attributes.hasLink?(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Link URL",value:e.attributes.linkUrl,onChange:t=>e.setAttributes({linkUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(od,null,(0,t.createElement)(dd,{label:"Choose how to align the CTA.",selected:e.attributes.ctaLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({ctaLocation:t})}}))),d,"img"!==e.attributes.type?(0,t.createElement)(sd,null,(0,t.createElement)(bd,{className:"remove-image-button add-quote",onClick:(()=>{if("slider"===e.attributes.type){let t=[...e.attributes.cards];t.push({header:"",storyType:"",ctaText:"",ctaLink:"",external:!1,imageURL:"",imageAlt:"",tag:""}),e.setAttributes({cards:t})}else if("tabs"===e.attributes.type){let t=[...e.attributes.tabs];t.push({header:"",subtext:"",ctaText:"",ctaLink:"",external:!1,imageURL:"",imageAlt:""}),e.setAttributes({tabs:t})}else if("rtb"===e.attributes.type){let t=[...e.attributes.rtb];t.push({leadText:"",largeText:"",smallText:"",source:"",ctaText:"",ctaLink:"",external:!1}),e.setAttributes({rtb:t})}}).bind(void 0)},rd("Add Another Slide"))):""),(0,t.createElement)("div",{key:"2",className:"purdue-block-slider-editor"},1===e.attributes.cards.length&&""===e.attributes.cards[0].header&&1===e.attributes.rtb.length&&""===e.attributes.rtb[0].largeText&&1===e.attributes.tabs.length&&""===e.attributes.tabs[0].header&&"img"!==e.attributes.type?(0,t.createElement)("p",{style:{textAlign:"center"}},"Add new items using sidebar."):"",(0,t.createElement)("div",{class:`purdue-slider\n has-${e.attributes.background}-background section is-medium`},(0,t.createElement)("div",{class:"container"},(0,t.createElement)(m,{class:`purdue-slider__header align-${e.attributes.headerLocation}`}," ",e.attributes.header),"slider"===e.attributes.type&&e.attributes.cards.length>0?(0,t.createElement)(pd,null,(0,t.createElement)("div",{class:"glide purdue-slider--default"},(0,t.createElement)("div",{class:"glide__track","data-glide-el":"track"},(0,t.createElement)("div",{class:"glide__slides"},e.attributes.cards.map((e=>(0,t.createElement)("div",{class:"glide__slide card"},e.imageURL?(0,t.createElement)("div",{class:"image is-2by1 background-image",role:"img",style:{backgroundImage:`url(${e.imageURL})`},"aria-label":"card.imageAlt"}):"",(0,t.createElement)("div",{class:"content"},e.storyType?(0,t.createElement)("p",{class:"story-type"},e.storyType):"",(0,t.createElement)("p",{class:"story-title"},e.header),e.ctaLink?(0,t.createElement)("div",{class:"read-more purdue-blocks__button purdue-blocks__button--gold-light purdue-blocks__button--outline"},(0,t.createElement)("span",null,e.ctaText)):"",e.tag?(0,t.createElement)("p",{class:"story-tag"},e.tag):"")))))),(0,t.createElement)("div",{class:"glide__bullets","data-glide-el":"controls[nav]"},e.attributes.cards.map(((e,a)=>(0,t.createElement)("button",{class:"glide__bullet","data-glide-dir":a})))),(0,t.createElement)("div",{class:"glide__arrows","data-glide-el":"controls"},(0,t.createElement)("button",{class:"glide__arrow glide__arrow--left","data-glide-dir":"<"},"prev"),(0,t.createElement)("button",{class:"glide__arrow glide__arrow--right","data-glide-dir":">"},"next")))):"","tabs"===e.attributes.type&&e.attributes.tabs.length>0?(0,t.createElement)("div",{class:"glide purdue-slider--tabs"},(0,t.createElement)("div",{class:"glide__track","data-glide-el":"track"},(0,t.createElement)("div",{class:"glide__slides"},e.attributes.tabs.map(((a,r)=>(0,t.createElement)("div",{class:"glide__slide columns"},(0,t.createElement)("div",{class:"column image-column"},(0,t.createElement)(gd,null,(0,t.createElement)(vd,{onSelect:e=>o(e,r),render:e=>{let{open:n}=e;return""!==a.imageURL?(0,t.createElement)("div",{class:"image background-image",role:"img",style:{backgroundImage:`url(${a.imageURL})`}},(0,t.createElement)(bd,{className:"remove-image-button",onClick:n},"Select a New Image"),(0,t.createElement)(bd,{className:"remove-image-button",onClick:()=>l(r)},"Remove image")):(0,t.createElement)(bd,{className:"remove-image-button",onClick:n},"Open Media Library")}}))),(0,t.createElement)("div",{class:"content column"},(0,t.createElement)(fd,{tagname:"p",value:a.header,className:"story-title",onChange:e=>i(e,r),placeholder:"Header...",keepPlaceholderOnFocus:!0}),(0,t.createElement)(fd,{tagname:"p",value:a.subtext,className:"story-subtext",onChange:t=>((t,a)=>{if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].subtext=t,e.setAttributes({tabs:l})}})(t,r),placeholder:"Subtext...",keepPlaceholderOnFocus:!0}),a.ctaLink?(0,t.createElement)("div",{class:"purdue-blocks__button purdue-blocks__button--gold-light"},(0,t.createElement)("span",null,a.ctaText)):""))))))):"","rtb"===e.attributes.type&&e.attributes.rtb.length>0?(0,t.createElement)(pd,null,(0,t.createElement)("div",{class:"glide purdue-slider--rtb"+(e.attributes.divider?" has-divider":""),"data-number":e.attributes.displayNumber},(0,t.createElement)("div",{class:"glide__track","data-glide-el":"track"},(0,t.createElement)("div",{class:"glide__slides"},e.attributes.rtb.map((a=>(0,t.createElement)("div",{class:"glide__slide"},(0,t.createElement)("div",{class:"pu-proofpoint "+(e.attributes.hasLead?" pu-proofpoint__has-lead":"")},(0,t.createElement)("div",{class:"container"},a.leadText&&e.attributes.hasLead?(0,t.createElement)("span",{class:"lead-text pu-proofpoint__lead"},a.leadText):"",a.largeText?(0,t.createElement)("span",{class:"large-text pu-proofpoint__highlighted"},a.largeText):"",a.smallText?(0,t.createElement)("span",{class:"small-text pu-proofpoint__content"},a.smallText):"",a.source?(0,t.createElement)("span",{class:"source pu-proofpoint__source"},a.source):"",a.ctaLink?(0,t.createElement)("div",{class:"pu-proofpoint__button purdue-blocks__button purdue-blocks__button--gold-light"},(0,t.createElement)("span",null,a.ctaText)):""))))))),(0,t.createElement)("div",{class:"glide__bullets","data-glide-el":"controls[nav]"},e.attributes.rtb.map(((e,a)=>(0,t.createElement)("button",{class:"glide__bullet","data-glide-dir":a})))),(0,t.createElement)("div",{class:"glide__arrows","data-glide-el":"controls"},(0,t.createElement)("button",{class:"glide__arrow glide__arrow--left","data-glide-dir":"<"},"prev"),(0,t.createElement)("button",{class:"glide__arrow glide__arrow--right","data-glide-dir":">"},"next")))):"","img"===e.attributes.type?(0,t.createElement)(gd,null,(0,t.createElement)(vd,{addToGallery:!0,multiple:!0,gallery:!0,onSelect:t=>{e.setAttributes({imgs:t}),console.log(e.attributes.imgs)},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{class:"image-slider-editor"},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},0===e.attributes.imgs.length?"Select images":"Select new images")),e.attributes.imgs.length>0?(0,t.createElement)(pd,null,(0,t.createElement)("div",{className:`glide purdue-slider--img${e.attributes.loop?" purdue-slider--img-loop":""}${"vertical"===e.attributes.imgType?"purdue-slider--img-vertical":""}`},(0,t.createElement)("div",{class:"glide__track","data-glide-el":"track"},(0,t.createElement)("div",{class:"glide__slides"},e.attributes.imgs.map(((a,l)=>e.attributes.linkImg?(0,t.createElement)("a",{className:"glide__slide",href:a.url,target:"_blank"},(0,t.createElement)("figure",null,(0,t.createElement)("img",{src:a.url,alt:a.alt}),(0,t.createElement)("figcaption",null,a.caption))):(0,t.createElement)("figure",{className:"glide__slide"},(0,t.createElement)("img",{src:a.url,alt:a.alt}),(0,t.createElement)("figcaption",null,a.caption)))))),(0,t.createElement)("div",{class:"glide__bullets","data-glide-el":"controls[nav]"},e.attributes.imgs.map(((e,a)=>(0,t.createElement)("button",{class:"glide__bullet","data-glide-dir":a})))),(0,t.createElement)("div",{class:"glide__arrows","data-glide-el":"controls"},(0,t.createElement)("button",{class:"glide__arrow glide__arrow--left","data-glide-dir":"<"},"prev"),(0,t.createElement)("button",{class:"glide__arrow glide__arrow--right","data-glide-dir":">"},"next")))):"")}})):"",e.attributes.hasLink&&e.attributes.linkUrl?(0,t.createElement)(pd,null,(0,t.createElement)("div",{className:`purdue-slider__button-container align-${e.attributes.ctaLocation}`},(0,t.createElement)("div",{class:"purdue-slider__button purdue-blocks__button "+("black"===e.attributes.background?"purdue-blocks__button--gold-dark":"purdue-blocks__button--gold-light")},(0,t.createElement)("span",null,e.attributes.linkText)))):"")))]}});const{__:wd}=wp.i18n,{registerBlockType:_d}=wp.blocks,{PanelBody:xd,PanelRow:Cd,CheckboxControl:Nd,TextareaControl:Td,TextControl:Ad,RadioControl:Ld,SelectControl:Sd,Button:Bd,Disabled:Hd}=wp.components,{InspectorControls:Ud,MediaUploadCheck:Id,MediaUpload:Pd,useBlockProps:Md}=wp.blockEditor,{apiFetch:$d}=wp,{useState:Rd}=wp.element;_d("purdue-blocks/rtb-cards",{title:wd("Reason to believe cards"),description:wd("Create one or more Reason to believe cards."),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Bookmark",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",d:"M87.5,9.37V100L50,78.12,12.5,100V9.37A9.38,9.38,0,0,1,21.87,0H78.13A9.38,9.38,0,0,1,87.5,9.37Zm-9.37,1.18A1.18,1.18,0,0,0,77,9.37H23.05a1.18,1.18,0,0,0-1.18,1.18V83.68L50,67.27,78.13,83.68Z",transform:"translate(-12.5 0)"})))),category:"purdue-blocks",keywords:[],edit:e=>{let a;if(0===e.attributes.rtb.length&&e.setAttributes({rtb:[{hasLead:!1,leadText:"",largeText:"",smallText:"",source:"",ctaText:"",ctaLink:"",external:!1}]}),e.attributes.rtb.length>0){let l=e.attributes.rtb.length-1;a=e.attributes.rtb.map(((a,r)=>(0,t.createElement)(xd,{key:r,className:"quote-block-details",title:`Card ${r+1} Details`,initialOpen:!0},(0,t.createElement)(Cd,null,(0,t.createElement)(Nd,{label:"Add a lead text at the top?",checked:a.hasLead,onChange:()=>(t=>{let a=[...e.attributes.rtb];a[t].hasLead=!a[t].hasLead,e.setAttributes({rtb:a})})(r)})),a.hasLead?(0,t.createElement)(Cd,null,(0,t.createElement)(Td,{label:"Lead Text",value:a.leadText,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].leadText=t,e.setAttributes({rtb:l})})(t,r)})):"",(0,t.createElement)(Cd,null,(0,t.createElement)(Td,{label:"Highlighted Text",value:a.largeText,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].largeText=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Td,{label:"Small Text",value:a.smallText,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].smallText=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Td,{label:"Source",value:a.source,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].source=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ad,{label:"Button Text",value:a.ctaText,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].ctaText=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ad,{label:"Button Link address",value:a.ctaLink,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].ctaLink=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Nd,{label:"Open link in new tab?",checked:a.external,onChange:()=>(t=>{let a=[...e.attributes.rtb];a[t].external=!a[t].external,e.setAttributes({rtb:a})})(r)})),e.attributes.rtb.length>1?(0,t.createElement)("hr",null):"",e.attributes.rtb.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this card:")),r(t=>{let a=[...e.attributes.rtb],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({rtb:a})})(r),icon:Ps}):"",r>0?(0,t.createElement)(Bd,{className:"remove-image-button move-quote",onClick:()=>(t=>{let a=[...e.attributes.rtb],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({rtb:a})})(r),icon:Ms}):""):"",e.attributes.rtb.length>1?(0,t.createElement)("hr",null):"",e.attributes.rtb.length>1?(0,t.createElement)(Cd,null,(0,t.createElement)(Bd,{className:"remove-image-button remove-quote",onClick:()=>(t=>{let a=[...e.attributes.rtb];a.splice(t,1),e.setAttributes({rtb:a})})(r)},"Remove this card")):"")))}return[(0,t.createElement)(Ud,{key:"1"},(0,t.createElement)(xd,null,(0,t.createElement)(Cd,null,(0,t.createElement)(Sd,{label:"Choose a background",value:e.attributes.background,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({background:t})}})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ad,{label:"Add a header",help:"Add a header to this region.",value:e.attributes.header,onChange:t=>e.setAttributes({header:t})})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ld,{label:"Choose how to align the header.",selected:e.attributes.headerLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({headerLocation:t})}})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ad,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})),(0,t.createElement)(Cd,null,(0,t.createElement)(Sd,{label:"Choose the number of clumns to display on desktop.",value:e.attributes.columns,options:[{label:"Auto",value:"auto"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"5",value:"5"},{label:"6",value:"6"}],onChange:t=>{e.setAttributes({columns:t})}})),(0,t.createElement)(Cd,null,(0,t.createElement)(Nd,{label:"Add divider between columns?",checked:e.attributes.divider,onChange:()=>{e.setAttributes({divider:!e.attributes.divider})}}))),a,(0,t.createElement)(xd,null,(0,t.createElement)(Bd,{className:"remove-image-button add-quote",onClick:(()=>{let t=[...e.attributes.rtb];t.push({hasLead:!1,leadText:"",largeText:"",smallText:"",source:"",ctaText:"",ctaLink:"",external:!1}),e.setAttributes({rtb:t})}).bind(void 0)},wd("Add Another Card")))),(0,t.createElement)("div",{key:"2",className:"purdue-block-rtb-cards-editor"},1===e.attributes.rtb.length&&""===e.attributes.rtb[0].largeText?(0,t.createElement)("p",{style:{textAlign:"center"}},"Add items using sidebar."):"",(0,t.createElement)(Hd,null,(0,t.createElement)("div",{class:`purdue-rtb-card-container\n has-${e.attributes.background}-background section is-medium`},(0,t.createElement)("div",{class:"container"},e.attributes.header?(0,t.createElement)("h2",null,e.attributes.header):"",e.attributes.rtb.length>0?(0,t.createElement)("div",{class:"columns"+(e.attributes.divider?" has-divider":"")},e.attributes.rtb.map((a=>(0,t.createElement)("div",{class:`column${"2"===e.attributes.columns?" is-half-desktop is-half-tablet is-full-mobile":""}\n ${"3"===e.attributes.columns?" is-one-third-desktop is-half-tablet is-full-mobile":""}\n ${"4"===e.attributes.columns?" is-one-quarter-desktop is-half-tablet is-full-mobile":""}\n ${"5"===e.attributes.columns?" is-one-fifth-desktop is-half-tablet is-full-mobile":""}\n ${"6"===e.attributes.columns?" is-one-sixth-desktop is-half-tablet is-full-mobile":""}\n `},(0,t.createElement)("div",{class:"pu-proofpoint"+(a.hasLead?" pu-proofpoint__has-lead":"")},(0,t.createElement)("div",{class:"container"},a.leadText&&a.hasLead?(0,t.createElement)("span",{class:"lead-text pu-proofpoint__lead"},a.leadText):"",a.largeText?(0,t.createElement)("span",{class:"large-text pu-proofpoint__highlighted"},a.largeText):"",a.smallText?(0,t.createElement)("span",{class:"small-text pu-proofpoint__content"},a.smallText):"",a.source?(0,t.createElement)("span",{class:"source pu-proofpoint__source"},a.source):"",a.ctaLink?(0,t.createElement)("div",{class:"pu-proofpoint__button purdue-blocks__button purdue-blocks__button--gold-light"},(0,t.createElement)("span",null,a.ctaText)):"")))))):""))))]}});var Od=a(16941),Dd=a(41609),Vd=a.n(Dd);const{Fragment:Gd}=wp.element,{MediaUpload:Fd}=wp.blockEditor,{PanelRow:Zd,Button:qd,TextControl:zd,TextareaControl:jd,CheckboxControl:Wd}=wp.components,{useState:Yd}=wp.element;var Xd=e=>{let{onSave:a,initialState:l={header:"",media:{url:"",alt:""},subtext:"",buttonLabel:"",buttonLink:"",newtab:!1}}=e;const[r,n]=Yd(l.header),[s,o]=Yd(l.media),[i,c]=Yd(l.subtext),[u,d]=Yd(l.buttonLink),[m,b]=Yd(l.buttonLabel),[p,h]=Yd(l.newtab),[g,v]=Yd(!1);let E="Add Image";return Vd()(s.url)||(E="Replace Image"),(0,t.createElement)(Gd,null,g&&(0,t.createElement)("p",{style:{color:"#ff5454",fontWeight:"bold"}},"Please add a header before saving."),(0,t.createElement)(Zd,null,(0,t.createElement)(zd,{label:"Header",onChange:e=>{g&&v(!1),n(e)},value:r})),!Vd()(s.url)&&(0,t.createElement)(Zd,null,(0,t.createElement)("img",{src:s.url})),(0,t.createElement)(Zd,null,(0,t.createElement)(Fd,{onSelect:e=>{o({url:e.url,alt:e.alt})},allowedTypes:["image"],render:e=>{let{open:a}=e;return(0,t.createElement)(qd,{isSecondary:!0,onClick:a},E)}})),(0,t.createElement)(Zd,null,(0,t.createElement)(zd,{label:"Button Label",onChange:e=>{b(e)},value:m})),(0,t.createElement)(Zd,null,(0,t.createElement)(zd,{label:"Button URL",type:"url",onChange:e=>{d(e)},value:u})),(0,t.createElement)(Zd,null,(0,t.createElement)(Wd,{label:"Open link in new tab?",checked:p,onChange:()=>{h(!p)}})),(0,t.createElement)(Zd,null,(0,t.createElement)(qd,{isPrimary:!0,onClick:()=>{r.length<1?v(!0):a({header:r,media:s,subtext:i,buttonLink:u,buttonLabel:m,newtab:p})}},"Save")))};const{__:Kd}=wp.i18n,{registerBlockType:Qd}=wp.blocks,{PanelBody:Jd,PanelRow:em,CheckboxControl:tm,TextareaControl:am,TextControl:lm,RadioControl:rm,SelectControl:nm,Button:sm,Disabled:om,Placeholder:im}=wp.components,{InspectorControls:cm,MediaUploadCheck:um,MediaUpload:dm,useBlockProps:mm,RichText:bm}=wp.blockEditor,{useState:pm,Fragment:hm}=wp.element,{isEmpty:gm}=_;Qd("purdue-blocks/purdue-vertical-slider",{title:Kd("Purdue Vertical Slider"),description:Kd("Create a vertical slider. Can only have one on each page. Please edit the subtext through the the page editor after the slide is added."),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],edit:e=>{const{className:a,setAttributes:l}=e,{background:r,tabs:n,id:s}=e.attributes,[o,i]=pm(!1);return[(0,t.createElement)(cm,{key:"1"},(0,t.createElement)(Jd,null,(0,t.createElement)(em,null,(0,t.createElement)(nm,{label:"Choose a background",value:e.attributes.background,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({background:t})}})),(0,t.createElement)(em,null,(0,t.createElement)(lm,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})}))),(0,t.createElement)(Jd,{title:Kd("Slides")},(0,t.createElement)(em,null,(0,t.createElement)(Od.ReactSortable,{list:n,setList:e=>{const t=[],a=[];n.map((e=>t.push(e.header))),e.map((e=>a.push(e.header))),_.isEqual(t,a)||l({tabs:e})},className:"sortable-posts"},n.map(((e,a)=>(0,t.createElement)(Jd,{initialOpen:!1,key:e.header,title:e.header},(0,t.createElement)(Xd,{initialState:e,onSave:e=>{((e,t)=>{const a=[...n];a[e]=t,l({tabs:a})})(a,e)}}),(0,t.createElement)(sm,{style:{marginTop:"5px"},isSecondary:!0,onClick:()=>{(e=>{const t=n.filter((t=>t.header!==e));l({tabs:t})})(e.header)}},"Remove Item")))))),(o||0===n.length)&&(0,t.createElement)(hm,null,(0,t.createElement)(Xd,{onSave:e=>{i(!1),l({tabs:[...n,e]})}})),(0,t.createElement)("hr",null),(0,t.createElement)(em,null,(0,t.createElement)(sm,{isPrimary:!0,onClick:()=>{i(!0)}},"Add New Slide")))),(0,t.createElement)("div",{key:"2",className:"purdue-block-slider-editor"},gm(n)?(0,t.createElement)(im,null,Kd("Add slides using the sidebar. Please edit the subtext through the the editor after the slide is added.")):(0,t.createElement)("div",{className:"purdue-slider-vertical has-white-background section is-medium"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"vertical-slides-container"},n.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"vertical-slide"+(0===a?" active":"")},(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column image-column"},(0,t.createElement)("div",{className:"image background-image",style:{backgroundImage:`url(${e.media.url})`},"aria-label":e.media.alt})),(0,t.createElement)("div",{className:"column content"},(0,t.createElement)("div",{className:"content-wrap"},(0,t.createElement)("h2",{className:"title"},e.header),(0,t.createElement)(bm,{tagname:"p",value:e.subtext,className:"subtext",onChange:e=>((e,t)=>{const a=[...n];a[t].subtext=e,l({tabs:a})})(e,a),placeholder:"Subtext...",keepPlaceholderOnFocus:!0}),""!==e.buttonLink?(0,t.createElement)("div",{className:"purdue-blocks__button purdue-blocks__button--gold-light"},e.buttonLabel):""))))))),(0,t.createElement)("div",{className:"slider-bullets"},n.map(((e,a)=>(0,t.createElement)("button",{className:"slider-bullet"+(0===a?" active":""),"data-controls":`${a}`,"aria-label":`slide ${a+1}`,onClick:(e,t)=>{e.target.parentElement.querySelectorAll(".slider-bullet").forEach(((e,t)=>{e.classList.remove("active")})),e.target.classList.add("active");let a=e.target.parentElement.previousSibling.querySelectorAll(".vertical-slide");a.forEach(((e,t)=>{e.style.visibility="hidden",e.style.opacity=0})),a[e.target.dataset.controls].style.visibility="inherit",a[e.target.dataset.controls].style.opacity="1"}})))))))]}});const{__:vm}=wp.i18n,{registerBlockType:Em}=wp.blocks,{PanelBody:fm,PanelRow:km,CheckboxControl:ym,TextareaControl:wm,SelectControl:_m,TextControl:xm,RadioControl:Cm,Button:Nm,Disabled:Tm}=wp.components,{RichText:Am,InspectorControls:Lm,MediaUploadCheck:Sm,MediaUpload:Bm,InnerBlocks:Hm,useBlockProps:Um}=wp.blockEditor,{select:Im}=wp.data,Pm=[["core/paragraph",{placeholder:"Optional subtext"}]];Em("purdue-blocks/profile-hero",{title:vm("Profile Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{storyTitle:{type:"string",source:"html",selector:".story-title"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},position:{type:"string",default:"left"}},supports:{className:!1,anchor:!0},description:vm("Adds a hero with a profile image."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(Lm,null,(0,t.createElement)(fm,null,(0,t.createElement)(km,null,(0,t.createElement)(Cm,{label:"Image Position",selected:e.attributes.position,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({position:t})}})),(0,t.createElement)(km,null,(0,t.createElement)(wm,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"pu-profile-hero pu-profile-hero-editor"+("right"===e.attributes.position?" pu-profile-hero--right":"")},(0,t.createElement)("div",{className:"section is-large"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column is-two-fifths-desktop is-full-mobile"},(0,t.createElement)(Sm,null,(0,t.createElement)(Bm,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"background-image image is-1by1",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{className:"remove-image-button",onClick:a},"Remove image"):""))}}))),(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"pu-profile-hero__content"},(0,t.createElement)(Am,{tagName:"h1",value:e.attributes.storyTitle,className:"story-title",onChange:t=>{e.setAttributes({storyTitle:t})},placeholder:"Add header",keepPlaceholderOnFocus:!0}),(0,t.createElement)(Hm,{template:Pm,templateLock:!1})))))))]},save:e=>{const a=Um.save();return(0,t.createElement)("div",x({},a,{className:"pu-profile-hero "+("right"===e.attributes.position?" pu-profile-hero--right":"")}),(0,t.createElement)("div",{className:"section is-large"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column is-two-fifths-desktop is-full-mobile"},(0,t.createElement)("div",{role:e.attributes.altText?"img":"",className:"background-image image is-1by1","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}})),(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"pu-profile-hero__content"},e.attributes.storyTitle?(0,t.createElement)(Am.Content,{tagName:"h1",value:e.attributes.storyTitle,className:"story-title"}):"",(0,t.createElement)(Hm.Content,null)))))))}});const{Fragment:Mm}=wp.element,{MediaUpload:$m}=wp.blockEditor,{PanelRow:Rm,Button:Om,TextControl:Dm,TextareaControl:Vm,CheckboxControl:Gm}=wp.components,{useState:Fm}=wp.element;var Zm=e=>{let{onSave:a,initialState:l={title:"",media:{url:"",alt:""},subtext:"",link:"",newtab:!1}}=e;const[r,n]=Fm(l.title),[s,o]=Fm(l.media),[i,c]=Fm(l.subtext),[u,d]=Fm(l.link),[m,b]=Fm(l.newtab),[p,h]=Fm(!1);let g="Add Image";return Vd()(s.url)||(g="Replace Image"),(0,t.createElement)(Mm,null,p&&(0,t.createElement)("p",{style:{color:"#ff5454",fontWeight:"bold"}},"Please add a title before saving."),(0,t.createElement)(Rm,null,(0,t.createElement)(Dm,{label:"Title",onChange:e=>{p&&h(!1),n(e)},value:r})),!Vd()(s.url)&&(0,t.createElement)(Rm,null,(0,t.createElement)("img",{src:s.url})),(0,t.createElement)(Rm,null,(0,t.createElement)($m,{onSelect:e=>{o({url:e.url,alt:e.alt})},allowedTypes:["image"],render:e=>{let{open:a}=e;return(0,t.createElement)(Om,{isSecondary:!0,onClick:a},g)}})),(0,t.createElement)(Rm,null,(0,t.createElement)(Vm,{label:"Subtext",onChange:e=>{c(e)},value:i})),(0,t.createElement)(Rm,null,(0,t.createElement)(Dm,{label:"Button URL",type:"url",onChange:e=>{d(e)},value:u})),(0,t.createElement)(Rm,null,(0,t.createElement)(Gm,{label:"Open link in new tab?",checked:m,onChange:()=>{b(!m)}})),(0,t.createElement)(Rm,null,(0,t.createElement)(Om,{isPrimary:!0,onClick:()=>{r.length<1?h(!0):a({title:r,media:s,subtext:i,link:u,newtab:m})}},"Save")))};window.wp["icons/buildTypes"];const{__:qm}=wp.i18n,{registerBlockType:zm}=wp.blocks,{PanelBody:jm,PanelRow:Wm,CheckboxControl:Ym,TextareaControl:Xm,TextControl:Km,RadioControl:Qm,SelectControl:Jm,Button:eb,Disabled:tb,Placeholder:ab}=wp.components,{InspectorControls:lb,MediaUploadCheck:rb,MediaUpload:nb,useBlockProps:sb}=wp.blockEditor,{useState:ob,Fragment:ib}=wp.element,{isEmpty:cb}=_;zm("purdue-blocks/link-cards",{title:qm("Purdue Link Cards"),description:qm("Create a grid of cards with links."),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],edit:e=>{const{className:a,setAttributes:l}=e,{header:r,headerLocation:n,background:s,tabs:o,id:i,columns:c}=e.attributes,[u,d]=ob(!1);return[(0,t.createElement)(lb,{key:"1"},(0,t.createElement)(jm,null,(0,t.createElement)(Wm,null,(0,t.createElement)(Jm,{label:"Choose a background",value:s,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:e=>{l({background:e})}})),(0,t.createElement)(Wm,null,(0,t.createElement)(Km,{label:"Add a header",help:"Add a header to this region.",value:r,onChange:e=>l({header:e})})),(0,t.createElement)(Wm,null,(0,t.createElement)(Qm,{label:"Choose how to align the header.",selected:n,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:e=>{l({headerLocation:e})}})),(0,t.createElement)(Wm,null,(0,t.createElement)(Km,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:i,onChange:e=>l({id:e})})),(0,t.createElement)(Wm,null,(0,t.createElement)(Jm,{label:"Number of Columns",value:c,options:[{value:"3",label:"Three Columns"},{value:"4",label:"Four Columns"}],onChange:e=>{l({columns:e})}}))),(0,t.createElement)(jm,{title:qm("Cards")},(0,t.createElement)(Wm,null,(0,t.createElement)(Od.ReactSortable,{list:o,setList:e=>{const t=[],a=[];o.map((e=>t.push(e.title))),e.map((e=>a.push(e.title))),_.isEqual(t,a)||l({tabs:e})},className:"sortable-posts"},o.map(((e,a)=>(0,t.createElement)(jm,{initialOpen:!1,key:e.title,title:e.title},(0,t.createElement)(Zm,{initialState:e,onSave:e=>{((e,t)=>{const a=[...o];a[e]=t,l({tabs:a})})(a,e)}}),(0,t.createElement)(eb,{style:{marginTop:"5px"},isSecondary:!0,onClick:()=>{(e=>{const t=o.filter((t=>t.title!==e));l({tabs:t})})(e.title)}},"Remove Item")))))),(u||0===o.length)&&(0,t.createElement)(ib,null,(0,t.createElement)(Zm,{onSave:e=>{d(!1),l({tabs:[...o,e]})}})),(0,t.createElement)("hr",null),(0,t.createElement)(Wm,null,(0,t.createElement)(eb,{isPrimary:!0,onClick:()=>{d(!0)}},"Add New Card")))),(0,t.createElement)("div",{key:"2",className:"purdue-block-slider-editor"},cb(o)?(0,t.createElement)(ab,null,qm("Add cards using the sidebar.")):(0,t.createElement)(tb,null,(0,t.createElement)("div",{className:`purdue-link-cards has-${s}-background section is-medium`},(0,t.createElement)("div",{className:"container"},r?(0,t.createElement)("h2",{className:`section-header align-${n}`},r):"",(0,t.createElement)("div",{className:"columns is-multiline"},o.map((e=>(0,t.createElement)("div",{className:"column is-half-tablet is-full-mobile"+("4"==c?" is-one-quarter-desktop":" is-one-third-desktop")},(0,t.createElement)("div",{className:"card media link-card"},(0,t.createElement)("div",{className:"image is-16by9 background-image",style:{backgroundImage:`url(${e.media.url})`}}),(0,t.createElement)("div",{classNmae:"media-content"},(0,t.createElement)("p",{className:"title is-4"},e.title),e.subtext?(0,t.createElement)("p",{className:"vertical-subtext"},e.subtext):""))))))))))]}});const{__:ub}=wp.i18n,{registerBlockType:db}=wp.blocks,{PanelBody:mb,PanelRow:bb,CheckboxControl:pb,TextareaControl:hb,TextControl:gb,RadioControl:vb,SelectControl:Eb,Button:fb,Disabled:kb}=wp.components,{InspectorControls:yb,MediaUploadCheck:wb,MediaUpload:_b,useBlockProps:xb,RichText:Cb}=wp.blockEditor;db("purdue-blocks/image-gallery",{title:ub("Image Gallery"),description:ub("Create an image gallery."),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],edit:e=>[(0,t.createElement)(yb,{key:"1"},(0,t.createElement)(mb,null,(0,t.createElement)(bb,null,(0,t.createElement)(vb,{label:"Choose how to align the header.",selected:e.attributes.headerLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({headerLocation:t})}})),(0,t.createElement)(bb,null,(0,t.createElement)(vb,{label:"Choose how to align the content.",selected:e.attributes.contentAlign,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({contentAlign:t})}})),(0,t.createElement)(bb,null,(0,t.createElement)(Eb,{label:"Number of Columns",value:e.attributes.columns,options:[{value:"3",label:"Three Columns"},{value:"4",label:"Four Columns"}],onChange:t=>{e.setAttributes({columns:t})}})),(0,t.createElement)(bb,null,(0,t.createElement)(pb,{label:"Remove space at the bottom?",checked:!e.attributes.hasBottomPadding,onChange:()=>{e.setAttributes({hasBottomPadding:!e.attributes.hasBottomPadding})}})),(0,t.createElement)(bb,null,(0,t.createElement)(gb,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})))),(0,t.createElement)("div",{key:"2",className:"purdue-image-gallery purdue-image-gallery-editor section is-medium"+(e.attributes.hasBottomPadding?"":" no-bottom-padding")},(0,t.createElement)("div",{class:"container"},(0,t.createElement)(Cb,{tagName:"h2",value:e.attributes.header,className:`purdue-image-gallery__header align-${e.attributes.headerLocation}`,onChange:t=>{e.setAttributes({header:t})},placeholder:"Add header (optional)",keepPlaceholderOnFocus:!0}),(0,t.createElement)(Cb,{tagName:"p",value:e.attributes.content,className:`purdue-image-gallery__content align-${e.attributes.contentAlign}`,onChange:t=>{e.setAttributes({content:t})},placeholder:"Add Text (optional)",keepPlaceholderOnFocus:!0}),(0,t.createElement)(wb,null,(0,t.createElement)(_b,{addToGallery:!0,multiple:!0,gallery:!0,onSelect:t=>{e.setAttributes({imgs:t})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{class:"image-slider-editor"},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},0===e.attributes.imgs.length?"Select images":"Select new images")),e.attributes.imgs.length>0?(0,t.createElement)("div",{className:"columns is-multiline"},e.attributes.imgs.map(((a,l)=>(0,t.createElement)("div",{className:`column${"4"===e.attributes.columns?" is-one-quarter-desktop":" is-one-third-desktop"} is-half-tablet is-full-mobile`},(0,t.createElement)("div",{className:"image-gallery-open"+(a.caption?"":" image-no-caption"),"data-toggle":a.id},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${a.url})`},"aria-label":a.alt}),a.caption?(0,t.createElement)("button",{className:"image-modal-button","aria-label":"More information"},(0,t.createElement)("i",{class:"fas fa-plus","aria-hidden":"true"})):""),a.caption?(0,t.createElement)("div",{className:"image-modal-content","data-modal":a.id},(0,t.createElement)("div",{className:"image-modal-close"},(0,t.createElement)("p",null,a.caption)),(0,t.createElement)("button",{className:"image-modal-button","aria-label":"close"},(0,t.createElement)("i",{class:"fas fa-minus","aria-hidden":"true"}))):"")))):"")}}))))]});const{__:Nb}=wp.i18n,{registerBlockType:Tb}=wp.blocks,{PanelBody:Ab,PanelRow:Lb,RangeControl:Sb,CheckboxControl:Bb,TextControl:Hb}=wp.components,{InnerBlocks:Ub,InspectorControls:Ib,RichText:Pb,useBlockProps:Mb}=wp.blockEditor;Tb("purdue-blocks/video-embed",{title:Nb("Video Embed"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"})),category:"purdue-blocks",keywords:[],attributes:{urlText:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:Nb("Add this block and paste the YouTube video link to embed it."),edit:e=>{const a=e.attributes.urlText.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/),l=!(!a||11!=a[7].length)&&a[7];return[(0,t.createElement)(Ib,null,(0,t.createElement)(Ab,null,(0,t.createElement)(Lb,null,(0,t.createElement)(Hb,{className:"purdue_video_url",placeholder:"YouTube URL",value:e.attributes.urlText,onChange:t=>e.setAttributes({urlText:t})})))),(0,t.createElement)("div",{className:"purdue_video"},(0,t.createElement)("iframe",{title:"",src:`https://www.youtube.com/embed/${l}`,frameborder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",rel:"0",allowfullscreen:!0}))]},save:e=>{const a=Mb.save(),l=e.attributes.urlText.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/),r=!(!l||11!=l[7].length)&&l[7];return(0,t.createElement)("div",x({},a,{className:"purdue_video"}),(0,t.createElement)("iframe",{id:"player",type:"text/html",src:`https://www.youtube.com/embed/${r}?modestbranding=1&rel=0&theme=light&controls=0&enablejsapi=1`,frameborder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",rel:"0",allowfullscreen:!0}),(0,t.createElement)("div",{className:"purdue_video_controls"},(0,t.createElement)("div",{className:"purdue_video_controls_pause"},(0,t.createElement)("div",{className:"purdue_video_controls_pause_share"},(0,t.createElement)("button",{className:"purdue_video_controls_pause_share_share"},(0,t.createElement)("i",{className:"fas fa-share video-embed__share"})," Share"),(0,t.createElement)("button",{id:"play",className:"purdue_video_controls_pause_share_play"},(0,t.createElement)("span",{className:"purdue_video_controls_pause_share_play_border"},(0,t.createElement)("i",{className:"fas fa-play"}),(0,t.createElement)("i",{class:"fas fa-pause hidden"})))),(0,t.createElement)("div",{className:"purdue_video_controls_pause_button"})),(0,t.createElement)("div",{className:"purdue_video_controls_black"},(0,t.createElement)("div",{className:"purdue_video_controls_black_elapsed"}),(0,t.createElement)("div",{className:"purdue_video_controls_black_timeline"},(0,t.createElement)("span",{className:"time_elapsed"})),(0,t.createElement)("div",{className:"purdue_video_controls_black_total"}),(0,t.createElement)("div",{className:"purdue_video_controls_black_volume"},(0,t.createElement)("i",{class:"fas fa-volume-up"}),(0,t.createElement)("i",{class:"fas fa-volume-mute hidden"})),(0,t.createElement)("div",{className:"purdue_video_controls_black_fullscreen"},(0,t.createElement)("i",{class:"fas fa-expand"})))),(0,t.createElement)("div",{class:"modal"},(0,t.createElement)("div",{class:"modal-background"}),(0,t.createElement)("div",{class:"modal-content"},(0,t.createElement)("div",{class:"top_article_data"},(0,t.createElement)("div",{class:"top_article_data_share"},(0,t.createElement)("a",{id:"share_text",class:"top_article_data_share_text ",target:"_blank","aria-label":`Share link https://youtu.be/${r}`,href:`https://youtu.be/${r}`,title:"Share link",rel:"noopener noreferrer"},`https://youtu.be/${r}`),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://www.facebook.com/sharer/sharer.php?u=https://youtu.be/${r}`,title:"Share on Facebook",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-facebook-f"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://www.linkedin.com/sharing/share-offsite/?url=https://youtu.be/${r}`,title:"Share on Linkedin",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-linkedin-in"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://twitter.com/intent/tweet?text=https://youtu.be/${r}`,title:"Share on Twitter",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-twitter"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`mailto:?subject=&body=https://youtu.be/${r}`,title:"{{ Drupal.t('Share via Email') }}",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fas fa-envelope"}))))),(0,t.createElement)("button",{class:"modal-close is-large","aria-label":"close"})))}});const{__:$b}=wp.i18n,{registerBlockType:Rb}=wp.blocks,{Placeholder:Ob,Button:Db,FormFileUpload:Vb,SelectControl:Gb,IconButton:Fb,PanelBody:Zb,PanelRow:qb,Toolbar:zb,BaseControl:jb,TextControl:Wb}=wp.components,{InnerBlocks:Yb,InspectorControls:Xb,RichText:Kb,useBlockProps:Qb}=wp.blockEditor,{Component:Jb,Fragment:ep}=wp.element;Rb("purdue-blocks/icon-group",{title:$b("Icon Group"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"photo-video",className:"svg-inline--fa fa-photo-video fa-w-20 fa-7x",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M144 343.78a48 48 0 1 0 48 48 48 48 0 0 0-48-48zM101.74 213a37 37 0 0 0 52.36 0l78.56-78.44A79.06 79.06 0 0 0 227 17.49c-28.08-23.13-69.54-22.82-99-.86-29.45-22-71-22.3-99.05.89a79.11 79.11 0 0 0-5.77 117.08zM59.42 54.53A29.54 29.54 0 0 1 78.35 48 35.08 35.08 0 0 1 103 58.32l25 24.89 24.93-24.89c12.25-12.15 31.43-13.83 43.58-3.82a31.09 31.09 0 0 1 2.31 46.15l-70.85 70.71-70.87-70.69a31.13 31.13 0 0 1 2.32-46.14zm337.93 305.24l32.27-69.89a24 24 0 1 0-43.54-20.12l-63.7 138h109.27l-36.92 68.58A24 24 0 1 0 437 499.05l75-139.28zm-141.44-72h-27.42l-7.09-14.17a27.36 27.36 0 0 0-25.64-17.76H92.08a27.39 27.39 0 0 0-25.65 17.76l-7 14.21H32a32 32 0 0 0-32 32V480a32 32 0 0 0 32 32h223.91a32 32 0 0 0 32-32V319.79a32 32 0 0 0-32-31.98zm-16 176.23H48V335.79h41.22l13.21-26.73 2.57-5.26h77.83l2.69 5.4 13.24 26.59h41.13zm112-256V68.24L463.83 51v78.58a84 84 0 0 0-16-1.69c-35.34 0-64 21.47-64 48s28.64 48 64 48 64-21.48 64-48V32c0-17.9-13.54-32-29.64-32a28.08 28.08 0 0 0-4.26.33L329.39 23.17c-14.63 2.25-25.5 15.74-25.5 31.66V161.6a83.25 83.25 0 0 0-16-1.7c-35.33 0-64 21.55-64 48.13s28.64 48.13 64 48.13 63.98-21.55 63.98-48.16z",class:""})),category:"purdue-blocks",keywords:[],attributes:{iconGroup:{type:"array",default:[]}},supports:{className:!1,anchor:!0},description:$b("Add a group of icons to be displayed inline."),edit:e=>{let a,l;return 0===e.attributes.iconGroup.length&&e.setAttributes({iconGroup:[{icon:"",iconUrl:""}]}),e.attributes.iconGroup.length&&(a=e.attributes.iconGroup.map(((a,l)=>(0,t.createElement)(ep,{key:l},(0,t.createElement)(Wb,{className:"icon-text",placeholder:"Paste Fontawesome HTML code",value:a.icon,onChange:t=>((t,a)=>{const l=[...e.attributes.iconGroup];l[a].icon=t,e.setAttributes({iconGroup:l})})(t,l)}),(0,t.createElement)(Wb,{className:"icon-url",placeholder:"Link",value:a.iconUrl,onChange:t=>((t,a)=>{const l=[...e.attributes.iconGroup];l[a].iconUrl=t,e.setAttributes({iconGroup:l})})(t,l)}),(0,t.createElement)(Db,{className:"bulma-blocks-editor-site-hero__button is-danger",onClick:()=>(t=>{const a=[...e.attributes.iconGroup];a.splice(t,1),e.setAttributes({iconGroup:a})})(l)},"Remove Icon"),(0,t.createElement)("hr",null)))),l=e.attributes.iconGroup.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"icon-item"},(0,t.createElement)("div",{className:"icon-item-icon-placeholder"},(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:e.icon}})))))),[(0,t.createElement)(Xb,{key:"1"},(0,t.createElement)(Zb,{title:$b("Icons")},a,(0,t.createElement)(Db,{isDefault:!0,onClick:(()=>{const t=[...e.attributes.iconGroup];t.push({icon:"",iconUrl:""}),e.setAttributes({iconGroup:t})}).bind(void 0)},$b("Add Icon")),(0,t.createElement)("hr",null))),(0,t.createElement)("div",{key:"2",className:"icon-group"},l)]},save:e=>{const a=Qb.save(),l=e.attributes.iconGroup.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"icon-item"},(0,t.createElement)("a",{href:e.iconUrl,target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("div",{className:"icon-item-icon-placeholder"},(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:e.icon}}))))));return(0,t.createElement)("div",x({},a,{className:"icon-group"}),l)}});const{__:tp}=wp.i18n,{registerBlockType:ap}=wp.blocks,{withSelect:lp,withDispatch:rp}=wp.data,{PanelBody:np,PanelRow:sp,RangeControl:op,CheckboxControl:ip,TextControl:cp,TextareaControl:up,Button:dp}=wp.components,{useState:mp,Component:bp,Fragment:pp}=wp.element,{InnerBlocks:hp,InspectorControls:gp,RichText:vp,MediaUploadCheck:Ep,MediaUpload:fp,useBlockProps:kp}=wp.blockEditor,yp=lp((e=>{const{getMedia:t,getPostType:a}=e("core"),{getCurrentPostId:l,getEditedPostAttribute:r}=e("core/editor"),n=r("featured_media");return{media:n?t(n):null,currentPostId:l(),postType:a(r("type")),featuredImageId:n,isDisabled:e("core/edit-post").isFeatureActive("disableEditorsKitDragAndDropFeaturedTools")}})).currentPostId;ap("purdue-blocks/podcast",{title:tp("Podcast"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"ellipsis-h",className:"svg-inline--fa fa-podcast fa-w-14 fa-7x",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M267.429 488.563C262.286 507.573 242.858 512 224 512c-18.857 0-38.286-4.427-43.428-23.437C172.927 460.134 160 388.898 160 355.75c0-35.156 31.142-43.75 64-43.75s64 8.594 64 43.75c0 32.949-12.871 104.179-20.571 132.813zM156.867 288.554c-18.693-18.308-29.958-44.173-28.784-72.599 2.054-49.724 42.395-89.956 92.124-91.881C274.862 121.958 320 165.807 320 220c0 26.827-11.064 51.116-28.866 68.552-2.675 2.62-2.401 6.986.628 9.187 9.312 6.765 16.46 15.343 21.234 25.363 1.741 3.654 6.497 4.66 9.449 1.891 28.826-27.043 46.553-65.783 45.511-108.565-1.855-76.206-63.595-138.208-139.793-140.369C146.869 73.753 80 139.215 80 220c0 41.361 17.532 78.7 45.55 104.989 2.953 2.771 7.711 1.77 9.453-1.887 4.774-10.021 11.923-18.598 21.235-25.363 3.029-2.2 3.304-6.566.629-9.185zM224 0C100.204 0 0 100.185 0 224c0 89.992 52.602 165.647 125.739 201.408 4.333 2.118 9.267-1.544 8.535-6.31-2.382-15.512-4.342-30.946-5.406-44.339-.146-1.836-1.149-3.486-2.678-4.512-47.4-31.806-78.564-86.016-78.187-147.347.592-96.237 79.29-174.648 175.529-174.899C320.793 47.747 400 126.797 400 224c0 61.932-32.158 116.49-80.65 147.867-.999 14.037-3.069 30.588-5.624 47.23-.732 4.767 4.203 8.429 8.535 6.31C395.227 389.727 448 314.187 448 224 448 100.205 347.815 0 224 0zm0 160c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64z"})),category:"purdue-blocks",keywords:[],attributes:{isChecked:{type:"boolean",default:!1},urlText:{type:"string",default:""},internalFile:{type:"string",default:""},coverImage:{type:"string",default:""},altText:{type:"string",default:""},podcastName:{type:"string",default:""},shortDescription:{type:"string",default:""},episodeNumber:{type:"string",default:""},episodeTitle:{type:"string",default:""},fullDescription:{type:"string",default:""},listenOnUrls:{type:"array",default:[]}},supports:{className:!1,anchor:!0},description:tp("Add this block and add a Podcast episode."),edit:e=>{const[a,l]=mp(!1);let r,n;return e.attributes.listenOnUrls.length&&(r=e.attributes.listenOnUrls.map(((a,l)=>(0,t.createElement)(pp,{key:l},(0,t.createElement)(cp,{className:"purdue_video_carousel_url",placeholder:"Channel Name",value:e.attributes.listenOnUrls[l].chennelname,onChange:t=>((t,a)=>{const l=[...e.attributes.listenOnUrls];l[a].chennelname=t,e.setAttributes({listenOnUrls:l})})(t,l)}),(0,t.createElement)(cp,{className:"video_carrousel_description",placeholder:"Channel URL",value:e.attributes.listenOnUrls[l].chennelUrl,onChange:t=>((t,a)=>{const l=[...e.attributes.listenOnUrls];l[a].chennelUrl=t,e.setAttributes({listenOnUrls:l})})(t,l)}),(0,t.createElement)(dp,{className:"bulma-blocks-editor-site-hero__button is-danger",onClick:()=>(t=>{const a=[...e.attributes.listenOnUrls];a.splice(t,1),e.setAttributes({listenOnUrls:a})})(l)},"Remove Chennel"),(0,t.createElement)("hr",null)))),n=e.attributes.listenOnUrls.map(((e,a)=>(0,t.createElement)("a",{key:a,className:"item",href:e.chennelUrl,target:"_blank"},e.chennelname)))),[(0,t.createElement)(gp,null,(0,t.createElement)(np,{title:tp("Listen On Chennels")},r,(0,t.createElement)(dp,{isDefault:!0,onClick:(()=>{const t=[...e.attributes.listenOnUrls];t.push({chennelname:"",chennelUrl:""}),e.setAttributes({listenOnUrls:t})}).bind(void 0)},tp("Add Chennel")),(0,t.createElement)("hr",null)),(0,t.createElement)(np,null,(0,t.createElement)(sp,null,(0,t.createElement)(cp,{label:"Espisode Number",value:e.attributes.episodeNumber,onChange:t=>e.setAttributes({episodeNumber:t}),type:"number"})),(0,t.createElement)(sp,null,(0,t.createElement)(Ep,null,(0,t.createElement)("label",null,tp("Cover Image"),(0,t.createElement)(fp,{allowedTypes:["image"],onSelect:t=>{e.setAttributes({coverImage:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return""!==e.attributes.coverImage?(0,t.createElement)("div",{className:"bulma-blocks-editor-home-card__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.coverImage})),(0,t.createElement)(dp,{className:"bulma-blocks-editor-home-card__button",onClick:l},"Update Image")):(0,t.createElement)("div",{className:"bulma-blocks-editor-home-card__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-home-card__description"},"Pick an image from the media library."),(0,t.createElement)(dp,{className:"bulma-blocks-editor-home-card__button",onClick:l},"Open Media Library"))}})))),(0,t.createElement)(sp,null,(0,t.createElement)(ip,{label:"Podcast Source",help:"Is the Podcast episode loading from an external source?",checked:e.attributes.isChecked,onChange:t=>{e.setAttributes({isChecked:t})}})),e.attributes.isChecked?(0,t.createElement)(sp,null,(0,t.createElement)(cp,{label:"Podcast URL",value:e.attributes.urlText,onChange:t=>e.setAttributes({urlText:t})})):(0,t.createElement)(sp,null,(0,t.createElement)(Ep,null,(0,t.createElement)("label",null,tp("Podcast File"),(0,t.createElement)(fp,{allowedTypes:["audio"],onSelect:t=>{e.setAttributes({internalFile:t.url})},render:a=>{let{open:l}=a;return""!==e.attributes.internalFile?(0,t.createElement)("div",{className:"bulma-blocks-editor-home-card__preview"},(0,t.createElement)(cp,{value:e.attributes.internalFile,disabled:!0}),(0,t.createElement)(dp,{className:"bulma-blocks-editor-home-card__button",onClick:l},"Update File")):(0,t.createElement)("div",{className:"bulma-blocks-editor-home-card__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-home-card__description"},"Pick a file from the library."),(0,t.createElement)(dp,{className:"bulma-blocks-editor-home-card__button",onClick:l},"Open Media Library"))}})))))),(0,t.createElement)("div",{className:"purdue_podcast"},(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"purdue_podcast_podcast_name"},(0,t.createElement)(vp,{tagName:"h2",label:"Podcast Name",value:e.attributes.podcastName,onChange:t=>e.setAttributes({podcastName:t}),placeholder:tp("Podcast Name")})))),(0,t.createElement)("div",{className:"columns purdue_podcast_desc"},(0,t.createElement)("div",{className:"column is-one-quarter"},(0,t.createElement)("img",{className:"purdue_podcast_episode_cover_image",src:e.attributes.coverImage,alt:e.attributes.altText})),(0,t.createElement)("div",{className:"column is-three-quarters"},(0,t.createElement)("div",{className:"purdue_podcast_episode_short_desc"},(0,t.createElement)(vp,{tagName:"div",multiline:"p",label:"Short Description",value:e.attributes.shortDescription,onChange:t=>e.setAttributes({shortDescription:t}),placeholder:tp("Short Description")})),(0,t.createElement)("div",{className:"purdue_podcast_episode_links"},(0,t.createElement)("strong",null,tp("Listen on: "))," ",n))),(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"purdue_podcast_episode_player"},(0,t.createElement)("div",{className:"purdue_podcast_controls"},(0,t.createElement)("div",{className:"purdue_podcast_controls_pause"},(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_playing"},"NOW PLAYING",(0,t.createElement)("button",{id:"play",className:"purdue_podcast_controls_pause_share_play"},(0,t.createElement)("span",{className:"purdue_podcast_controls_pause_share_play_border"},(0,t.createElement)("i",{className:"fas fa-play"}),(0,t.createElement)("i",{class:"fas fa-pause hidden"})))),(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_button"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black"},(0,t.createElement)("div",{className:"purdue_podcast_controls_black_elapsed"},"00:00:00"),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_timeline"},(0,t.createElement)("span",{className:"time_elapsed"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_total"},"00:00:00"),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_volume"},(0,t.createElement)("i",{class:"fas fa-volume-up"}),(0,t.createElement)("i",{class:"fas fa-volume-mute hidden"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_speed"},(0,t.createElement)("button",{class:"pcast-speed"},"1x")),a?(0,t.createElement)("audio",{src:e.attributes.urlText}):(0,t.createElement)("audio",{src:e.attributes.internalFile}))),(0,t.createElement)("div",{class:"modal"},(0,t.createElement)("div",{class:"modal-background"}),(0,t.createElement)("div",{class:"modal-content"},(0,t.createElement)("div",{class:"top_article_data"},(0,t.createElement)("div",{class:"top_article_data_share"},(0,t.createElement)("a",{id:"share_text",class:"top_article_data_share_text ",target:"_blank","aria-label":`Share link https://youtu.be/${yp}`,href:`https://youtu.be/${yp}`,title:"Share link"},`https://youtu.be/${yp}`),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://www.facebook.com/sharer/sharer.php?u=https://youtu.be/${yp}`,title:"Share on Facebook",target:"_blank"},(0,t.createElement)("i",{class:"fab fa-facebook-f"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://www.linkedin.com/sharing/share-offsite/?url=https://youtu.be/${yp}`,title:"Share on Linkedin",target:"_blank"},(0,t.createElement)("i",{class:"fab fa-linkedin-in"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://twitter.com/intent/tweet?text=https://youtu.be/${yp}`,title:"Share on Twitter",target:"_blank"},(0,t.createElement)("i",{class:"fab fa-twitter"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`mailto:?subject=&body=https://youtu.be/${yp}`,title:"{{ Drupal.t('Share via Email') }}",target:"_blank"},(0,t.createElement)("i",{class:"fas fa-envelope"}))))),(0,t.createElement)("button",{class:"modal-close is-large","aria-label":"close"}))),(0,t.createElement)("div",{className:"purdue_podcast_episode_box"},(0,t.createElement)("div",{className:"purdue_podcast_episode_number"},tp("Espisode # "),e.attributes.episodeNumber),(0,t.createElement)("div",{className:"purdue_podcast_episode_title"},(0,t.createElement)(vp,{tagName:"h3",value:e.attributes.episodeTitle,onChange:t=>e.setAttributes({episodeTitle:t}),placeholder:tp("Episode Name")})),(0,t.createElement)("div",{className:"purdue_podcast_episode_date"}),(0,t.createElement)("div",{className:"purdue_podcast_full_desc"},(0,t.createElement)(vp,{tagName:"div",multiline:"p",label:"Full Description",value:e.attributes.fullDescription,onChange:t=>e.setAttributes({fullDescription:t}),placeholder:tp("Full Description")})),(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_share"},(0,t.createElement)("button",{className:"purdue_podcast_controls_pause_share_share"},(0,t.createElement)("i",{className:"fas fa-share"})," Share"))))))]},save:e=>{const a=kp.save(),l=e.attributes.listenOnUrls.map(((e,a)=>(0,t.createElement)("a",{key:a,className:"item",href:e.chennelUrl,target:"_blank",rel:"noopener noreferrer"},e.chennelname)));return(0,t.createElement)("div",x({},a,{className:"purdue_podcast"}),(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"purdue_podcast_podcast_name"},(0,t.createElement)(vp.Content,{tagName:"h2",value:e.attributes.podcastName})))),(0,t.createElement)("div",{className:"columns purdue_podcast_desc"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("img",{className:"purdue_podcast_episode_cover_image",src:e.attributes.coverImage,alt:e.attributes.altText}),(0,t.createElement)("div",{className:"purdue_podcast_episode_short_desc"},(0,t.createElement)(vp.Content,{tagName:"div",multiline:"p",value:e.attributes.shortDescription})),(0,t.createElement)("div",{className:"purdue_podcast_episode_links"},(0,t.createElement)("strong",null,tp("Listen on: "))," ",l))),(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"purdue_podcast_episode_player"},(0,t.createElement)("div",{className:"purdue_podcast_controls"},(0,t.createElement)("div",{className:"purdue_podcast_controls_pause"},(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_playing"},"NOW PLAYING",(0,t.createElement)("button",{id:"play",className:"purdue_podcast_controls_pause_share_play"},(0,t.createElement)("span",{className:"purdue_podcast_controls_pause_share_play_border"},(0,t.createElement)("i",{className:"fas fa-play"}),(0,t.createElement)("i",{class:"fas fa-pause hidden"})))),(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_button"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black"},(0,t.createElement)("div",{className:"purdue_podcast_controls_black_elapsed"},"00:00:00"),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_timeline"},(0,t.createElement)("span",{className:"time_elapsed"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_total"},"00:00:00"),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_volume"},(0,t.createElement)("i",{class:"fas fa-volume-up podcast-volume"}),(0,t.createElement)("i",{class:"fas fa-volume-mute hidden"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_speed"},(0,t.createElement)("button",{class:"pcast-speed"},"1x")),e.attributes.isChecked?(0,t.createElement)("audio",{src:e.attributes.urlText}):(0,t.createElement)("audio",{src:e.attributes.internalFile}))),(0,t.createElement)("div",{className:"purdue_podcast_episode_box"},(0,t.createElement)("div",{className:"purdue_podcast_episode_number"},tp("Espisode # "),e.attributes.episodeNumber),(0,t.createElement)("div",{className:"purdue_podcast_episode_title"},(0,t.createElement)(vp.Content,{tagName:"h3",value:e.attributes.episodeTitle})),(0,t.createElement)("div",{className:"purdue_podcast_episode_date"}),(0,t.createElement)("div",{className:"purdue_podcast_full_desc"},(0,t.createElement)(vp.Content,{tagName:"div",multiline:"p",value:e.attributes.fullDescription})),(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_share"},(0,t.createElement)("button",{className:"purdue_podcast_controls_pause_share_share"},(0,t.createElement)("i",{className:"fas fa-share share-icon"})," Share"),(0,t.createElement)("div",{class:"podcast-modal"},(0,t.createElement)("button",{class:"modal-close podcast-modal-close is-large","aria-label":"close"}),(0,t.createElement)("div",{class:"modal-content"},(0,t.createElement)("div",{class:"top_article_data_share"},(0,t.createElement)("span",{id:"share_text",class:"top_article_data_share_text "},"Share"),(0,t.createElement)("a",{class:"top_article_data_share_button facebook_share_button",href:"",title:"Share on Facebook",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-facebook-f"})),(0,t.createElement)("a",{class:"top_article_data_share_button instagram_share_button",href:"",title:"Share on Linkedin",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-linkedin-in"})),(0,t.createElement)("a",{class:"top_article_data_share_button twitter_share_button",href:"",title:"Share on Twitter",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-twitter"})),(0,t.createElement)("a",{class:"top_article_data_share_button email_share_button",href:"",title:"{{ Drupal.t('Share via Email') }}",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fas fa-envelope"})))))))))))}});const{__:_p}=wp.i18n,{registerBlockType:xp}=wp.blocks,{PanelBody:Cp,PanelRow:Np,CheckboxControl:Tp,TextareaControl:Ap,TextControl:Lp,Button:Sp}=wp.components,{InspectorControls:Bp,MediaUploadCheck:Hp,MediaUpload:Up,useBlockProps:Ip}=wp.blockEditor;xp("purdue-blocks/ad-banner",{title:_p("Banner"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"ad",className:"svg-inline--fa fa-ad fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M157.52 272h36.96L176 218.78 157.52 272zM352 256c-13.23 0-24 10.77-24 24s10.77 24 24 24 24-10.77 24-24-10.77-24-24-24zM464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM250.58 352h-16.94c-6.81 0-12.88-4.32-15.12-10.75L211.15 320h-70.29l-7.38 21.25A16 16 0 0 1 118.36 352h-16.94c-11.01 0-18.73-10.85-15.12-21.25L140 176.12A23.995 23.995 0 0 1 162.67 160h26.66A23.99 23.99 0 0 1 212 176.13l53.69 154.62c3.61 10.4-4.11 21.25-15.11 21.25zM424 336c0 8.84-7.16 16-16 16h-16c-4.85 0-9.04-2.27-11.98-5.68-8.62 3.66-18.09 5.68-28.02 5.68-39.7 0-72-32.3-72-72s32.3-72 72-72c8.46 0 16.46 1.73 24 4.42V176c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v160z"})),category:"purdue-blocks",keywords:[],attributes:{heading:{type:"string",default:""},link:{type:"string",default:""},imgUrl:{type:"string",default:""},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:_p("Create an ad banner."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(Bp,null),(0,t.createElement)("div",{className:"blocks-editor-banner"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)(Lp,{label:"Block Heading",value:e.attributes.heading,onChange:t=>e.setAttributes({heading:t})}),(0,t.createElement)("span",null,"Choose an image."),(0,t.createElement)(Hp,null,(0,t.createElement)(Up,{allowedTypes:["image"],onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"bulma-blocks-editor-link-card__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(Sp,{className:"bulma-blocks-editor-link-card__button",onClick:r},"Select a New Image"),(0,t.createElement)(Sp,{className:"bulma-blocks-editor-link-card__button",onClick:a},"Remove image")):(0,t.createElement)("div",{className:"bulma-blocks-editor-link-card__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-link-card__description"},"Pick an image from the media library."),(0,t.createElement)(Sp,{className:"bulma-blocks-editor-link-card__button",onClick:r},"Open Media Library"))}})),(0,t.createElement)("hr",null),(0,t.createElement)(Tp,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})),(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add the link."),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.link?e.attributes.link:"",className:"input",type:"text",placeholder:"Paste permalink or url...",onChange:t=>{e.setAttributes({link:t.target.value})}})))))]},save:e=>{const a=Ip.save();return(0,t.createElement)("div",x({},a,{className:"banner ad-banner"}),(0,t.createElement)("h2",null,(0,t.createElement)("span",null,e.attributes.heading)),(0,t.createElement)("a",{href:e.attributes.link,className:"banner__ad",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))))}})}()}(); \ No newline at end of file +!function(){var e={94184:function(e,t){var a;!function(){"use strict";var l={}.hasOwnProperty;function r(){for(var e=[],t=0;t-1&&e%1==0&&e<=9007199254740991}},13218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},37005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},36719:function(e,t,a){var l=a(38749),r=a(7518),n=a(31167),s=n&&n.isTypedArray,o=s?r(s):l;e.exports=o},95062:function(e){e.exports=function(){return!1}},16941:function(e,t,a){var l=a(51474),r=a(94184),n=a(99196),s=a(2177);function o(e){return e&&e.__esModule?e.default:e}function i(e,t,a,l){Object.defineProperty(e,t,{get:a,set:l,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e){e.forEach((e=>c(e.element)))}function d(e){e.forEach((e=>{!function(e,t,a){const l=e.children[a]||null;e.insertBefore(t,l)}(e.parentElement,e.element,e.oldIndex)}))}function m(e,t){const a=h(e),l={parentElement:e.from};let r=[];switch(a){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...l},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...l}];break;case"multidrag":r=e.oldIndicies.map(((t,a)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[a].index,...l})))}const n=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(r,t);return n}function b(e,t){const a=[...t];return e.concat().reverse().forEach((e=>a.splice(e.oldIndex,1))),a}function p(e,t,a,l){const r=[...t];return e.forEach((e=>{const t=l&&a&&l(e.item,a);r.splice(e.newIndex,0,t||e.item)})),r}function h(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}i(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),i(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),i(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),i(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),i(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),i(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),i(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),i(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),i(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),i(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),i(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),i(e.exports,"ReactSortable",(()=>v));const g={dragging:null};class v extends n.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,n.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,g),o(s)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();o(l).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:a,id:l}=this.props,r={style:t,className:a,id:l},s=e&&null!==e?e:"div";return(0,n.createElement)(s,{ref:this.ref,...r},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:a="sortable-selected",chosenClass:l="sortable-chosen",dragClass:s="sortable-drag",fallbackClass:i="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:m}=this.props;if(!e||null==e)return null;const b=t||"data-id";return n.Children.map(e,((e,t)=>{if(void 0===e)return;const s=m[t]||{},{className:i}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!s.filtered},u=o(r)(i,{[a]:s.selected,[l]:s.chosen,...c});return(0,n.cloneElement)(e,{[b]:e.key,className:u})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:a,children:l,tag:r,style:n,className:s,clone:o,onAdd:i,onChange:c,onChoose:u,onClone:d,onEnd:m,onFilter:b,onRemove:p,onSort:h,onStart:g,onUnchoose:v,onUpdate:E,onMove:f,onSpill:k,onSelect:y,onDeselect:w,..._}=e;return _}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:a}=this.props,l=e.willInsertAfter||-1;if(!a)return l;const r=a(e,t,this.sortable,g);return void 0!==r&&r}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const a=this.props[t];a&&a(e,this.sortable,g)}onAdd(e){const{list:t,setList:a,clone:l}=this.props,r=m(e,[...g.dragging.props.list]);u(r),a(p(r,t,e,l).map((e=>Object.assign(e,{selected:!1}))),this.sortable,g)}onRemove(e){const{list:t,setList:a}=this.props,l=h(e),r=m(e,t);d(r);let n=[...t];if("clone"!==e.pullMode)n=b(r,n);else{let t=r;switch(l){case"multidrag":t=r.map(((t,a)=>({...t,element:e.clones[a]})));break;case"normal":t=r.map((t=>({...t,element:e.clone})));break;default:o(s)(!0,`mode "${l}" cannot clone. Please remove "props.clone" from when using the "${l}" plugin`)}u(t),r.forEach((t=>{const a=t.oldIndex,l=this.props.clone(t.item,e);n.splice(a,1,l)}))}n=n.map((e=>Object.assign(e,{selected:!1}))),a(n,this.sortable,g)}onUpdate(e){const{list:t,setList:a}=this.props,l=m(e,t);return u(l),d(l),a(function(e,t){return p(e,b(e,t))}(l,t),this.sortable,g)}onStart(){g.dragging=this}onEnd(){g.dragging=null}onChoose(e){const{list:t,setList:a}=this.props;a(t.map(((t,a)=>{let l=t;return a===e.oldIndex&&(l=Object.assign(t,{chosen:!0})),l})),this.sortable,g)}onUnchoose(e){const{list:t,setList:a}=this.props;a(t.map(((t,a)=>{let l=t;return a===e.oldIndex&&(l=Object.assign(l,{chosen:!1})),l})),this.sortable,g)}onSpill(e){const{removeOnSpill:t,revertOnSpill:a}=this.props;t&&!a&&c(e.item)}onSelect(e){const{list:t,setList:a}=this.props,l=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const a=t.index;if(-1===a)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);l[a].selected=!0})),a(l,this.sortable,g)}onDeselect(e){const{list:t,setList:a}=this.props,l=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(l[t].selected=!0)})),a(l,this.sortable,g)}}var E,f;E=e.exports,f={},Object.keys(f).forEach((function(e){"default"===e||"__esModule"===e||E.hasOwnProperty(e)||Object.defineProperty(E,e,{enumerable:!0,get:function(){return f[e]}})}))},51474:function(e,t,a){"use strict";function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,l)}return a}function r(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,l=new Array(t);a"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function y(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function w(e,t,a,l){if(e){a=a||document;do{if(null!=t&&(">"===t[0]?e.parentNode===a&&k(e,t):k(e,t))||l&&e===a)return e;if(e===a)break}while(e=y(e))}return null}var _,x=/\s+/g;function C(e,t,a){if(e&&t)if(e.classList)e.classList[a?"add":"remove"](t);else{var l=(" "+e.className+" ").replace(x," ").replace(" "+t+" "," ");e.className=(l+(a?" "+t:"")).replace(x," ")}}function N(e,t,a){var l=e&&e.style;if(l){if(void 0===a)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(a=e.currentStyle),void 0===t?a:a[t];t in l||-1!==t.indexOf("webkit")||(t="-webkit-"+t),l[t]=a+("string"==typeof a?"":"px")}}function T(e,t){var a="";if("string"==typeof e)a=e;else do{var l=N(e,"transform");l&&"none"!==l&&(a=l+" "+a)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(a)}function A(e,t,a){if(e){var l=e.getElementsByTagName(t),r=0,n=l.length;if(a)for(;r=n:r<=n))return l;if(l===L())break;l=M(l,!1)}return!1}function H(e,t,a,l){for(var r=0,n=0,s=e.children;n2&&void 0!==arguments[2]?arguments[2]:{},l=a.evt,n=i(a,W);z.pluginEvent.bind(Ve)(e,t,r({dragEl:K,parentEl:Q,ghostEl:J,rootEl:ee,nextEl:te,lastDownEl:ae,cloneEl:le,cloneHidden:re,dragStarted:ve,putSortable:ue,activeSortable:Ve.active,originalEvent:l,oldIndex:ne,oldDraggableIndex:oe,newIndex:se,newDraggableIndex:ie,hideGhostForTarget:$e,unhideGhostForTarget:Re,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(e){X({sortable:t,name:e,originalEvent:l})}},n))};function X(e){j(r({putSortable:ue,cloneEl:le,targetEl:K,rootEl:ee,oldIndex:ne,oldDraggableIndex:oe,newIndex:se,newDraggableIndex:ie},e))}var K,Q,J,ee,te,ae,le,re,ne,se,oe,ie,ce,ue,de,me,be,pe,he,ge,ve,Ee,fe,ke,ye,we=!1,_e=!1,xe=[],Ce=!1,Ne=!1,Te=[],Ae=!1,Le=[],Se="undefined"!=typeof document,Be=h,He=m||d?"cssFloat":"float",Ue=Se&&!g&&!h&&"draggable"in document.createElement("div"),Ie=function(){if(Se){if(d)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Pe=function(e,t){var a=N(e),l=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),r=H(e,0,t),n=H(e,1,t),s=r&&N(r),o=n&&N(n),i=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+S(r).width,c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+S(n).width;if("flex"===a.display)return"column"===a.flexDirection||"column-reverse"===a.flexDirection?"vertical":"horizontal";if("grid"===a.display)return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&s.float&&"none"!==s.float){var u="left"===s.float?"left":"right";return!n||"both"!==o.clear&&o.clear!==u?"horizontal":"vertical"}return r&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||i>=l&&"none"===a[He]||n&&"none"===a[He]&&i+c>l)?"vertical":"horizontal"},Me=function(e){function t(e,a){return function(l,r,n,s){var o=l.options.group.name&&r.options.group.name&&l.options.group.name===r.options.group.name;if(null==e&&(a||o))return!0;if(null==e||!1===e)return!1;if(a&&"clone"===e)return e;if("function"==typeof e)return t(e(l,r,n,s),a)(l,r,n,s);var i=(a?l:r).options.group.name;return!0===e||"string"==typeof e&&e===i||e.join&&e.indexOf(i)>-1}}var a={},l=e.group;l&&"object"==n(l)||(l={name:l}),a.name=l.name,a.checkPull=t(l.pull,!0),a.checkPut=t(l.put),a.revertClone=l.revertClone,e.group=a},$e=function(){!Ie&&J&&N(J,"display","none")},Re=function(){!Ie&&J&&N(J,"display","")};Se&&!g&&document.addEventListener("click",(function(e){if(_e)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),_e=!1,!1}),!0);var Oe=function(e){if(K){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,n=e.clientY,xe.some((function(e){var t=e[F].options.emptyInsertThreshold;if(t&&!U(e)){var a=S(e),l=r>=a.left-t&&r<=a.right+t,o=n>=a.top-t&&n<=a.bottom+t;return l&&o?s=e:void 0}})),s);if(t){var a={};for(var l in e)e.hasOwnProperty(l)&&(a[l]=e[l]);a.target=a.rootEl=t,a.preventDefault=void 0,a.stopPropagation=void 0,t[F]._onDragOver(a)}}var r,n,s},De=function(e){K&&K.parentNode[F]._isOutsideThisEl(e.target)};function Ve(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=o({},t),e[F]=this;var a,l,n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Pe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ve.supportPointer&&"PointerEvent"in window&&!p,emptyInsertThreshold:5};for(var s in z.initializePlugins(this,e,n),n)!(s in t)&&(t[s]=n[s]);for(var i in Me(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&Ue,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?E(e,"pointerdown",this._onTapStart):(E(e,"mousedown",this._onTapStart),E(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(E(e,"dragover",this),E(e,"dragenter",this)),xe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),o(this,(l=[],{captureAnimationState:function(){l=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==N(e,"display")&&e!==Ve.ghost){l.push({target:e,rect:S(e)});var t=r({},l[l.length-1].rect);if(e.thisAnimationDuration){var a=T(e,!0);a&&(t.top-=a.f,t.left-=a.e)}e.fromRect=t}}))},addAnimationState:function(e){l.push(e)},removeAnimationState:function(e){l.splice(function(e,t){for(var a in e)if(e.hasOwnProperty(a))for(var l in t)if(t.hasOwnProperty(l)&&t[l]===e[a][l])return Number(a);return-1}(l,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(a),void("function"==typeof e&&e());var r=!1,n=0;l.forEach((function(e){var a=0,l=e.target,s=l.fromRect,o=S(l),i=l.prevFromRect,c=l.prevToRect,u=e.rect,d=T(l,!0);d&&(o.top-=d.f,o.left-=d.e),l.toRect=o,l.thisAnimationDuration&&$(i,o)&&!$(s,o)&&(u.top-o.top)/(u.left-o.left)==(s.top-o.top)/(s.left-o.left)&&(a=function(e,t,a,l){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-a.top,2)+Math.pow(t.left-a.left,2))*l.animation}(u,i,c,t.options)),$(o,s)||(l.prevFromRect=s,l.prevToRect=o,a||(a=t.options.animation),t.animate(l,u,o,a)),a&&(r=!0,n=Math.max(n,a),clearTimeout(l.animationResetTimer),l.animationResetTimer=setTimeout((function(){l.animationTime=0,l.prevFromRect=null,l.fromRect=null,l.prevToRect=null,l.thisAnimationDuration=null}),a),l.thisAnimationDuration=a)})),clearTimeout(a),r?a=setTimeout((function(){"function"==typeof e&&e()}),n):"function"==typeof e&&e(),l=[]},animate:function(e,t,a,l){if(l){N(e,"transition",""),N(e,"transform","");var r=T(this.el),n=r&&r.a,s=r&&r.d,o=(t.left-a.left)/(n||1),i=(t.top-a.top)/(s||1);e.animatingX=!!o,e.animatingY=!!i,N(e,"transform","translate3d("+o+"px,"+i+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),N(e,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),N(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){N(e,"transition",""),N(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),l)}}}))}function Ge(e,t,a,l,r,n,s,o){var i,c,u=e[F],b=u.options.onMove;return!window.CustomEvent||d||m?(i=document.createEvent("Event")).initEvent("move",!0,!0):i=new CustomEvent("move",{bubbles:!0,cancelable:!0}),i.to=t,i.from=e,i.dragged=a,i.draggedRect=l,i.related=r||t,i.relatedRect=n||S(t),i.willInsertAfter=o,i.originalEvent=s,e.dispatchEvent(i),b&&(c=b.call(u,i,s)),c}function Fe(e){e.draggable=!1}function Ze(){Ae=!1}function qe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,a=t.length,l=0;a--;)l+=t.charCodeAt(a);return l.toString(36)}function ze(e){return setTimeout(e,0)}function je(e){return clearTimeout(e)}Ve.prototype={constructor:Ve,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Ee=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,K):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,a=this.el,l=this.options,r=l.preventOnFilter,n=e.type,s=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,o=(s||e).target,i=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||o,c=l.filter;if(function(e){Le.length=0;for(var t=e.getElementsByTagName("input"),a=t.length;a--;){var l=t[a];l.checked&&Le.push(l)}}(a),!K&&!(/mousedown|pointerdown/.test(n)&&0!==e.button||l.disabled)&&!i.isContentEditable&&(this.nativeDraggable||!p||!o||"SELECT"!==o.tagName.toUpperCase())&&!((o=w(o,l.draggable,a,!1))&&o.animated||ae===o)){if(ne=I(o),oe=I(o,l.draggable),"function"==typeof c){if(c.call(this,e,o,this))return X({sortable:t,rootEl:i,name:"filter",targetEl:o,toEl:a,fromEl:a}),Y("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(l){if(l=w(i,l.trim(),a,!1))return X({sortable:t,rootEl:l,name:"filter",targetEl:o,fromEl:a,toEl:a}),Y("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());l.handle&&!w(i,l.handle,a,!1)||this._prepareDragStart(e,s,o)}}},_prepareDragStart:function(e,t,a){var l,r=this,n=r.el,s=r.options,o=n.ownerDocument;if(a&&!K&&a.parentNode===n){var i=S(a);if(ee=n,Q=(K=a).parentNode,te=K.nextSibling,ae=a,ce=s.group,Ve.dragged=K,de={target:K,clientX:(t||e).clientX,clientY:(t||e).clientY},he=de.clientX-i.left,ge=de.clientY-i.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,K.style["will-change"]="all",l=function(){Y("delayEnded",r,{evt:e}),Ve.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!b&&r.nativeDraggable&&(K.draggable=!0),r._triggerDragStart(e,t),X({sortable:r,name:"choose",originalEvent:e}),C(K,s.chosenClass,!0))},s.ignore.split(",").forEach((function(e){A(K,e.trim(),Fe)})),E(o,"dragover",Oe),E(o,"mousemove",Oe),E(o,"touchmove",Oe),E(o,"mouseup",r._onDrop),E(o,"touchend",r._onDrop),E(o,"touchcancel",r._onDrop),b&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),Y("delayStart",this,{evt:e}),!s.delay||s.delayOnTouchOnly&&!t||this.nativeDraggable&&(m||d))l();else{if(Ve.eventCanceled)return void this._onDrop();E(o,"mouseup",r._disableDelayedDrag),E(o,"touchend",r._disableDelayedDrag),E(o,"touchcancel",r._disableDelayedDrag),E(o,"mousemove",r._delayedDragTouchMoveHandler),E(o,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&E(o,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,s.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Fe(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._disableDelayedDrag),f(e,"touchend",this._disableDelayedDrag),f(e,"touchcancel",this._disableDelayedDrag),f(e,"mousemove",this._delayedDragTouchMoveHandler),f(e,"touchmove",this._delayedDragTouchMoveHandler),f(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?E(document,"pointermove",this._onTouchMove):E(document,t?"touchmove":"mousemove",this._onTouchMove):(E(K,"dragend",this),E(ee,"dragstart",this._onDragStart));try{document.selection?ze((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(we=!1,ee&&K){Y("dragStarted",this,{evt:t}),this.nativeDraggable&&E(document,"dragover",De);var a=this.options;!e&&C(K,a.dragClass,!1),C(K,a.ghostClass,!0),Ve.active=this,e&&this._appendGhost(),X({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(me){this._lastX=me.clientX,this._lastY=me.clientY,$e();for(var e=document.elementFromPoint(me.clientX,me.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(me.clientX,me.clientY))!==t;)t=e;if(K.parentNode[F]._isOutsideThisEl(e),t)do{if(t[F]&&t[F]._onDragOver({clientX:me.clientX,clientY:me.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Re()}},_onTouchMove:function(e){if(de){var t=this.options,a=t.fallbackTolerance,l=t.fallbackOffset,r=e.touches?e.touches[0]:e,n=J&&T(J,!0),s=J&&n&&n.a,o=J&&n&&n.d,i=Be&&ye&&P(ye),c=(r.clientX-de.clientX+l.x)/(s||1)+(i?i[0]-Te[0]:0)/(s||1),u=(r.clientY-de.clientY+l.y)/(o||1)+(i?i[1]-Te[1]:0)/(o||1);if(!Ve.active&&!we){if(a&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))l.right+10||e.clientX<=l.right&&e.clientY>l.bottom&&e.clientX>=l.left:e.clientX>l.right&&e.clientY>l.top||e.clientX<=l.right&&e.clientY>l.bottom+10}(e,n,this)&&!g.animated){if(g===K)return V(!1);if(g&&s===e.target&&(o=g),o&&(a=S(o)),!1!==Ge(ee,s,K,t,o,a,e,!!o))return D(),g&&g.nextSibling?s.insertBefore(K,g.nextSibling):s.appendChild(K),Q=s,G(),V(!0)}else if(g&&function(e,t,a){var l=S(H(a.el,0,a.options,!0));return t?e.clientXu+c*n/2:id-ke)return-fe}else if(i>u+c*(1-r)/2&&id-c*n/2)?i>u+c/2?1:-1:0}(e,o,a,n,_?1:i.swapThreshold,null==i.invertedSwapThreshold?i.swapThreshold:i.invertedSwapThreshold,Ne,Ee===o),0!==E){var L=I(K);do{L-=E,k=Q.children[L]}while(k&&("none"===N(k,"display")||k===J))}if(0===E||k===o)return V(!1);Ee=o,fe=E;var P=o.nextElementSibling,M=!1,$=Ge(ee,s,K,t,o,a,e,M=1===E);if(!1!==$)return 1!==$&&-1!==$||(M=1===$),Ae=!0,setTimeout(Ze,30),D(),M&&!P?s.appendChild(K):o.parentNode.insertBefore(K,M?P:o),T&&O(T,0,A-T.scrollTop),Q=K.parentNode,void 0===f||Ne||(ke=Math.abs(f-S(o)[x])),G(),V(!0)}if(s.contains(K))return V(!1)}return!1}function R(i,c){Y(i,p,r({evt:e,isOwner:d,axis:n?"vertical":"horizontal",revert:l,dragRect:t,targetRect:a,canSort:m,fromSortable:b,target:o,completed:V,onMove:function(a,l){return Ge(ee,s,K,t,a,S(a),e,l)},changed:G},c))}function D(){R("dragOverAnimationCapture"),p.captureAnimationState(),p!==b&&b.captureAnimationState()}function V(t){return R("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(p),p!==b&&(C(K,ue?ue.options.ghostClass:u.options.ghostClass,!1),C(K,i.ghostClass,!0)),ue!==p&&p!==Ve.active?ue=p:p===Ve.active&&ue&&(ue=null),b===p&&(p._ignoreWhileAnimating=o),p.animateAll((function(){R("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(o===K&&!K.animated||o===s&&!o.animated)&&(Ee=null),i.dragoverBubble||e.rootEl||o===document||(K.parentNode[F]._isOutsideThisEl(e.target),!t&&Oe(e)),!i.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function G(){se=I(K),ie=I(K,i.draggable),X({sortable:p,name:"change",toEl:s,newIndex:se,newDraggableIndex:ie,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){f(document,"mousemove",this._onTouchMove),f(document,"touchmove",this._onTouchMove),f(document,"pointermove",this._onTouchMove),f(document,"dragover",Oe),f(document,"mousemove",Oe),f(document,"touchmove",Oe)},_offUpEvents:function(){var e=this.el.ownerDocument;f(e,"mouseup",this._onDrop),f(e,"touchend",this._onDrop),f(e,"pointerup",this._onDrop),f(e,"touchcancel",this._onDrop),f(document,"selectstart",this)},_onDrop:function(e){var t=this.el,a=this.options;se=I(K),ie=I(K,a.draggable),Y("drop",this,{evt:e}),Q=K&&K.parentNode,se=I(K),ie=I(K,a.draggable),Ve.eventCanceled||(we=!1,Ne=!1,Ce=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),je(this.cloneId),je(this._dragStartId),this.nativeDraggable&&(f(document,"drop",this),f(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&N(document.body,"user-select",""),N(K,"transform",""),e&&(ve&&(e.cancelable&&e.preventDefault(),!a.dropBubble&&e.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(ee===Q||ue&&"clone"!==ue.lastPutMode)&&le&&le.parentNode&&le.parentNode.removeChild(le),K&&(this.nativeDraggable&&f(K,"dragend",this),Fe(K),K.style["will-change"]="",ve&&!we&&C(K,ue?ue.options.ghostClass:this.options.ghostClass,!1),C(K,this.options.chosenClass,!1),X({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==Q?(se>=0&&(X({rootEl:Q,name:"add",toEl:Q,fromEl:ee,originalEvent:e}),X({sortable:this,name:"remove",toEl:Q,originalEvent:e}),X({rootEl:Q,name:"sort",toEl:Q,fromEl:ee,originalEvent:e}),X({sortable:this,name:"sort",toEl:Q,originalEvent:e})),ue&&ue.save()):se!==ne&&se>=0&&(X({sortable:this,name:"update",toEl:Q,originalEvent:e}),X({sortable:this,name:"sort",toEl:Q,originalEvent:e})),Ve.active&&(null!=se&&-1!==se||(se=ne,ie=oe),X({sortable:this,name:"end",toEl:Q,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Y("nulling",this),ee=K=Q=J=te=le=ae=re=de=me=ve=se=ie=ne=oe=Ee=fe=ue=ce=Ve.dragged=Ve.ghost=Ve.clone=Ve.active=null,Le.forEach((function(e){e.checked=!0})),Le.length=be=pe=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":K&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],a=this.el.children,l=0,r=a.length,n=this.options;l1&&(ht.forEach((function(e){l.addAnimationState({target:e,rect:Et?S(e):r}),G(e),e.fromRect=r,t.removeAnimationState(e)})),Et=!1,function(e,t){ht.forEach((function(a,l){var r=t.children[a.sortableIndex+(e?Number(l):0)];r?t.insertBefore(a,r):t.appendChild(a)}))}(!this.options.removeCloneOnHide,a))},dragOverCompleted:function(e){var t=e.sortable,a=e.isOwner,l=e.insertion,r=e.activeSortable,n=e.parentEl,s=e.putSortable,o=this.options;if(l){if(a&&r._hideClone(),vt=!1,o.animation&&ht.length>1&&(Et||!a&&!r.options.sort&&!s)){var i=S(mt,!1,!0,!0);ht.forEach((function(e){e!==mt&&(V(e,i),n.appendChild(e))})),Et=!0}if(!a)if(Et||wt(),ht.length>1){var c=pt;r._showClone(t),r.options.animation&&!pt&&c&>.forEach((function(e){r.addAnimationState({target:e,rect:bt}),e.fromRect=bt,e.thisAnimationDuration=null}))}else r._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,a=e.isOwner,l=e.activeSortable;if(ht.forEach((function(e){e.thisAnimationDuration=null})),l.options.animation&&!a&&l.multiDrag.isMultiDrag){bt=o({},t);var r=T(mt,!0);bt.top-=r.f,bt.left-=r.e}},dragOverAnimationComplete:function(){Et&&(Et=!1,wt())},drop:function(e){var t=e.originalEvent,a=e.rootEl,l=e.parentEl,r=e.sortable,n=e.dispatchSortableEvent,s=e.oldIndex,o=e.putSortable,i=o||this.sortable;if(t){var c=this.options,u=l.children;if(!ft)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),C(mt,c.selectedClass,!~ht.indexOf(mt)),~ht.indexOf(mt))ht.splice(ht.indexOf(mt),1),ut=null,j({sortable:r,rootEl:a,name:"deselect",targetEl:mt,originalEvent:t});else{if(ht.push(mt),j({sortable:r,rootEl:a,name:"select",targetEl:mt,originalEvent:t}),t.shiftKey&&ut&&r.el.contains(ut)){var d,m,b=I(ut),p=I(mt);if(~b&&~p&&b!==p)for(p>b?(m=b,d=p):(m=p,d=b+1);m1){var h=S(mt),g=I(mt,":not(."+this.options.selectedClass+")");if(!vt&&c.animation&&(mt.thisAnimationDuration=null),i.captureAnimationState(),!vt&&(c.animation&&(mt.fromRect=h,ht.forEach((function(e){if(e.thisAnimationDuration=null,e!==mt){var t=Et?S(e):h;e.fromRect=t,i.addAnimationState({target:e,rect:t})}}))),wt(),ht.forEach((function(e){u[g]?l.insertBefore(e,u[g]):l.appendChild(e),g++})),s===I(mt))){var v=!1;ht.forEach((function(e){e.sortableIndex===I(e)||(v=!0)})),v&&n("update")}ht.forEach((function(e){G(e)})),i.animateAll()}dt=i}(a===l||o&&"clone"!==o.lastPutMode)&>.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=ft=!1,gt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),f(document,"pointerup",this._deselectMultiDrag),f(document,"mouseup",this._deselectMultiDrag),f(document,"touchend",this._deselectMultiDrag),f(document,"keydown",this._checkKeyDown),f(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==ft&&ft||dt!==this.sortable||e&&w(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;ht.length;){var t=ht[0];C(t,this.options.selectedClass,!1),ht.shift(),j({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},o(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[F];t&&t.options.multiDrag&&!~ht.indexOf(e)&&(dt&&dt!==t&&(dt.multiDrag._deselectMultiDrag(),dt=t),C(e,t.options.selectedClass,!0),ht.push(e))},deselect:function(e){var t=e.parentNode[F],a=ht.indexOf(e);t&&t.options.multiDrag&&~a&&(C(e,t.options.selectedClass,!1),ht.splice(a,1))}},eventProperties:function(){var e,t=this,a=[],l=[];return ht.forEach((function(e){var r;a.push({multiDragElement:e,index:e.sortableIndex}),r=Et&&e!==mt?-1:Et?I(e,":not(."+t.options.selectedClass+")"):I(e),l.push({multiDragElement:e,index:r})})),{items:(e=ht,function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(gt),oldIndicies:a,newIndicies:l}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function yt(e,t){gt.forEach((function(a,l){var r=t.children[a.sortableIndex+(e?Number(l):0)];r?t.insertBefore(a,r):t.appendChild(a)}))}function wt(){ht.forEach((function(e){e!==mt&&e.parentNode&&e.parentNode.removeChild(e)}))}Ve.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):this.options.supportPointer?E(document,"pointermove",this._handleFallbackAutoScroll):t.touches?E(document,"touchmove",this._handleFallbackAutoScroll):E(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?f(document,"dragover",this._handleAutoScroll):(f(document,"pointermove",this._handleFallbackAutoScroll),f(document,"touchmove",this._handleFallbackAutoScroll),f(document,"mousemove",this._handleFallbackAutoScroll)),lt(),at(),clearTimeout(_),_=void 0},nulling:function(){Qe=Ye=We=tt=Je=Xe=Ke=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var a=this,l=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,n=document.elementFromPoint(l,r);if(Qe=e,t||this.options.forceAutoScrollFallback||m||d||p){nt(e,this.options,n,t);var s=M(n,!0);!tt||Je&&l===Xe&&r===Ke||(Je&<(),Je=setInterval((function(){var n=M(document.elementFromPoint(l,r),!0);n!==s&&(s=n,at()),nt(e,a.options,n,t)}),10),Xe=l,Ke=r)}else{if(!this.options.bubbleScroll||M(n,!0)===L())return void at();nt(e,this.options,M(n,!1),!1)}}},o(e,{pluginName:"scroll",initializeByDefault:!0})}),Ve.mount(it,ot),t.default=Ve},2177:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return l}});function l(e,t){if(!e)throw new Error("Invariant failed")}},99196:function(e){"use strict";e.exports=window.React}},t={};function a(l){var r=t[l];if(void 0!==r)return r.exports;var n=t[l]={id:l,loaded:!1,exports:{}};return e[l](n,n.exports,a),n.loaded=!0,n.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e={};a.r(e),a.d(e,{accordion:function(){return er},anchorLinkNavigation:function(){return tr},card:function(){return ar},contentPageLayout:function(){return lr},ctaBanner:function(){return rr},ctaButton:function(){return nr},ctaCard:function(){return sr},ctaHero:function(){return or},facultyProfileCard:function(){return ir},featureStory:function(){return cr},imageShowcase:function(){return ur},imageToggleCard:function(){return dr},infoBoxHero:function(){return gr},latestPosts:function(){return yr},linkCard:function(){return wr},list:function(){return mr},proofpoint:function(){return br},purdueRss:function(){return pr},sidebarCta:function(){return hr},siteHero:function(){return vr},testimonial:function(){return Er},titleHero:function(){return fr},titleNav:function(){return kr}});var t=window.wp.element;const{__:__}=wp.i18n,{registerBlockType:l}=wp.blocks,{PanelBody:r,PanelRow:n,CheckboxControl:s,TextareaControl:o,TextControl:i,RadioControl:c,Button:u,ToggleControl:d,Disabled:m}=wp.components,{InspectorControls:b,MediaUploadCheck:p,MediaUpload:h,useBlockProps:g,InnerBlocks:v}=wp.blockEditor,{dispatch:E,select:f}=wp.data,k={slug:"purdue-blocks",title:__("Purdue Blocks")},y=f("core/blocks").getCategories().filter((e=>e.slug!==k.slug));E("core/blocks").setCategories([k,...y]);const w=[{faSlug:"facebook-f",name:"Facebook",share:"https://www.facebook.com/sharer/sharer.php?u="},{faSlug:"twitter",name:"Twitter",share:"https://twitter.com/intent/tweet?url="},{faSlug:"linkedin-in",name:"LinkedIn",share:"https://www.linkedin.com/shareArticle?mini=true&url="}];function x(){return x=Object.assign||function(e){for(var t=1;t{const a=document.querySelector("#siteHeroTitleInput"),l=document.activeElement===a;""===e.attributes.currUrl&&e.setAttributes({currUrl:f("core/editor").getPermalink()}),""!==e.attributes.pageTitle||l||e.setAttributes({pageTitle:f("core/editor").getCurrentPost().title});const d=e.attributes.checkedSocials,g=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(b,null,(0,t.createElement)(r,null,(0,t.createElement)(n,null,(0,t.createElement)(c,{label:"Hero Style",selected:e.attributes.styleToggle?"4060":"5050",options:[{label:"50/50",value:"5050"},{label:"40/60",value:"4060"}],onChange:t=>{e.setAttributes({styleToggle:"4060"===t})}})),(0,t.createElement)(n,null,(0,t.createElement)(c,{label:"Text Position",selected:e.attributes.align,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({align:t})}}))),(0,t.createElement)(r,null,(0,t.createElement)(n,null,(0,t.createElement)(o,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Add CTA links?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"Call to action text for first button",value:e.attributes.ctaText1,onChange:t=>e.setAttributes({ctaText1:t})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"First button link address",value:e.attributes.ctaUrl1,onChange:t=>e.setAttributes({ctaUrl1:t})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Open link of the first button in new tab?",checked:e.attributes.external1,onChange:()=>e.setAttributes({external1:!e.attributes.external1})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"Call to action text for second button",value:e.attributes.ctaText2,onChange:t=>e.setAttributes({ctaText2:t})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"Second button link address",value:e.attributes.ctaUrl2,onChange:t=>e.setAttributes({ctaUrl2:t})})):"",e.attributes.hasLink?(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Open link of the second button in new tab?",checked:e.attributes.external2,onChange:()=>e.setAttributes({external2:!e.attributes.external2})})):"",(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Include Social Share Links",help:"Would you like to include links to share this site on social media?",checked:e.attributes.includeSocial,onChange:()=>{e.attributes.includeSocial?e.setAttributes({includeSocial:!1}):e.setAttributes({includeSocial:!0})}})),e.attributes.includeSocial?w.map((a=>{let{faSlug:l,name:r}=a;return(0,t.createElement)(s,{label:r,checked:d[l],onChange:t=>{t?d[l]=!0:delete d[l],e.setAttributes({includeSocial:!0,checkedSocials:{...d}})}})})):""),(0,t.createElement)(r,null,(0,t.createElement)(n,null,(0,t.createElement)(s,{label:"Include a Jump to Article button",help:"Would you like to include a Jump to Article button?",checked:e.attributes.includeButton,onChange:()=>{e.attributes.includeButton?e.setAttributes({includeButton:!1}):e.setAttributes({includeButton:!0})}})),e.attributes.includeButton?(0,t.createElement)(n,null,(0,t.createElement)(i,{label:"ID of the element the button will jump to",value:e.attributes.anchor,onChange:t=>e.setAttributes({anchor:t})})):"")),(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add Page Title"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:e.attributes.pageTitle,className:"input",id:"siteHeroTitleInput",type:"text",placeholder:"Page Title...",onChange:t=>{e.setAttributes({pageTitle:t.target.value})}}))),(0,t.createElement)("span",null,"Add Intro Copy"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("textarea",{value:""!==e.attributes.subText?e.attributes.subText:"",className:"textarea",placeholder:"Add intro copy here...",onChange:t=>{e.setAttributes({subText:t.target.value})}}),(0,t.createElement)(v,null)))),(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Choose a Hero Image or Video"),(0,t.createElement)(p,null,(0,t.createElement)(h,{onSelect:t=>{console.log(t),e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt,mediaType:t.type,mediaTitle:t.title})},render:a=>{let{open:l}=a;return""!==e.attributes.imgUrl?"image"===e.attributes.mediaType?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Select a New image"),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:g},"Remove image")):"video"===e.attributes.mediaType?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)(m,null,(0,t.createElement)("video",{muted:!0,playsinline:"",src:e.attributes.imgUrl}))),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Select a New Video"),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:g},"Remove Video")):"":(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick an image or video from the media library."),(0,t.createElement)(u,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Open Media Library"))}}))))]},save:e=>e.attributes.styleToggle?(0,t.createElement)("div",{className:"bulma-blocks-40-60-hero"+("right"===e.attributes.align?" reversed-alignment":"")},(0,t.createElement)("div",{className:"hero is-medium"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("h1",null,e.attributes.pageTitle||f("core/editor").getCurrentPost().title),e.attributes.subText?(0,t.createElement)("p",null,e.attributes.subText):"",(0,t.createElement)(v.Content,null),e.attributes.hasLink&&(e.attributes.ctaText1||e.attributes.ctaText2)?(0,t.createElement)("div",{className:"cta-button-container"},e.attributes.ctaText1?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-light",href:e.attributes.ctaUrl1,target:e.attributes.external1?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText1):"",e.attributes.ctaText2?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-light purdue-blocks__button--outline",href:e.attributes.ctaUrl2,target:e.attributes.external2?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText2):""):"",e.attributes.includeSocial?(0,t.createElement)("div",{className:"level is-mobile"},(0,t.createElement)("div",{className:"level-left"},Object.keys(e.attributes.checkedSocials).map((a=>(0,t.createElement)("div",{className:"level-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:`${w.find((e=>e.faSlug===a)).share}${e.attributes.currUrl||f("core/editor").getPermalink()}`,className:"icon"},(0,t.createElement)("i",{className:`fab fa-lg fa-${a}`}))))))):"",e.attributes.includeButton&&e.attributes.anchor?(0,t.createElement)("a",{href:`#${e.attributes.anchor}`,className:"jump-button"},"jump to articles ",(0,t.createElement)("i",{className:"fas fa-arrow-down","aria-hidden":"true"})):""))),(0,t.createElement)("div",{className:"shadow"}),(0,t.createElement)("div",{className:"hero-image"},(0,t.createElement)("span",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText})))):(0,t.createElement)("div",{className:"bulma-blocks-50-50-hero"+("right"===e.attributes.align?" reversed-alignment":"")},(0,t.createElement)("div",{className:"hero is-medium"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("h1",null,e.attributes.pageTitle||f("core/editor").getCurrentPost().title),e.attributes.subText?(0,t.createElement)("p",null,e.attributes.subText):"",(0,t.createElement)(v.Content,null),e.attributes.hasLink&&(e.attributes.ctaText1||e.attributes.ctaText2)?(0,t.createElement)("div",{className:"cta-button-container"},e.attributes.ctaText1?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-dark",href:e.attributes.ctaUrl1,target:e.attributes.external1?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText1):"",e.attributes.ctaText2?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-dark purdue-blocks__button--outline",href:e.attributes.ctaUrl2,target:e.attributes.external2?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText2):""):"",e.attributes.includeSocial?(0,t.createElement)("div",{className:"level is-mobile"},(0,t.createElement)("div",{className:"level-left"},Object.keys(e.attributes.checkedSocials).map((a=>(0,t.createElement)("div",{className:"level-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:`${w.find((e=>e.faSlug===a)).share}${e.attributes.currUrl||f("core/editor").getPermalink()}`,className:"icon"},(0,t.createElement)("i",{className:`fab fa-lg fa-${a}`}))))))):"",e.attributes.includeButton&&e.attributes.anchor?(0,t.createElement)("a",{href:`#${e.attributes.anchor}`,className:"jump-button"},"jump to articles ",(0,t.createElement)("i",{className:"fas fa-arrow-down","aria-hidden":"true"})):""))),(0,t.createElement)("div",{className:"hero-image"},"image"===e.attributes.mediaType?(0,t.createElement)("span",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText}):"","video"===e.attributes.mediaType?(0,t.createElement)("video",{muted:"",title:e.attributes.mediaTitle,loop:"",autoplay:"",playsinline:"",src:e.attributes.imgUrl}):"")))});const{__:C}=wp.i18n,{registerBlockType:N}=wp.blocks,{PanelBody:T,PanelRow:A,CheckboxControl:L,TextareaControl:S,Button:B}=wp.components,{InspectorControls:H,MediaUploadCheck:U,MediaUpload:I,useBlockProps:P}=wp.blockEditor,{select:M}=wp.data;N("purdue-blocks/cta-hero",{title:C("CTA Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{pageTitle:{type:"string",default:""},ctaOptionalSub:{type:"string",default:""},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},imgUrl:{type:"string",default:""},imgMoUrl:{type:"string",default:""},altText:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:C("This block should be used at the top of the page. Choose a page title, an image, and the settings for the cta button."),edit:e=>{""===e.attributes.pageTitle&&e.setAttributes({pageTitle:M("core/editor").getCurrentPost().title});const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(H,null,(0,t.createElement)(T,null,(0,t.createElement)(A,null,(0,t.createElement)(S,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"bulma-blocks-editor-cta-hero"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add Page Title"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.pageTitle?e.attributes.pageTitle:"",className:"input",type:"text",placeholder:"Page Title...",onChange:t=>{e.setAttributes({pageTitle:t.target.value})}}))),(0,t.createElement)("span",null,"Add Optional Subtext"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaOptionalSub?e.attributes.ctaOptionalSub:"",className:"input",type:"textarea",placeholder:"Optional Subtext...",onChange:t=>{e.setAttributes({ctaOptionalSub:t.target.value})}}))),(0,t.createElement)("span",null,"Add CTA Button Text and URL"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Text"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaText?e.attributes.ctaText:"",className:"input",type:"text",placeholder:"CTA Text...",onChange:t=>{e.setAttributes({ctaText:t.target.value})}}))),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA URL"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaUrl?e.attributes.ctaUrl:"",className:"input",type:"text",placeholder:"CTA URL...",onChange:t=>{e.setAttributes({ctaUrl:t.target.value})}})))),(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Choose a Hero Image"),(0,t.createElement)(U,null,(0,t.createElement)(I,{onSelect:t=>{e.setAttributes({imgUrl:t.url,imgMoUrl:t.sizes&&t.sizes.hero_mobile?t.sizes.hero_mobile.url:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return""===e.attributes.imgUrl||e.attributes.imgError?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick a hero image from the media library."),(0,t.createElement)(B,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Open Media Library")):(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(B,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Select a New Image"),(0,t.createElement)(B,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove image"))}}))))]},save:e=>{const a=P.save();return(0,t.createElement)("div",x({},a,{className:"pu-cta-hero"}),(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"background-image","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("h1",null,e.attributes.pageTitle||M("core/editor").getCurrentPost().title),""!==e.attributes.ctaOptionalSub?(0,t.createElement)("p",null,e.attributes.ctaOptionalSub):"",""!==e.attributes.ctaText?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-hero__button"},e.attributes.ctaText):"")))))}});const{__:$}=wp.i18n,{registerBlockType:R}=wp.blocks,{PanelBody:O,PanelRow:D,TextControl:V,TextareaControl:G,Button:F,CheckboxControl:Z,RadioControl:q,Disabled:z}=wp.components,{InspectorControls:j,MediaUploadCheck:W,MediaUpload:Y,useBlockProps:X}=wp.blockEditor,{select:K}=wp.data,Q=["image"],J=["video"];R("purdue-blocks/title-hero",{title:$("Title Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",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)"})))),category:"purdue-blocks",keywords:[],attributes:{pageTitle:{type:"string",default:""},blockStyle:{type:"string",default:"united"},addSubtitle:{type:"boolean",default:!1},subTitle:{type:"string",default:""},subText:{type:"string",default:""},addBorder:{type:"boolean",default:!1},backgroundType:{type:"string",default:"image"},imgUrl:{type:"string",default:""},imgMoUrl:{type:"string",default:""},altText:{type:"string",default:""},videoUrl:{type:"string",default:""},videoId:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:$("This block should be used at the top of the page."),edit:e=>{""===e.attributes.pageTitle&&e.setAttributes({pageTitle:K("core/editor").getCurrentPost().title}),e.attributes.addSubtitle?e.setAttributes({blockStyle:"acumin"}):e.setAttributes({blockStyle:"united"});const a=()=>{e.setAttributes({videoUrl:""})},l=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(j,null,(0,t.createElement)(O,null,(0,t.createElement)(D,null,(0,t.createElement)(q,{label:"Hero Style",help:"Choose between two design styles using different font families.",selected:e.attributes.blockStyle,options:[{label:"Acumin Pro",value:"acumin"},{label:"United Sans",value:"united"}],onChange:t=>{e.setAttributes({blockStyle:t}),"united"===t?e.setAttributes({addSubtitle:!1}):e.setAttributes({addSubtitle:!0})}})),(0,t.createElement)(D,null,(0,t.createElement)(Z,{label:"Add A border?",help:"Would you like to add a gold border around the hero image?",checked:e.attributes.addBorder,onChange:()=>{e.attributes.addBorder?e.setAttributes({addBorder:!1}):e.setAttributes({addBorder:!0})}}))),(0,t.createElement)(O,null,(0,t.createElement)(D,null,(0,t.createElement)(q,{label:"Hero Media Type",help:"Choose to use a video or an image as the hero background. Note on mobile devices an image you select on the editor will be displayed for the 'Video' option.",selected:e.attributes.backgroundType,options:[{label:"Image",value:"image"},{label:"Video",value:"video"}],onChange:t=>{e.setAttributes({backgroundType:t})}})),(0,t.createElement)(D,null,(0,t.createElement)(G,{label:"Hero Image Alt Text",help:"When video is selected as hero media type, this is the Alt text of the image displaying on mobile devices.",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"purdue-blocks-editor-title-hero"},e.attributes.addSubtitle?(0,t.createElement)("span",null,"Add lead-in text"):"",e.attributes.addSubtitle?(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:e.attributes.subTitle,className:"input",type:"text",placeholder:"Lead-in text...",onChange:t=>{e.setAttributes({subTitle:t.target.value})}}))):"",(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add Page Title"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.pageTitle?e.attributes.pageTitle:"",className:"input",type:"text",placeholder:"Page Title...",onChange:t=>{e.setAttributes({pageTitle:t.target.value})}}))),e.attributes.addSubtitle?"":(0,t.createElement)("span",null,"Add the intro copy here."),e.attributes.addSubtitle?"":(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("textarea",{value:""!==e.attributes.subText?e.attributes.subText:"",className:"textarea",placeholder:"Add intro copy here...",onChange:t=>{e.setAttributes({subText:t.target.value})}})))),(0,t.createElement)("div",{className:"media-container"},"video"===e.attributes.backgroundType?(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("span",null,"Choose a Hero Video (Recommended size: less than 10 MB)"),(0,t.createElement)(W,null,(0,t.createElement)(Y,{accept:"video",allowedTypes:J,onSelect:t=>{e.setAttributes({videoUrl:t.url,videoId:t.id})},render:l=>{let{open:r}=l;return""!==e.attributes.videoUrl?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)(z,null,(0,t.createElement)("video",{muted:!0,playsinline:"",src:e.attributes.videoUrl})),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Select a New Video"),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove video")):(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick a video from the media library."),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Open Media Library"))}}))):"",(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("span",null,"Choose a Hero Image"),"video"===e.attributes.backgroundType?(0,t.createElement)("span",null," (To display on mobile devices)"):"",(0,t.createElement)(W,null,(0,t.createElement)(Y,{allowedTypes:Q,onSelect:t=>{e.setAttributes({imgUrl:t.url,imgMoUrl:t.sizes&&t.sizes.hero_mobile?t.sizes.hero_mobile.url:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:r}=a;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Select a New Image"),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Remove image")):(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick a hero image from the media library."),(0,t.createElement)(F,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Open Media Library"))}})))))]},save:e=>{const a=X.save();return(0,t.createElement)("div",x({},a,{className:"pu-title-hero"}),(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"+(e.attributes.addSubtitle?" with-lead-in":"")},(0,t.createElement)("div",{className:"background-image"+(e.attributes.addBorder?" has-border":""),"aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}},"video"===e.attributes.backgroundType?(0,t.createElement)("div",{class:"hero-video-container"},(0,t.createElement)("video",{muted:"",loop:"",autoplay:"",playsinline:"",src:e.attributes.videoUrl})):"","video"===e.attributes.backgroundType?(0,t.createElement)("div",{class:"hero-video-control"},(0,t.createElement)("button",{class:"video-pause-button"},(0,t.createElement)("span",{class:"sr-only"},"Pause"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-pause-circle","aria-hidden":"true"}))),(0,t.createElement)("button",{class:"video-play-button hide"},(0,t.createElement)("span",{class:"sr-only"},"Play"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-play-circle","aria-hidden":"true"})))):""),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},e.attributes.addSubtitle?(0,t.createElement)("h1",{className:"has-lead-in"},e.attributes.subTitle?(0,t.createElement)("span",{className:"lead-in"},e.attributes.subTitle):"",(0,t.createElement)("span",{className:"main-title"},e.attributes.pageTitle||K("core/editor").getCurrentPost().title)):(0,t.createElement)("h1",null,e.attributes.pageTitle||K("core/editor").getCurrentPost().title),e.attributes.addSubtitle?"":(0,t.createElement)("p",null,e.attributes.subText))))))}});const{__:ee}=wp.i18n,{registerBlockType:te}=wp.blocks,{PanelBody:ae,PanelRow:le,CheckboxControl:re,TextareaControl:ne,TextControl:se,RadioControl:oe,SelectControl:ie}=wp.components,{RichText:ce,InspectorControls:ue,MediaUploadCheck:de,MediaUpload:me,InnerBlocks:be,useBlockProps:pe}=wp.blockEditor;te("purdue-blocks/info-box-hero",{title:ee("Info Box Hero"),icon:(0,t.createElement)("svg",{id:"beee9f3b-cb8c-4d24-a612-41eb8927e111","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("rect",{width:"100",height:"100",rx:"8.55"}),(0,t.createElement)("g",{id:"b8e37998-d6c2-43d8-bc0b-0305d6f0a794","data-name":"Window-maximize"},(0,t.createElement)("path",{class:"color-fff",d:"M93.5037,20.09555v59.8176a8.16129,8.16129,0,0,1-8.15259,8.15259H14.64889A8.16128,8.16128,0,0,1,6.4963,79.91315V20.09555a8.16128,8.16128,0,0,1,8.15259-8.16129H85.35111A8.16129,8.16129,0,0,1,93.5037,20.09555ZM85.35111,39.12407H14.64889V78.88646a1.02669,1.02669,0,0,0,1.02669,1.02669H84.32443a1.02669,1.02669,0,0,0,1.02668-1.02669h0Z"}))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".title"},subText:{type:"string",source:"html",selector:"p.content"},imgUrl:{type:"string",default:""},titleLevel:{type:"string",default:"h1"}},supports:{className:!1,anchor:!0},description:ee("Create a Hero row with a 3:1 background image and small info content box."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(ue,null,(0,t.createElement)(ae,null,(0,t.createElement)(le,null,(0,t.createElement)(ie,{label:"Heading level of the title",value:e.attributes.titleLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(le,null,(0,t.createElement)(ne,{label:"Hero Bakcground Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"info-box-hero-editor"},(0,t.createElement)(de,null,(0,t.createElement)(me,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{class:"remove-button",onClick:a},"Remove image"):""),(0,t.createElement)("div",{className:"info-box-content"},(0,t.createElement)("div",{className:"title"},(0,t.createElement)(ce,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:"title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0,allowedFormats:[]})),(0,t.createElement)("div",{className:"content"},(0,t.createElement)(ce,{tagName:"p",value:e.attributes.subText,className:"content",onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Text",allowedFormats:[]}))))}})))]},save:e=>{const a=pe.save();return(0,t.createElement)("div",x({},a,{className:"info-box-hero"}),(0,t.createElement)("div",{className:"image",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"info-box-hero--content"},(0,t.createElement)(ce.Content,{className:"title",tagName:e.attributes.titleLevel,value:e.attributes.title}),""!==e.attributes.subText&&void 0!==e.attributes.subText?(0,t.createElement)(ce.Content,{className:"content",tagName:"p",value:e.attributes.subText}):""))))}});const{__:he}=wp.i18n,{registerBlockType:ge}=wp.blocks,{InnerBlocks:ve,useBlockProps:Ee}=wp.blockEditor,fe=[["core/list",{}]];ge("purdue-blocks/list",{title:he("Right Column - List"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 97.47"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Arrow-right",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-d9ab28",d:"M47.47,2.84a5.34,5.34,0,0,1,7.57,0L98.43,46.21a5.34,5.34,0,0,1,0,7.56L55,97.16a5.34,5.34,0,0,1-7.57,0l-4.95-5a5.35,5.35,0,0,1,.09-7.65L69.5,58.93H5.36A5.35,5.35,0,0,1,0,53.57V46.43a5.35,5.35,0,0,1,5.36-5.36H69.5L42.61,15.45a5.31,5.31,0,0,1-.09-7.65Z",transform:"translate(0 -1.27)"})))),category:"purdue-blocks",keywords:[],attributes:{header:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:he("This block adds a styled list with a header."),edit:e=>[(0,t.createElement)("div",{className:"purdue-blocks-editor-list"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add List Header"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.header?e.attributes.header:"",className:"input",type:"text",placeholder:"Content Header...",onChange:t=>{e.setAttributes({header:t.target.value})}}))),(0,t.createElement)("span",null,"Add List Body"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)(ve,{template:fe,templateLock:"all"})))))],save:e=>{const a=Ee.save();return(0,t.createElement)("div",x({},a,{className:"pu-list"}),e.attributes.header?(0,t.createElement)("h2",null,e.attributes.header):"",(0,t.createElement)(ve.Content,null))}});const{__:ke}=wp.i18n,{registerBlockType:ye}=wp.blocks,{PanelBody:we,PanelRow:_e,TextareaControl:xe,Button:Ce,RadioControl:Ne,CheckboxControl:Te}=wp.components,{InspectorControls:Ae,MediaUploadCheck:Le,MediaUpload:Se,useBlockProps:Be}=wp.blockEditor,{select:He}=wp.data;ye("purdue-blocks/cta-banner",{title:ke("CTA Banner"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Bookmark",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M87.5,9.37V100L50,78.12,12.5,100V9.37A9.38,9.38,0,0,1,21.87,0H78.13A9.38,9.38,0,0,1,87.5,9.37Zm-9.37,1.18A1.18,1.18,0,0,0,77,9.37H23.05a1.18,1.18,0,0,0-1.18,1.18V83.68L50,67.27,78.13,83.68Z",transform:"translate(-12.5 0)"})))),category:"purdue-blocks",keywords:[],attributes:{type:{type:"string",default:"gold"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},ctaDesc:{type:"string",default:""},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:ke("This block is for adding a CTA banner on the page."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(Ae,null,(0,t.createElement)(we,null,(0,t.createElement)(_e,null,(0,t.createElement)(Ne,{label:"CTA Banner Type",help:"Choose the type of Banner.",selected:e.attributes.type,options:[{label:"Black",value:"black"},{label:"Gold",value:"gold"},{label:"Gray",value:"gray"},{label:"Image",value:"image"}],onChange:t=>{e.setAttributes({type:t})}}))),"image"===e.attributes.type?(0,t.createElement)(we,null,(0,t.createElement)(_e,null,(0,t.createElement)(xe,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})}))):"",(0,t.createElement)(we,null,(0,t.createElement)("h2",null,"CTA Button Link setting"),(0,t.createElement)(_e,null,(0,t.createElement)(Te,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:"pu-blocks-editor-cta-banner"},(0,t.createElement)("div",{className:"content"},"image"!==e.attributes.type?(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Description Text"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaDesc?e.attributes.ctaDesc:"",className:"input",type:"text",placeholder:"CTA Description Text...",onChange:t=>{e.setAttributes({ctaDesc:t.target.value})}}))):"","gray"!==e.attributes.type?(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Button Text"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaText?e.attributes.ctaText:"",className:"input",type:"text",placeholder:"CTA Button Text...",onChange:t=>{e.setAttributes({ctaText:t.target.value})}}))):"",(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Link URL"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaUrl?e.attributes.ctaUrl:"",className:"input",type:"text",placeholder:"CTA URL...",onChange:t=>{e.setAttributes({ctaUrl:t.target.value})}})))),"image"===e.attributes.type?(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Choose a Background Image"),(0,t.createElement)(Le,null,(0,t.createElement)(Se,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"pu-blocks-editor-cta-banner__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(Ce,{className:"pu-blocks-editor-cta-banner__button",onClick:r},"Select a New Image"),(0,t.createElement)(Ce,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove image")):(0,t.createElement)("div",{className:"pu-blocks-editor-cta-banner__container"},(0,t.createElement)("p",{className:"pu-blocks-editor-cta-banner__description"},"Pick an image from the media library. The recommended aspect ratio is 3:2."),(0,t.createElement)(Ce,{className:"pu-blocks-editor-cta-banner__button",onClick:r},"Open Media Library"))}}))):"")]},save:e=>{const a=Be.save();return(0,t.createElement)("div",x({},a,{className:`pu-cta-banner${"gold"===e.attributes.type?" pu-cta-banner-gold":""}${"black"===e.attributes.type?" pu-cta-banner-black":""}\n ${"gray"===e.attributes.type?" pu-cta-banner-gray":""}${"image"===e.attributes.type?" pu-cta-banner-image":""}`,style:"image"===e.attributes.type&&e.attributes.imgUrl?{backgroundImage:`url(${e.attributes.imgUrl})`}:{},"aria-label":"image"===e.attributes.type&&e.attributes.altText?e.attributes.altText:""}),(0,t.createElement)("div",{className:"container"},"gray"===e.attributes.type?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-banner-gray__desc",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaDesc):"","image"===e.attributes.type?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-banner-image__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):"","gold"===e.attributes.type?(0,t.createElement)("p",{className:"pu-cta-banner-gold__desc"},e.attributes.ctaDesc):"","gold"===e.attributes.type?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-banner-gold__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):"","black"===e.attributes.type?(0,t.createElement)("p",{className:"pu-cta-banner-black__desc"},e.attributes.ctaDesc):"","black"===e.attributes.type?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-cta-banner-black__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))}});const{__:Ue}=wp.i18n,{registerBlockType:Ie}=wp.blocks,{PanelBody:Pe,PanelRow:Me,CheckboxControl:$e,TextareaControl:Re,TextControl:Oe,Button:De}=wp.components,{InspectorControls:Ve,MediaUploadCheck:Ge,MediaUpload:Fe,RichText:Ze,useBlockProps:qe}=wp.blockEditor;Ie("purdue-blocks/cta-button",{title:Ue("CTA Button"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"clone",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",d:"M100,9.38V71.87a9.38,9.38,0,0,1-9.37,9.38H81.25v9.37A9.38,9.38,0,0,1,71.87,100H9.37A9.38,9.38,0,0,1,0,90.62V28.13a9.38,9.38,0,0,1,9.37-9.38h9.38V9.38A9.38,9.38,0,0,1,28.12,0H90.63A9.38,9.38,0,0,1,100,9.38ZM71.87,89.45v-8.2H28.12a9.38,9.38,0,0,1-9.37-9.38V28.13h-8.2A1.17,1.17,0,0,0,9.37,29.3V89.45a1.17,1.17,0,0,0,1.18,1.17H70.7A1.17,1.17,0,0,0,71.87,89.45ZM90.63,70.7V10.55a1.17,1.17,0,0,0-1.18-1.17H29.3a1.17,1.17,0,0,0-1.18,1.17V70.7a1.17,1.17,0,0,0,1.18,1.17H89.45A1.17,1.17,0,0,0,90.63,70.7Z",transform:"translate(0 0)"})))),category:"purdue-blocks",keywords:[],attributes:{subText:{type:"string",default:""},link:{type:"string",default:""},ctaText:{type:"string",default:""},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:Ue("Create a card with an image, some text, and a call to action button."),edit:e=>[(0,t.createElement)(Ve,null,(0,t.createElement)(Pe,null,(0,t.createElement)(Me,null,(0,t.createElement)(Re,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(Me,null,(0,t.createElement)(Oe,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})),(0,t.createElement)(Me,null,(0,t.createElement)(Oe,{label:"Link address",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})),(0,t.createElement)(Me,null,(0,t.createElement)($e,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:"card cta-card cta-button-admin"},(0,t.createElement)(Ge,null,(0,t.createElement)(Fe,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{className:"image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)(De,{onClick:l},""!==e.attributes.imgUrl?"Select a new image":"Select an image (optional)"))}})),(0,t.createElement)("div",{className:"card-content"},(0,t.createElement)(Ze,{tagName:"p",value:e.attributes.subText,className:"content",onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Card Text"}),e.attributes.ctaText?(0,t.createElement)("div",{className:"cta-card__button"},(0,t.createElement)("span",null,e.attributes.ctaText)):""))],save:e=>{const a=qe.save();return(0,t.createElement)("a",x({},a,{className:"card cta-card",href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener"}),e.attributes.imgUrl?(0,t.createElement)("div",{className:"card-image"},(0,t.createElement)("figure",{className:"image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))):"",(0,t.createElement)("div",{className:"card-content"},(0,t.createElement)(Ze.Content,{className:"",tagName:"p",value:e.attributes.subText}),(0,t.createElement)("div",{className:"cta-card__button"},e.attributes.ctaText)))}});const{__:ze}=wp.i18n,{registerBlockType:je}=wp.blocks,{PanelBody:We,PanelRow:Ye,CheckboxControl:Xe,RadioControl:Ke,TextareaControl:Qe,TextControl:Je,Button:et}=wp.components,{InnerBlocks:tt,InspectorControls:at,MediaUploadCheck:lt,MediaUpload:rt,useBlockProps:nt}=wp.blockEditor,{select:st}=wp.data,ot=[{faSlug:"facebook-square",name:"Facebook",share:"https://www.facebook.com/"},{faSlug:"twitter-square",name:"Twitter",share:"https://twitter.com/"},{faSlug:"linkedin",name:"LinkedIn",share:"https://www.linkedin.com/in/"},{faSlug:"instagram",name:"Instagram",share:"https://www.instagram.com/"}],it=[["core/paragraph",{placeholder:"Add bio"}]];je("purdue-blocks/faculty-profile-card",{title:ze("Faculty Profile Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 77.78"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Address-card",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M100,19.44V80.56a8.33,8.33,0,0,1-8.33,8.33H8.33A8.33,8.33,0,0,1,0,80.56V19.44a8.33,8.33,0,0,1,8.33-8.33H91.67A8.33,8.33,0,0,1,100,19.44Zm-8.33,0H8.33V80.56H91.67Zm-75,49.45V65.56c0-5.53,5.22-10,11.66-10,2,0,3.11,1.38,7.78,1.38s5.9-1.38,7.78-1.38c6.44,0,11.66,4.47,11.66,10v3.33a3.63,3.63,0,0,1-3.88,3.33H20.56A3.63,3.63,0,0,1,16.67,68.89Zm8.33-30A11.11,11.11,0,1,1,36.11,50,11.12,11.12,0,0,1,25,38.89ZM61.11,37.5V34.72a1.4,1.4,0,0,1,1.39-1.39H81.94a1.39,1.39,0,0,1,1.39,1.39V37.5a1.39,1.39,0,0,1-1.39,1.39H62.5A1.4,1.4,0,0,1,61.11,37.5Zm0,11.11V45.83a1.4,1.4,0,0,1,1.39-1.39H81.94a1.39,1.39,0,0,1,1.39,1.39v2.78A1.39,1.39,0,0,1,81.94,50H62.5A1.39,1.39,0,0,1,61.11,48.61Zm0,11.11V56.94a1.39,1.39,0,0,1,1.39-1.38H81.94a1.38,1.38,0,0,1,1.39,1.38v2.78a1.39,1.39,0,0,1-1.39,1.39H62.5A1.39,1.39,0,0,1,61.11,59.72Z",transform:"translate(0 -11.11)"})))),category:"purdue-blocks",keywords:[],attributes:{profilePhoto:{type:"string",default:""},altText:{type:"string",default:""},phone:{type:"string",default:""},email:{type:"string",default:""},personalLink:{type:"string",default:""},personalLinkText:{type:"string",default:""},extraLink:{type:"string",default:""},name:{type:"string",default:""},title:{type:"string",default:""},bio:{type:"string",default:""},styleToggle:{type:"string",default:"wide"},includeSocial:{type:"boolean",default:!1},checkedSocials:{type:"object",default:{}},titlePosition:{type:"boolean",default:!1},bioPosition:{type:"boolean",default:!1},street:{type:"string",default:""},city:{type:"string",default:""},state:{type:"string",default:""},zip:{type:"string",default:""},officePhone:{type:"string",default:""},fax:{type:"string",default:""},height:{type:"string",default:"auto"}},supports:{className:!1,anchor:!0},description:ze("This block renders a card that can contain a photo, the contact information, and the social media links for a faculty member."),edit:e=>{const a=e.attributes.checkedSocials,l=()=>{e.attributes.includeSocial?e.setAttributes({includeSocial:!1}):e.setAttributes({includeSocial:!0})},r=()=>{e.setAttributes({profilePhoto:""})};return[(0,t.createElement)(at,null,(0,t.createElement)(We,null,(0,t.createElement)(Ye,null,(0,t.createElement)(Ke,{label:"Card Style",help:"The wide card accepts a 2x1 image and presents the name, title, and social links at the bottom of the card. The narrow card accepts a square image and presents the name, title, and social links at the top of the card. The Mini card has no image, social links, or description.",selected:e.attributes.styleToggle,options:[{label:"Wide",value:"wide"},{label:"Narrow",value:"narrow"},{label:"Mini",value:"mini"}],onChange:t=>{e.setAttributes({styleToggle:t})}})),(0,t.createElement)(Ye,null,(0,t.createElement)(Ke,{label:"Height",help:"Select 100% if you want the card to take the full height of its container.",selected:e.attributes.height,options:[{label:"Auto",value:"auto"},{label:"100%",value:"full"}],onChange:t=>{e.setAttributes({height:t})}}))),(0,t.createElement)(We,null,(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{label:"Place title on the right?",checked:e.attributes.titlePosition,onChange:()=>e.setAttributes({titlePosition:!e.attributes.titlePosition})})),"mini"!==e.attributes.styleToggle?(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{label:"Place Faculty Bio on the right?",checked:e.attributes.bioPosition,onChange:()=>e.setAttributes({bioPosition:!e.attributes.bioPosition})})):"",(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{label:"Include Social Media Links",help:"Would you like to include this faculty member's social media account links?",checked:e.attributes.includeSocial,onChange:l})),"mini"!==e.attributes.styleToggle?(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{label:"Include Social Media Links",help:"Would you like to include this faculty member's social media account links?",checked:e.attributes.includeSocial,onChange:l})):"",e.attributes.includeSocial?(0,t.createElement)(Ye,{className:"social-check-list"},ot.map((l=>{let{faSlug:r,name:n}=l;return(0,t.createElement)(Ye,null,(0,t.createElement)(Xe,{className:"social-check-list__item",label:n,checked:!!a[n]&&a[n].checked,onChange:t=>{t?(a[n]={},a[n].slug=r,a[n].checked=!0):delete a[n],e.setAttributes({includeSocial:!0,checkedSocials:{...a}})}}),void 0!==a[n]&&!0===a[n].checked?(0,t.createElement)(Je,{label:`${n} Profile Link`,type:"text",value:a[n].link,onChange:t=>{a[n].link=t,e.setAttributes({checkedSocials:{...a}})}}):"")}))):""),(0,t.createElement)(We,null,(0,t.createElement)(Ye,null,(0,t.createElement)(Qe,{label:"Profile Picture Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"pu-blocks-editor-faculty-profile"},(0,t.createElement)("div",{className:"columns"},"mini"!==e.attributes.styleToggle?(0,t.createElement)("div",{className:"content column"},(0,t.createElement)("span",null,"Choose a Profile Picture"),(0,t.createElement)(lt,null,(0,t.createElement)(rt,{onSelect:t=>{e.setAttributes({profilePhoto:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return""!==e.attributes.profilePhoto?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.profilePhoto})),(0,t.createElement)(et,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Select a New Image"),(0,t.createElement)(et,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Remove image")):(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick an image from the media library."),(0,t.createElement)(et,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Open Media Library"))}}))):"",(0,t.createElement)("div",{className:"content column"},(0,t.createElement)("span",null,"Add Phone Number"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.phone?e.attributes.phone:"",className:"input",type:"text",placeholder:"Phone Number...",onChange:t=>{e.setAttributes({phone:t.target.value})}}))),(0,t.createElement)("span",null,"Add Fax Number"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.fax?e.attributes.fax:"",className:"input",type:"text",placeholder:"Fax Number...",onChange:t=>{e.setAttributes({fax:t.target.value})}}))),(0,t.createElement)("span",null,"Add Email Address"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.email?e.attributes.email:"",className:"input",type:"text",placeholder:"Email...",onChange:t=>{e.setAttributes({email:t.target.value})}}))),(0,t.createElement)("span",null,"Add Optional Personal Website or page"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.personalLink?e.attributes.personalLink:"",className:"input",type:"text",placeholder:"Link URL...",onChange:t=>{e.setAttributes({personalLink:t.target.value.trim()})}}))),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.personalLinkText?e.attributes.personalLinkText:"",className:"input",type:"text",placeholder:"Link Text...",onChange:t=>{e.setAttributes({personalLinkText:t.target.value})}}),(0,t.createElement)("span",{style:{fontStyle:"italic"}},"Link text is optional. When left empty it'll use the link URL."))),(0,t.createElement)("span",null,"Add Optional Google Scholar Link"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.extraLink?e.attributes.extraLink:"",className:"input",type:"text",placeholder:"Google Scholar Link...",onChange:t=>{e.setAttributes({extraLink:t.target.value.trim()})}}))))),(0,t.createElement)("div",{className:"content main-info"},(0,t.createElement)("span",null,"Optional Address"),(0,t.createElement)("div",{className:"address-form"},(0,t.createElement)("div",{className:"field street"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.street?e.attributes.street:"",className:"input",type:"text",placeholder:"Street...",onChange:t=>{e.setAttributes({street:t.target.value})}}))),(0,t.createElement)("div",{className:"field city"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.city?e.attributes.city:"",className:"input",type:"text",placeholder:"City...",onChange:t=>{e.setAttributes({city:t.target.value})}}))),(0,t.createElement)("div",{className:"field state"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.state?e.attributes.state:"",className:"input",type:"text",placeholder:"State...",onChange:t=>{e.setAttributes({state:t.target.value})}}))),(0,t.createElement)("div",{className:"field zip"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.zip?e.attributes.zip:"",className:"input",type:"text",placeholder:"Zipcode...",onChange:t=>{e.setAttributes({zip:t.target.value})}}))),(0,t.createElement)("div",{className:"field office-phone"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.officePhone?e.attributes.officePhone:"",className:"input",type:"text",placeholder:"Office Phone Number...",onChange:t=>{e.setAttributes({officePhone:t.target.value})}})))),(0,t.createElement)("span",null,"Faculty Name"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.name?e.attributes.name:"",className:"input",type:"text",placeholder:"Faculty Name...",onChange:t=>{e.setAttributes({name:t.target.value})}}))),(0,t.createElement)("span",null,"Faculty Position"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.title?e.attributes.title:"",className:"input",type:"text",placeholder:"Faculty Position...",onChange:t=>{e.setAttributes({title:t.target.value})}}))),"mini"!==e.attributes.styleToggle?(0,t.createElement)("span",null,"Optional Faculty Bio"):"","mini"!==e.attributes.styleToggle?e.attributes.bioPosition?(0,t.createElement)(tt,{template:it,templateLock:!1}):(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("textarea",{value:""!==e.attributes.bio?e.attributes.bio:"",className:"input",placeholder:"Faculty Bio...",onChange:t=>{e.setAttributes({bio:t.target.value})}}))):""))]},save:e=>{const a=nt.save();return""==e.attributes.name?(0,t.createElement)("div",x({},a,{className:`faculty-profile-card faculty-profile-card--${e.attributes.styleToggle} box${"auto"===e.attributes.height?"":" faculty-profile-card--full-height"}`}),(0,t.createElement)("div",{className:"media"},(0,t.createElement)("div",{className:"media-left"},(0,t.createElement)("div",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.profilePhoto}))),(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("ul",null,""!==e.attributes.phone?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-phone","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.phone),(0,t.createElement)("span",null,"Phone"))):"",""!==e.attributes.fax?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-fax","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.fax),(0,t.createElement)("span",null,"Fax"))):"",""!==e.attributes.email?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-envelope","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:`mailto:${e.attributes.email}`},e.attributes.email),(0,t.createElement)("span",null,"Email"))):"",""!==e.attributes.street||""!==e.attributes.city||""!==e.attributes.state||""!==e.attributes.zip||""!==e.attributes.officePhone?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-address-book","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.street,e.attributes.street?(0,t.createElement)("br",null):"",`${e.attributes.city?`${e.attributes.city}, `:""}${e.attributes.state?`${e.attributes.state} `:""}${e.attributes.zip}`,(0,t.createElement)("br",null),""!==e.attributes.officePhone.replace(/\s+/g,"")?`Office: ${e.attributes.officePhone}`:""),(0,t.createElement)("span",null,"Address"))):"",""!==e.attributes.personalLink?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-desktop","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:e.attributes.personalLink.includes("https://")?e.attributes.personalLink:`https://${e.attributes.personalLink}`},e.attributes.personalLinkText?e.attributes.personalLinkText:e.attributes.personalLink),(0,t.createElement)("span",null,"Personal Website"))):"",""!==e.attributes.extraLink?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-link","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:e.attributes.extraLink.includes("https://")?e.attributes.extraLink:`https://${e.attributes.extraLink}`},"Google Scholar Website"))):"")))),""!==e.attributes.bio&&"mini"!==e.attributes.styleToggle?(0,t.createElement)("div",{className:"content"},e.attributes.bioPosition?(0,t.createElement)(tt.Content,null):(0,t.createElement)("p",null,e.attributes.bio)):"",(0,t.createElement)("div",{className:"level is-mobile"},e.attributes.includeSocial?(0,t.createElement)("div",{className:"level-right content"},(0,t.createElement)("p",{className:"level-item"},"Follow Me: "),Object.keys(e.attributes.checkedSocials).map((a=>(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",className:"level-item",href:`${e.attributes.checkedSocials[a].link}`},(0,t.createElement)("i",{className:`fab fa-${e.attributes.checkedSocials[a].slug}`,"aria-hidden":"true"}))))):"")):(0,t.createElement)("div",x({},a,{className:`faculty-profile-card faculty-profile-card--${e.attributes.styleToggle} box${"auto"===e.attributes.height?"":" faculty-profile-card--full-height"}`}),(0,t.createElement)("div",{className:"media"},(0,t.createElement)("div",{className:"media-left"},(0,t.createElement)("div",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.profilePhoto}))),(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("div",{className:"content"},e.attributes.titlePosition?(0,t.createElement)("p",{className:"faculty-title faculty-title-side"},e.attributes.title):"",e.attributes.bioPosition&&"mini"!==e.attributes.styleToggle?(0,t.createElement)(tt.Content,null):"",(0,t.createElement)("ul",null,""!==e.attributes.phone?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-phone","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.phone),(0,t.createElement)("span",null,"Phone"))):"",""!==e.attributes.fax?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-fax","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.fax),(0,t.createElement)("span",null,"Fax"))):"",""!==e.attributes.email?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-envelope","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:`mailto:${e.attributes.email}`},e.attributes.email),(0,t.createElement)("span",null,"Email"))):"",""!==e.attributes.street||""!==e.attributes.city||""!==e.attributes.state||""!==e.attributes.zip||""!==e.attributes.officePhone?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-address-book","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("p",null,e.attributes.street,e.attributes.street?(0,t.createElement)("br",null):"",`${e.attributes.city?`${e.attributes.city}, `:""}${e.attributes.state?`${e.attributes.state} `:""}${e.attributes.zip}`,(0,t.createElement)("br",null),""!==e.attributes.officePhone.replace(/\s+/g,"")?`Office: ${e.attributes.officePhone}`:""),(0,t.createElement)("span",null,"Address"))):"",""!==e.attributes.personalLink?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-desktop","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:e.attributes.personalLink.includes("https://")?e.attributes.personalLink:`https://${e.attributes.personalLink}`},e.attributes.personalLinkText?e.attributes.personalLinkText:e.attributes.personalLink),(0,t.createElement)("span",null,"Personal Website"))):"",""!==e.attributes.extraLink?(0,t.createElement)("li",null,(0,t.createElement)("i",{className:"fas fa-link","aria-hidden":"true"}),(0,t.createElement)("div",{className:"profile-info-item"},(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:e.attributes.extraLink.includes("https://")?e.attributes.extraLink:`https://${e.attributes.extraLink}`},"Google Scholar Website"))):"")))),""===e.attributes.bio||e.attributes.bioPosition||"mini"===e.attributes.styleToggle?"":(0,t.createElement)("div",{className:"content"},(0,t.createElement)("p",null,e.attributes.bio)),(0,t.createElement)("div",{className:"level"},(0,t.createElement)("div",{className:"level-left"},(0,t.createElement)("div",{className:"level-item"},(0,t.createElement)("p",{className:"faculty-name"},e.attributes.name),e.attributes.titlePosition?"":(0,t.createElement)("p",{className:"faculty-title"},e.attributes.title))),e.attributes.includeSocial?(0,t.createElement)("div",{className:"level-right content"},(0,t.createElement)("p",{className:"level-item"},"Follow Me: "),Object.keys(e.attributes.checkedSocials).map((a=>(0,t.createElement)("a",{target:"_blank",rel:"noopener noreferrer",className:"level-item",href:`${e.attributes.checkedSocials[a].link}`},(0,t.createElement)("i",{className:`fab fa-${e.attributes.checkedSocials[a].slug}`,"aria-hidden":"true"}))))):""))}});const{__:ct}=wp.i18n,{registerBlockType:ut}=wp.blocks,{PanelBody:dt,PanelRow:mt,TextareaControl:bt,TextControl:pt,Button:ht,RadioControl:gt,CheckboxControl:vt,SelectControl:Et}=wp.components,{InspectorControls:ft,MediaUploadCheck:kt,MediaUpload:yt,InnerBlocks:wt,useBlockProps:_t}=wp.blockEditor,xt=[["core/paragraph",{placeholder:"Body content copy"}]];ut("purdue-blocks/feature-story",{title:ct("Featured Story"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 68.75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M84.38,34.38A34.21,34.21,0,0,1,75.87,57c-3.25,3.71-8.35,11.49-10.24,18H56.26v0a11,11,0,0,1,.43-2.79A61.73,61.73,0,0,1,68.82,50.81a25,25,0,1,0-37.64,0A61.7,61.7,0,0,1,43.33,72.23,9.49,9.49,0,0,1,43.74,75v0H34.37c-1.89-6.51-7-14.29-10.24-18A34.37,34.37,0,1,1,84.38,34.38ZM53.12,18.75A3.12,3.12,0,0,1,50,21.88a12.51,12.51,0,0,0-12.5,12.5,3.13,3.13,0,0,1-6.25,0A18.77,18.77,0,0,1,50,15.63,3.11,3.11,0,0,1,53.12,18.75ZM34.38,81.25H65.62v8.43a3.11,3.11,0,0,1-.52,1.73L60.3,98.6a3.1,3.1,0,0,1-2.6,1.4H42.3a3.1,3.1,0,0,1-2.6-1.4l-4.79-7.19a3.11,3.11,0,0,1-.52-1.73Z",transform:"translate(-15.62)"})))),category:"purdue-blocks",keywords:[],attributes:{style:{type:"boolean",default:!0},header:{type:"string",default:""},imgUrl:{type:"string",default:""},linkImg:{type:"boolean",default:!1},altText:{type:"string",default:""},caption:{type:"string",default:""},contentAlign:{type:"string",default:"left"},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},addCta2:{type:"boolean",default:!1},ctaUrl2:{type:"string",default:""},ctaText2:{type:"string",default:""},external2:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h2"},headerColor:{type:"string",default:"gold"},buttonOption:{type:"string",default:"black"},backgroundColor:{type:"string",default:"white"},addBorder:{type:"boolean",default:!1},borderColor:{type:"string",default:"gold"}},supports:{className:!1,anchor:!0},description:ct("This block adds a feature story row on the page."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(ft,null,(0,t.createElement)(dt,null,(0,t.createElement)(mt,null,(0,t.createElement)(gt,{label:"Block Styles",help:"Full Width: Takes up the full width of the screen; Aligned: Includes normal page margins.",selected:e.attributes.style?"full":"aligned",options:[{label:"Aligned",value:"aligned"},{label:"Full width",value:"full"}],onChange:t=>{e.setAttributes({style:"full"===t})}})),e.attributes.style?(0,t.createElement)(mt,null,(0,t.createElement)(gt,{label:"Background Color",help:"Choose the background color of the content area.",selected:e.attributes.backgroundColor,options:[{label:"White",value:"white"},{label:"Black",value:"black"}],onChange:t=>{e.setAttributes({backgroundColor:t}),e.setAttributes({headerColor:"gold"}),e.setAttributes({borderColor:"gold"})}})):"",e.attributes.style&&!e.attributes.caption?(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Add a Border?",checked:e.attributes.addBorder,onChange:()=>e.setAttributes({addBorder:!e.attributes.addBorder})})):"",e.attributes.style&&!e.attributes.caption&&e.attributes.addBorder?(0,t.createElement)(mt,null,(0,t.createElement)(Et,{label:"Color of the Border",value:e.attributes.borderColor,options:"white"===e.attributes.backgroundColor?[{label:"Black",value:"black"},{label:"Rush Gold",value:"gold"}]:[{label:"Boiler Gold",value:"gold"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({borderColor:t})}})):"",(0,t.createElement)(mt,null,(0,t.createElement)(gt,{label:"Image Alignment",help:"Choose to place the image to the left or right.",selected:e.attributes.contentAlign,options:[{label:"Left",value:"right"},{label:"Right",value:"left"}],onChange:t=>{e.setAttributes({contentAlign:t})}}))),(0,t.createElement)(dt,null,(0,t.createElement)(mt,null,(0,t.createElement)(Et,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}})),(0,t.createElement)(mt,null,(0,t.createElement)(Et,{label:"Color of the Header",value:e.attributes.headerColor,options:"white"===e.attributes.backgroundColor?[{label:"Black",value:"black"},{label:"Digital Gold",value:"gold"},{label:"Steel",value:"steel"}]:[{label:"Boiler Gold",value:"gold"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({headerColor:t})}}))),e.attributes.ctaUrl?(0,t.createElement)(dt,null,(0,t.createElement)("h2",null,"CTA Button Link setting"),(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})),(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Link image?",help:"Would you like to add the same link to image?",checked:e.attributes.linkImg,onChange:()=>{e.attributes.linkImg?e.setAttributes({linkImg:!1}):e.setAttributes({linkImg:!0})}})),e.attributes.style&&"white"===e.attributes.backgroundColor?(0,t.createElement)(mt,null,(0,t.createElement)(Et,{label:"Button Color",help:"Choose the color of this button.",value:e.attributes.buttonOption,options:[{label:"Black",value:"black"},{label:"Gold",value:"gold"}],onChange:t=>{e.setAttributes({buttonOption:t})}})):"",e.attributes.style&&!e.attributes.linkImg?(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Add a Secondary CTA Button?",help:"Would you like to add a secondary CTA button below the primary one?",checked:e.attributes.addCta2,onChange:()=>e.setAttributes({addCta2:!e.attributes.addCta2})})):"",e.attributes.style&&!e.attributes.linkImg&&e.attributes.addCta2?(0,t.createElement)(mt,null,(0,t.createElement)(pt,{label:"Secondary CTA Button Link Text",value:e.attributes.ctaText2,onChange:t=>e.setAttributes({ctaText2:t})})):"",e.attributes.style&&!e.attributes.linkImg&&e.attributes.addCta2?(0,t.createElement)(mt,null,(0,t.createElement)(pt,{label:"Secondary CTA Button Link URL",value:e.attributes.ctaUrl2,onChange:t=>e.setAttributes({ctaUrl2:t})})):"",e.attributes.style&&!e.attributes.linkImg&&e.attributes.addCta2?(0,t.createElement)(mt,null,(0,t.createElement)(vt,{label:"Open the link of Secondary CTA Button in a new tab?",checked:e.attributes.external2,onChange:()=>e.setAttributes({external2:!e.attributes.external2})})):""):"",(0,t.createElement)(dt,null,(0,t.createElement)(mt,null,(0,t.createElement)(bt,{label:"Featured Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(mt,null,(0,t.createElement)(bt,{label:"Image Caption",value:e.attributes.caption,onChange:t=>e.setAttributes({caption:t})})))),(0,t.createElement)("div",{className:"purdue-blocks-editor-feature-story"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add A Header"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.header?e.attributes.header:"",className:"input",type:"text",placeholder:"Content Header...",onChange:t=>{e.setAttributes({header:t.target.value})}}))),(0,t.createElement)("span",null,"Add Content Body"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)(wt,{template:xt,templateLock:!1}))),(0,t.createElement)("span",null,"Add CTA Button Text and URL"),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA Text"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaText?e.attributes.ctaText:"",className:"input",type:"text",placeholder:"CTA Text...",onChange:t=>{e.setAttributes({ctaText:t.target.value})}}))),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",{className:"label"},"CTA URL"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.ctaUrl?e.attributes.ctaUrl:"",className:"input",type:"text",placeholder:"CTA URL...",onChange:t=>{e.setAttributes({ctaUrl:t.target.value})}})))),(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Choose a Hero Image"),(0,t.createElement)(kt,null,(0,t.createElement)(yt,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"purdue-blocks-editor-feature-story__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(ht,{className:"bulma-blocks-editor-site-hero__button",onClick:r},"Select a New Image"),(0,t.createElement)(ht,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove image")):(0,t.createElement)("div",{className:"purdue-blocks-editor-feature-story__container"},(0,t.createElement)("p",{className:"purdue-blocks-editor-feature-story__description"},"Pick an image from the media library. The recommended aspect ratio is 3:2."),(0,t.createElement)(ht,{className:"purdue-blocks-editor-feature-story__button",onClick:r},"Open Media Library"))}}))))]},save:e=>{const a=_t.save();return e.attributes.style?(0,t.createElement)("div",x({},a,{className:"pu-feature-story"+("black"===e.attributes.backgroundColor?" pu-feature-story__black":"")}),(0,t.createElement)("div",{className:"hero is-medium"},e.attributes.linkImg&&e.attributes.ctaUrl?(0,t.createElement)("a",{className:"left"===e.attributes.contentAlign?"hero-image":"hero-image-reversed",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("span",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText}),e.attributes.caption?(0,t.createElement)("span",{className:"feature-story-caption"},e.attributes.caption):""):(0,t.createElement)("div",{className:"left"===e.attributes.contentAlign?"hero-image":"hero-image-reversed"},(0,t.createElement)("span",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText}),e.attributes.caption?(0,t.createElement)("span",{className:"feature-story-caption"},e.attributes.caption):""),e.attributes.style&&!e.attributes.caption&&e.attributes.addBorder?(0,t.createElement)("div",{className:"pu-feature-story__border"+(e.attributes.style&&!e.attributes.caption&&e.attributes.addBorder&&"gold"===e.attributes.borderColor?" pu-feature-story__border--gold":"")}):"",(0,t.createElement)("div",{className:"left"===e.attributes.contentAlign?"shadow":"shadow-reversed"}),(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:`content${"left"===e.attributes.contentAlign?"":" content-reversed"}${"white"===e.attributes.backgroundColor&&"black"===e.attributes.headerColor?" header-color-black":""}${"white"===e.attributes.backgroundColor&&"steel"===e.attributes.headerColor?" header-color-steel":""}${"black"===e.attributes.backgroundColor&&"white"===e.attributes.headerColor?" header-color-white":""}`},e.attributes.header&&"h1"===e.attributes.headerLevel?(0,t.createElement)("h1",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h2"===e.attributes.headerLevel?(0,t.createElement)("h2",null,e.attributes.header):"",e.attributes.header&&"h3"===e.attributes.headerLevel?(0,t.createElement)("h3",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h4"===e.attributes.headerLevel?(0,t.createElement)("h4",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h5"===e.attributes.headerLevel?(0,t.createElement)("h5",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h6"===e.attributes.headerLevel?(0,t.createElement)("h6",{class:"featured-story-header"},e.attributes.header):"",(0,t.createElement)(wt.Content,null),e.attributes.ctaUrl&&e.attributes.ctaText?e.attributes.addCta2&&e.attributes.ctaText2&&e.attributes.style&&!e.attributes.linkImg?(0,t.createElement)("div",{className:"pu-feature-story__button-container"},(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-feature-story__button"+("gold"===e.attributes.buttonOption?" pu-feature-story__button--gold":""),target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText),(0,t.createElement)("a",{href:e.attributes.ctaUrl2,className:"pu-feature-story__button pu-feature-story__button--second",target:e.attributes.external2?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText2)):(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-feature-story__button"+("gold"===e.attributes.buttonOption?" pu-feature-story__button--gold":""),target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))))):(0,t.createElement)("div",x({},a,{className:"pu-feature-story pu-feature-story__narrow"}),(0,t.createElement)("div",{className:"container pu-feature-story__container"+("left"===e.attributes.contentAlign?"":" pu-feature-story__container-reversed")},e.attributes.linkImg&&e.attributes.ctaUrl?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"background-image-link",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("div",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText}),e.attributes.caption?(0,t.createElement)("span",{className:"feature-story-caption"},e.attributes.caption):""):(0,t.createElement)("div",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},e.attributes.caption?(0,t.createElement)("span",{className:"feature-story-caption"},e.attributes.caption):""),(0,t.createElement)("div",{className:`story-content${"black"===e.attributes.headerColor?" header-color-black":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}`},e.attributes.header&&"h1"===e.attributes.headerLevel?(0,t.createElement)("h1",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h2"===e.attributes.headerLevel?(0,t.createElement)("h2",null,e.attributes.header):"",e.attributes.header&&"h3"===e.attributes.headerLevel?(0,t.createElement)("h3",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h4"===e.attributes.headerLevel?(0,t.createElement)("h4",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h5"===e.attributes.headerLevel?(0,t.createElement)("h5",{class:"featured-story-header"},e.attributes.header):"",e.attributes.header&&"h6"===e.attributes.headerLevel?(0,t.createElement)("h6",{class:"featured-story-header"},e.attributes.header):"",(0,t.createElement)(wt.Content,null),e.attributes.ctaUrl&&e.attributes.ctaText?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-feature-story__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):"")))}});const{__:Ct}=wp.i18n,{registerBlockType:Nt}=wp.blocks,{PanelBody:Tt,PanelRow:At,TextControl:Lt,TextareaControl:St,Button:Bt,CheckboxControl:Ht,RadioControl:Ut}=wp.components,{InspectorControls:It,MediaUploadCheck:Pt,MediaUpload:Mt,InnerBlocks:$t,useBlockProps:Rt,RichText:Ot}=wp.blockEditor;Nt("purdue-blocks/proofpoint",{title:Ct("Reasons to Believe"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Bookmark",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",d:"M87.5,9.37V100L50,78.12,12.5,100V9.37A9.38,9.38,0,0,1,21.87,0H78.13A9.38,9.38,0,0,1,87.5,9.37Zm-9.37,1.18A1.18,1.18,0,0,0,77,9.37H23.05a1.18,1.18,0,0,0-1.18,1.18V83.68L50,67.27,78.13,83.68Z",transform:"translate(-12.5 0)"})))),category:"purdue-blocks",keywords:[],attributes:{color:{type:"string",default:"black"},border:{type:"boolean",default:!1},buttonColor:{type:"string",default:"black"},hasLead:{type:"boolean",default:!1},lead:{type:"string",default:""},highlighted:{type:"string",default:""},headerfontStyle:{type:"string",default:"narrow"},contentfontStyle:{type:"string",default:"narrow"},content:{type:"string",default:""},source:{type:"string",default:""},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},height:{type:"string",default:"auto"},boxshadow:{type:"boolean",default:!0}},supports:{className:!0,anchor:!0},description:Ct("This block adds a Reasons to Believe card."),edit:e=>[(0,t.createElement)(It,null,(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Background Color",help:"Choose to background color of the proofpoint.",selected:e.attributes.color,options:[{label:"Black",value:"black"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({color:t})}})),(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Height",help:"Choose to the height of the proofpoint.",selected:e.attributes.height,options:[{label:"Auto",value:"auto"},{label:"100%",value:"full"}],onChange:t=>{e.setAttributes({height:t})}})),(0,t.createElement)(At,null,(0,t.createElement)(Ht,{label:"Add Lead Text above Highlighted Text?",checked:e.attributes.hasLead,onChange:()=>e.setAttributes({hasLead:!e.attributes.hasLead})}))),"white"===e.attributes.color?(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ht,{label:"Add box shadow?",help:"Would you like to add box shadow around the proofpoint?",checked:e.attributes.boxshadow,onChange:()=>{e.setAttributes({boxshadow:!e.attributes.boxshadow})}}))):"","white"===e.attributes.color?(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ht,{label:"Add border?",help:"Would you like to add border at the top to the proofpoint?",checked:e.attributes.border,onChange:()=>{e.attributes.border?e.setAttributes({border:!1}):e.setAttributes({border:!0})}}))):"","white"===e.attributes.color?(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Button Color",help:"Choose the CTA button color.",selected:e.attributes.buttonColor,options:[{label:"Black",value:"black"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({buttonColor:t})}}))):"",(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Highlighted Text Style",selected:e.attributes.headerfontStyle,options:[{label:"Wide",value:"wide"},{label:"Narrow",value:"narrow"}],onChange:t=>{e.setAttributes({headerfontStyle:t})}}))),(0,t.createElement)(Tt,null,(0,t.createElement)(At,null,(0,t.createElement)(Ut,{label:"Content Text Style",selected:e.attributes.contentfontStyle,options:[{label:"Wide",value:"wide"},{label:"Narrow",value:"narrow"}],onChange:t=>{e.setAttributes({contentfontStyle:t})}}))),(0,t.createElement)(Tt,null,(0,t.createElement)("h2",null,"Button Link setting"),(0,t.createElement)(At,null,(0,t.createElement)(Lt,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})),(0,t.createElement)(At,null,(0,t.createElement)(Lt,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})),(0,t.createElement)(At,null,(0,t.createElement)(Ht,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:`pu-proofpoint pu-proofpoint--editor${"black"===e.attributes.color?" pu-proofpoint__black":" pu-proofpoint__white"}${e.attributes.border?" pu-proofpoint__border":""}${e.attributes.boxshadow?"":" pu-proofpoint__no-shadow"}\n ${"full"===e.attributes.height?" pu-proofpoint__height":""}\n ${e.attributes.hasLead?" pu-proofpoint__has-lead":""}`},(0,t.createElement)("div",{className:"container"},e.attributes.hasLead?(0,t.createElement)(Ot,{tagName:"p",value:e.attributes.lead,className:"pu-proofpoint__lead",onChange:t=>{e.setAttributes({lead:t})},placeholder:"Add Lead text"}):"",(0,t.createElement)(Ot,{tagName:"p",value:e.attributes.highlighted,className:`pu-proofpoint__highlighted\n ${"wide"===e.attributes.headerfontStyle?" pu-proofpoint__highlighted-wide":" pu-proofpoint__highlighted-narrow"}\n `,onChange:t=>{e.setAttributes({highlighted:t})},placeholder:"Add Highlighted text"}),(0,t.createElement)(Ot,{tagName:"p",value:e.attributes.content,className:`pu-proofpoint__content\n ${"wide"===e.attributes.contentfontStyle?" pu-proofpoint__content-wide":" pu-proofpoint__content-narrow"}\n `,onChange:t=>{e.setAttributes({content:t})},placeholder:"Add content text"}),(0,t.createElement)(Ot,{tagName:"p",value:e.attributes.source,className:"pu-proofpoint__source",onChange:t=>{e.setAttributes({source:t})},placeholder:"Add Source of the Proofpoint"}),e.attributes.ctaUrl&&e.attributes.ctaText?"white"===e.attributes.color&&"white"===e.attributes.buttonColor?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button pu-proofpoint__button-white",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))],save:e=>{const a=Rt.save();return(0,t.createElement)("div",x({},a,{className:`pu-proofpoint${"black"===e.attributes.color?" pu-proofpoint__black":" pu-proofpoint__white"}${e.attributes.border?" pu-proofpoint__border":""}\n ${e.attributes.boxshadow?"":" pu-proofpoint__no-shadow"}\n ${"full"===e.attributes.height?" pu-proofpoint__height":""}\n ${e.attributes.hasLead?" pu-proofpoint__has-lead":""}\n `}),(0,t.createElement)("div",{className:"container"},e.attributes.lead&&e.attributes.hasLead?(0,t.createElement)(Ot.Content,{className:"pu-proofpoint__lead",tagName:"p",value:e.attributes.lead}):"",e.attributes.highlighted?(0,t.createElement)(Ot.Content,{tagName:"p",value:e.attributes.highlighted,className:`pu-proofpoint__highlighted\n ${"wide"===e.attributes.headerfontStyle?" pu-proofpoint__highlighted-wide":" pu-proofpoint__highlighted-narrow"}\n `}):"",e.attributes.content?(0,t.createElement)(Ot.Content,{className:`pu-proofpoint__content\n ${"wide"===e.attributes.contentfontStyle?" pu-proofpoint__content-wide":" pu-proofpoint__content-narrow"}\n `,tagName:"p",value:e.attributes.content}):"",e.attributes.source?(0,t.createElement)(Ot.Content,{className:"pu-proofpoint__source",tagName:"p",value:e.attributes.source}):"",e.attributes.ctaUrl&&e.attributes.ctaText?"white"===e.attributes.color&&"white"===e.attributes.buttonColor?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button pu-proofpoint__button-white",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))},deprecated:[{attributes:{color:{type:"string",default:"black"},border:{type:"boolean",default:!1},buttonColor:{type:"string",default:"black"},highlighted:{type:"string",default:""},headerfontStyle:{type:"string",default:"narrow"},contentfontStyle:{type:"string",default:"narrow"},content:{type:"string",default:""},source:{type:"string",default:""},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},height:{type:"string",default:"auto"}},save:e=>{const a=Rt.save();return(0,t.createElement)("div",x({},a,{className:`pu-proofpoint${"black"===e.attributes.color?" pu-proofpoint__black":" pu-proofpoint__white"}${e.attributes.border?" pu-proofpoint__border":""}\n ${"full"===e.attributes.height?" pu-proofpoint__height":""}`}),(0,t.createElement)("div",{className:"container"},e.attributes.highlighted?"wide"===e.attributes.headerfontStyle?(0,t.createElement)("p",{className:"pu-proofpoint__highlighted pu-proofpoint__highlighted-wide"},e.attributes.highlighted):(0,t.createElement)("p",{className:"pu-proofpoint__highlighted pu-proofpoint__highlighted-narrow"},e.attributes.highlighted):"",e.attributes.content?"wide"===e.attributes.contentfontStyle?(0,t.createElement)("p",{className:"pu-proofpoint__content pu-proofpoint__content-wide"},e.attributes.content):(0,t.createElement)("p",{className:"pu-proofpoint__content pu-proofpoint__content-narrow"},e.attributes.content):"",e.attributes.source?(0,t.createElement)("p",{className:"pu-proofpoint__source"},e.attributes.source):"",e.attributes.ctaUrl&&e.attributes.ctaText?"white"===e.attributes.color&&"white"===e.attributes.buttonColor?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button pu-proofpoint__button-white",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"pu-proofpoint__button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):""))}}]});const{__:Dt}=wp.i18n,{registerBlockType:Vt}=wp.blocks,{PanelBody:Gt,PanelRow:Ft,SelectControl:Zt}=wp.components,{InspectorControls:qt}=wp.blockEditor,{withSelect:zt}=wp.data;Vt("purdue-blocks/testimonial",{title:Dt("Testimonial"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 68.75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-d9ab28",d:"M84.38,34.38A34.21,34.21,0,0,1,75.87,57c-3.25,3.71-8.35,11.49-10.24,18H56.26v0a11,11,0,0,1,.43-2.79A61.73,61.73,0,0,1,68.82,50.81a25,25,0,1,0-37.64,0A61.7,61.7,0,0,1,43.33,72.23,9.49,9.49,0,0,1,43.74,75v0H34.37c-1.89-6.51-7-14.29-10.24-18A34.37,34.37,0,1,1,84.38,34.38ZM53.12,18.75A3.12,3.12,0,0,1,50,21.88a12.51,12.51,0,0,0-12.5,12.5,3.13,3.13,0,0,1-6.25,0A18.77,18.77,0,0,1,50,15.63,3.11,3.11,0,0,1,53.12,18.75ZM34.38,81.25H65.62v8.43a3.11,3.11,0,0,1-.52,1.73L60.3,98.6a3.1,3.1,0,0,1-2.6,1.4H42.3a3.1,3.1,0,0,1-2.6-1.4l-4.79-7.19a3.11,3.11,0,0,1-.52-1.73Z",transform:"translate(-15.62)"})))),category:"purdue-blocks",keywords:[],attributes:{posts:{type:"array",default:[]},selectedPosts:{type:"array",default:[]}},description:Dt("This block adds a row of one or two testimonials to your page. It pulls from testimonial posts from this site and requires the installation of acf-to-rest-api to work."),edit:zt((e=>({posts:wp.data.select("core").getEntityRecords("postType","test_post",{per_page:-1,_embed:!0})})))((e=>{const{posts:a}=e;if(!a)return(0,t.createElement)("div",{className:"pu-blocks-editor-testimonial"},(0,t.createElement)("p",{className:"error-message"},"loading.."));if(0===a.length)return(0,t.createElement)("div",{className:"pu-blocks-editor-testimonial"},(0,t.createElement)("p",{className:"error-message"},"No testimonial posts"));a.map((e=>{e.img=e._embedded["wp:featuredmedia"][0]})),e.setAttributes({posts:a});const l=[];for(let e=0;e{t.length<=2?e.setAttributes({selectedPosts:t}):e.setAttributes({selectedPosts:t.slice(0,2)})},options:l})))),(0,t.createElement)("div",{className:"pu-blocks-editor-testimonial"},(0,t.createElement)("div",{className:"testimonial__section container"},(0,t.createElement)("h2",null,"Testimonials"),(0,t.createElement)("div",{className:"testimonial__list columns"},e.attributes.posts.map((a=>{if(e.attributes.selectedPosts&&e.attributes.selectedPosts.length>0)return e.attributes.selectedPosts.map((l=>{if(a.id==l)return(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"testimonial__item"},2===e.attributes.selectedPosts.length?(0,t.createElement)("div",{className:"testimonial__body testimonial__body--small"},a.img?(0,t.createElement)("img",{src:a.img.source_url,alt:a.img.alt_text}):"",a.excerpt.raw?(0,t.createElement)("p",{className:"testimonial__content"},'"',a.excerpt.raw,'"'):(0,t.createElement)("p",{className:"testimonial__content"},'"',a.content.raw.replace(//g,"").replace(/(<([^>]+)>)/gi,""),'"'),(0,t.createElement)("p",{className:"testimonial__name"},a.acf.name),(0,t.createElement)("p",{className:"testimonial__info"},a.acf.persons_information)):(0,t.createElement)("div",{className:"testimonial__body testimonial__body--big"},a.img?(0,t.createElement)("img",{src:a.img.source_url,alt:a.img.alt_text}):"",a.excerpt.raw?(0,t.createElement)("p",{className:"testimonial__content"},'"',a.excerpt.raw,'"'):(0,t.createElement)("p",{className:"testimonial__content"},'"',a.content.raw.replace(//g,"").replace(/(<([^>]+)>)/gi,""),'"'),(0,t.createElement)("p",{className:"testimonial__name"},a.acf.name),(0,t.createElement)("p",{className:"testimonial__info"},a.acf.persons_information))))}))})))))]})),save:e=>{const a=e.attributes.posts;return(0,t.createElement)("div",{className:"pu-blocks-testimonial"},(0,t.createElement)("div",{className:"testimonial__section container"},(0,t.createElement)("h2",null,"Testimonials"),(0,t.createElement)("div",{className:"testimonial__list columns is-multiline"},a.map((a=>{if(e.attributes.selectedPosts&&e.attributes.selectedPosts.length>0)return e.attributes.selectedPosts.map((l=>{if(a.id==l)return 2===e.attributes.selectedPosts.length?(0,t.createElement)("div",{className:"column is-full-mobile is-full-tablet is-half-desktop"},(0,t.createElement)("div",{className:"testimonial__item"},(0,t.createElement)("div",{className:"testimonial__body testimonial__body--small"},a.img?(0,t.createElement)("img",{src:a.img.source_url,alt:a.img.alt_text}):"",a.excerpt.raw?(0,t.createElement)("p",{className:"testimonial__content"},a.excerpt.raw):(0,t.createElement)("p",{className:"testimonial__content"},a.content.raw.replace(//g,"").replace(/(<([^>]+)>)/gi,"")),(0,t.createElement)("p",{className:"testimonial__name"},a.acf.name),(0,t.createElement)("p",{className:"testimonial__info"},a.acf.persons_information)))):(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"testimonial__item testimonial--big"},(0,t.createElement)("div",{className:"testimonial__body testimonial__body--big"},a.img?(0,t.createElement)("img",{src:a.img.source_url,alt:a.img.alt_text}):"",a.excerpt.raw?(0,t.createElement)("p",{className:"testimonial__content"},a.excerpt.raw):(0,t.createElement)("p",{className:"testimonial__content"},a.content.raw.replace(//g,"").replace(/(<([^>]+)>)/gi,"")),(0,t.createElement)("p",{className:"testimonial__name"},a.acf.name),(0,t.createElement)("p",{className:"testimonial__info"},a.acf.persons_information))))}))})))))}});const{__:jt}=wp.i18n,{registerBlockType:Wt}=wp.blocks,{PanelBody:Yt,PanelRow:Xt,CheckboxControl:Kt,Button:Qt}=wp.components,{InspectorControls:Jt,MediaUploadCheck:ea,MediaUpload:ta,InnerBlocks:aa,useBlockProps:la}=wp.blockEditor,ra=[["core/paragraph",{placeholder:"Body content copy"}]];Wt("purdue-blocks/image-showcase",{title:jt("Image Showcase"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 68.75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",d:"M84.38,34.38A34.21,34.21,0,0,1,75.87,57c-3.25,3.71-8.35,11.49-10.24,18H56.26v0a11,11,0,0,1,.43-2.79A61.73,61.73,0,0,1,68.82,50.81a25,25,0,1,0-37.64,0A61.7,61.7,0,0,1,43.33,72.23,9.49,9.49,0,0,1,43.74,75v0H34.37c-1.89-6.51-7-14.29-10.24-18A34.37,34.37,0,1,1,84.38,34.38ZM53.12,18.75A3.12,3.12,0,0,1,50,21.88a12.51,12.51,0,0,0-12.5,12.5,3.13,3.13,0,0,1-6.25,0A18.77,18.77,0,0,1,50,15.63,3.11,3.11,0,0,1,53.12,18.75ZM34.38,81.25H65.62v8.43a3.11,3.11,0,0,1-.52,1.73L60.3,98.6a3.1,3.1,0,0,1-2.6,1.4H42.3a3.1,3.1,0,0,1-2.6-1.4l-4.79-7.19a3.11,3.11,0,0,1-.52-1.73Z",transform:"translate(-15.62)"})))),category:"purdue-blocks",keywords:[],attributes:{images:{type:"array",default:[]},includeCopy:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:jt("Add this block and select three square images to showcase in a row."),edit:e=>{const a=()=>{e.setAttributes({images:""})};return[(0,t.createElement)(Jt,null,(0,t.createElement)(Yt,null,(0,t.createElement)(Xt,null,(0,t.createElement)(Kt,{label:"Include Body Content?",checked:e.attributes.includeCopy,onChange:()=>e.setAttributes({includeCopy:!e.attributes.includeCopy})})))),(0,t.createElement)("div",{className:"editor-image-showcase"},(0,t.createElement)(ea,null,(0,t.createElement)(ta,{multiple:!0,gallery:!0,onSelect:t=>{e.setAttributes({images:t})},render:l=>{let{open:r}=l;return 3===e.attributes.images.length?(0,t.createElement)("div",{className:"editor-image-showcase__preview"},(0,t.createElement)("div",{className:"editor-image-showcase__imgGroup"},e.attributes.images.map((e=>(0,t.createElement)("figure",{className:"image is-128x128"},(0,t.createElement)("img",{alt:"",src:e.url}))))),(0,t.createElement)(Qt,{className:"editor-image-showcase__button",onClick:r},"Select New Images"),(0,t.createElement)(Qt,{className:"bulma-blocks-editor-site-hero__button",onClick:a},"Remove images")):(0,t.createElement)("div",{className:"editor-image-showcase__container"},(0,t.createElement)("span",{className:"editor-image-showcase__heading"},(0,t.createElement)("span",{className:"dashicons dashicons-format-image"}),(0,t.createElement)("span",null,"Image Showcase")),(0,t.createElement)("p",{className:"editor-image-showcase__description"},"Pick three image from the media library."),(0,t.createElement)(Qt,{className:"editor-image-showcase__button",onClick:r},"Open Media Library"))}})),e.attributes.includeCopy?(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)(aa,{template:ra,allowedBlocks:["core/paragraph","core/list"]}))):"")]},save:e=>{const a=la.save();return(0,t.createElement)("section",x({},a,{className:"section pu-image-showcase"}),(0,t.createElement)("div",{className:"columns is-centered has-decoration is-mobile"},e.attributes.images?e.attributes.images.map((e=>(0,t.createElement)("div",{className:"column is-2-fullhd is-2-widescreen is-4-desktop is-4-tablet is-4-mobile"},(0,t.createElement)("figure",{className:"image is-square"},(0,t.createElement)("img",{alt:e.alt,src:e.url}))))):""),e.attributes.includeCopy?(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns is-centered is-mobile"},(0,t.createElement)("div",{className:"column is-8"},(0,t.createElement)(aa.Content,null)))):"")}});var na=window.wp.blocks;const{__:sa}=wp.i18n,{registerBlockType:oa}=wp.blocks,{PanelBody:ia,PanelRow:ca,RangeControl:ua,CheckboxControl:da,TextControl:ma}=wp.components,{InnerBlocks:ba,InspectorControls:pa,RichText:ha,useBlockProps:ga}=wp.blockEditor;oa("purdue-blocks/title-nav",{title:sa("Titled Navigation"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],attributes:{hasOutline:{type:"boolean",default:!1},addButton:{type:"boolean",default:!1},numLinks:{type:"number",default:1},titleText:{source:"html",selector:"h2"},buttonText:{type:"string",default:""},buttonLink:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:sa("Add this block and select navigation items to build a menu that will show above the title of the page."),edit:e=>(1===e.attributes.numLinks&&va(e,1,1),[(0,t.createElement)(pa,null,(0,t.createElement)(ia,null,(0,t.createElement)(ca,null,(0,t.createElement)(ua,{className:"bulma-columns-range-control",label:"Number of Navigation Items",value:e.attributes.numLinks,min:1,max:15,onChange:t=>{va(e,e.attributes.numLinks,t),e.setAttributes({numLinks:t})}})),(0,t.createElement)(ca,null,(0,t.createElement)(da,{label:"Give Menu Items an Outline?",checked:e.attributes.hasOutline,onChange:t=>e.setAttributes({hasOutline:t})})),(0,t.createElement)(ca,null,(0,t.createElement)(da,{label:"Add a CTA Button?",checked:e.attributes.addButton,onChange:t=>e.setAttributes({addButton:t})})),e.attributes.addButton?(0,t.createElement)(ia,{title:"Button Controls"},(0,t.createElement)(ca,null,(0,t.createElement)(ma,{label:"Button Text",value:e.attributes.buttonText,onChange:t=>e.setAttributes({buttonText:t})})),(0,t.createElement)(ca,null,(0,t.createElement)(ma,{label:"Button Link",value:e.attributes.buttonLink,onChange:t=>e.setAttributes({buttonLink:t})}))):"")),(0,t.createElement)("div",{className:"editor-title-nav "+(e.attributes.hasOutline?"outline-on":"")},(0,t.createElement)(ha,{tagName:"h2",value:e.attributes.titleText,className:"editor-title-nav__title",onChange:t=>{e.setAttributes({titleText:t})},placeholder:"Nav Title (Optional)",keepPlaceholderOnFocus:!0}),(0,t.createElement)(ba,{templateLock:"all"}))]),save:e=>{const a=ga.save();return e.attributes.addButton?(0,t.createElement)("section",x({},a,{className:"section pu-title-nav "+(e.attributes.hasOutline?"has-outline":"")}),(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column is-8 pu-title-nav__left"},(0,t.createElement)(ha.Content,{className:"pu-title-nav__title",tagName:"h2",value:e.attributes.titleText}),(0,t.createElement)("ul",{className:"pu-title-nav__menu"},(0,t.createElement)(ba.Content,null))),(0,t.createElement)("div",{className:"column is-3 is-offset-1 pu-title-nav__right"},(0,t.createElement)("a",{className:"pu-title-nav__cta",href:e.attributes.buttonLink}," ",e.attributes.buttonText," ")))):(0,t.createElement)("section",x({},a,{className:"section pu-title-nav "+(e.attributes.hasOutline?"has-outline":"")}),(0,t.createElement)(ha.Content,{className:"pu-title-nav__title",tagName:"h2",value:e.attributes.titleText}),(0,t.createElement)("ul",{className:"pu-title-nav__menu"},(0,t.createElement)(ba.Content,null)))}});const va=(e,t,a)=>{let l=wp.data.select("core/block-editor").getBlock(e.clientId).innerBlocks;const r=a>t,n=0===a;if(1===t&&t===a)l=[(0,na.createBlock)("purdue-blocks/title-nav-link")],wp.data.dispatch("core/block-editor").replaceInnerBlocks(e.clientId,l,!1);else if(r&&!n){const r=a-t;for(let e=0;e[(0,t.createElement)(xa,null,(0,t.createElement)(ka,null,(0,t.createElement)(ya,null,(0,t.createElement)(wa,{label:"Is this the current page?",checked:e.attributes.isCurrent,onChange:t=>e.setAttributes({isCurrent:t})})))),(0,t.createElement)("div",{className:"editor-title-nav-link"},(0,t.createElement)(_a,{tagName:"li",value:e.attributes.linkText,className:"editor-title-nav-link__input "+(e.attributes.isCurrent?"isCurrent":""),onChange:t=>{e.setAttributes({linkText:t})}}))],save:e=>(0,t.createElement)(_a.Content,{className:e.attributes.isCurrent?"isCurrent":"",tagName:"li",value:e.attributes.linkText})});const{__:Ca}=wp.i18n,{registerBlockType:Na}=wp.blocks,{PanelBody:Ta,PanelRow:Aa,CheckboxControl:La,TextareaControl:Sa,TextControl:Ba,RadioControl:Ha,Button:Ua}=wp.components,{RichText:Ia,InspectorControls:Pa,MediaUploadCheck:Ma,MediaUpload:$a,useBlockProps:Ra}=wp.blockEditor;Na("purdue-blocks/card",{title:Ca("Custom Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"clone",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-d9ab28",d:"M100,9.38V71.87a9.38,9.38,0,0,1-9.37,9.38H81.25v9.37A9.38,9.38,0,0,1,71.87,100H9.37A9.38,9.38,0,0,1,0,90.62V28.13a9.38,9.38,0,0,1,9.37-9.38h9.38V9.38A9.38,9.38,0,0,1,28.12,0H90.63A9.38,9.38,0,0,1,100,9.38ZM71.87,89.45v-8.2H28.12a9.38,9.38,0,0,1-9.37-9.38V28.13h-8.2A1.17,1.17,0,0,0,9.37,29.3V89.45a1.17,1.17,0,0,0,1.18,1.17H70.7A1.17,1.17,0,0,0,71.87,89.45ZM90.63,70.7V10.55a1.17,1.17,0,0,0-1.18-1.17H29.3a1.17,1.17,0,0,0-1.18,1.17V70.7a1.17,1.17,0,0,0,1.18,1.17H89.45A1.17,1.17,0,0,0,90.63,70.7Z",transform:"translate(0 0)"})))),category:"purdue-blocks",keywords:[],attributes:{hasLink:{type:"boolean",default:!1},title:{type:"string",source:"html",selector:"p.title"},subText:{type:"string",source:"html",selector:"p.content"},link:{type:"string",default:""},linkText:{type:"string",default:""},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1},backgroundColor:{type:"string",default:"white"},borderColor:{type:"string",default:"gold"}},supports:{className:!1,anchor:!0},description:Ca("Create a card with an image and text. You can choose to add a link and a call to action button to the card."),edit:e=>[(0,t.createElement)(Pa,null,(0,t.createElement)(Ta,null,(0,t.createElement)(Aa,null,(0,t.createElement)(Ha,{label:"Background Color",help:"Choose the background color of the card.",selected:e.attributes.backgroundColor,options:[{label:"Gold",value:"gold"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({backgroundColor:t})}})),(0,t.createElement)(Aa,null,(0,t.createElement)(Ha,{label:"Border Color",help:"Choose the border color of the card.",selected:e.attributes.borderColor,options:[{label:"Gold",value:"gold"},{label:"Black",value:"black"}],onChange:t=>{e.setAttributes({borderColor:t})}})),e.attributes.imgUrl?(0,t.createElement)(Aa,null,(0,t.createElement)(Sa,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})):"",e.attributes.imgUrl?(0,t.createElement)(Aa,null,(0,t.createElement)(Ua,{className:"remove-image-button",onClick:()=>{e.setAttributes({imgUrl:""})}},"Remove image")):"",(0,t.createElement)(Aa,null,(0,t.createElement)(La,{label:"Add a link to this card?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(Aa,null,(0,t.createElement)(Ba,{label:"Call to action text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",e.attributes.hasLink?(0,t.createElement)(Aa,null,(0,t.createElement)(Ba,{label:"Link address",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})):"",e.attributes.hasLink?(0,t.createElement)(Aa,null,(0,t.createElement)(La,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"")),(0,t.createElement)("div",{className:`box square-card${"gold"===e.attributes.backgroundColor?" background-gold":""}${"black"===e.attributes.borderColor?" border-black":""}`},(0,t.createElement)(Ma,null,(0,t.createElement)($a,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{className:"image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)(Ua,{onClick:l},""!==e.attributes.imgUrl?"Select a new image":"Select an image (optional)"))}})),(0,t.createElement)("div",{className:"title"},(0,t.createElement)(Ia,{tagName:"p",value:e.attributes.title,className:"title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title (Optional)",keepPlaceholderOnFocus:!0,allowedFormats:[]})),(0,t.createElement)("div",{className:"content"},(0,t.createElement)(Ia,{tagName:"p",value:e.attributes.subText,className:"content",onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Text (Optional)",allowedFormats:[]}),e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.linkText)):""))],save:e=>{const a=Ra.save();return!0===e.attributes.hasLink?(0,t.createElement)("a",x({},a,{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",className:`square-card${"gold"===e.attributes.backgroundColor?" background-gold":""}${"black"===e.attributes.borderColor?" border-black":""}`,rel:"noopener noreferrer"}),e.attributes.imgUrl?(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText})):"",e.attributes.title?(0,t.createElement)(Ia.Content,{className:"title",tagName:"p",value:e.attributes.title}):"",e.attributes.subText?(0,t.createElement)(Ia.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"",e.attributes.linkText?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.linkText)):""):(0,t.createElement)("div",x({},a,{className:`square-card${"gold"===e.attributes.backgroundColor?" background-gold":""}${"black"===e.attributes.borderColor?" border-black":""}`}),e.attributes.imgUrl?(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText})):"",e.attributes.title?(0,t.createElement)(Ia.Content,{className:"title",tagName:"p",value:e.attributes.title}):"",e.attributes.subText?(0,t.createElement)(Ia.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"")}});const{__:Oa}=wp.i18n,{registerBlockType:Da}=wp.blocks,{PanelBody:Va,PanelRow:Ga,CheckboxControl:Fa,TextareaControl:Za,TextControl:qa,RadioControl:za,SelectControl:ja,Button:Wa}=wp.components,{RichText:Ya,InspectorControls:Xa,InnerBlocks:Ka}=wp.blockEditor,Qa=[["core/paragraph",{placeholder:"Add content"}]];Da("purdue-blocks/accordion",{title:Oa("Accordion"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43.01 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Arrows-alt-v",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M70.12,81.82,53.31,98.63a4.68,4.68,0,0,1-6.62,0L29.88,81.82a4.68,4.68,0,0,1,3.31-8h9V26.18h-9a4.68,4.68,0,0,1-3.31-8L46.69,1.37a4.68,4.68,0,0,1,6.62,0L70.12,18.18a4.68,4.68,0,0,1-3.31,8h-9V73.82h9A4.68,4.68,0,0,1,70.12,81.82Z",transform:"translate(-28.49)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".accordion-title"},titleLevel:{type:"string",default:"p"},id:{type:"string",default:""},inputId:{type:"string",default:""}},supports:{className:!1},description:Oa("Create a single accordion."),edit:e=>{const a=e.clientId;return e.setAttributes({id:a}),[(0,t.createElement)(Xa,null,(0,t.createElement)(Va,null,(0,t.createElement)(Ga,null,(0,t.createElement)(ja,{label:"Heading level of the title",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(Ga,null,(0,t.createElement)(qa,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.inputId,onChange:t=>e.setAttributes({inputId:t})})))),(0,t.createElement)("div",{className:"accordion-editor"},(0,t.createElement)(Ya,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:"accordion-title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)("div",{className:"accordion-content"},(0,t.createElement)(Ka,{template:Qa,templateLock:!1})))]},save:e=>e.attributes.inputId?(0,t.createElement)("div",{className:"accordion",id:e.attributes.inputId},(0,t.createElement)(Ya.Content,{id:`title-${e.attributes.id}`,className:"accordion-title",tagName:e.attributes.titleLevel,value:e.attributes.title,"aria-controls":`content-${e.attributes.id}`,"aria-expanded":"false",role:"button"}),(0,t.createElement)("div",{id:`content-${e.attributes.id}`,className:"accordion-content"},(0,t.createElement)(Ka.Content,null))):(0,t.createElement)("div",{className:"accordion"},(0,t.createElement)(Ya.Content,{id:`title-${e.attributes.id}`,className:"accordion-title",tagName:e.attributes.titleLevel,value:e.attributes.title,"aria-controls":`content-${e.attributes.id}`,"aria-expanded":"false",role:"button"}),(0,t.createElement)("div",{id:`content-${e.attributes.id}`,className:"accordion-content"},(0,t.createElement)(Ka.Content,null)))});const{__:Ja}=wp.i18n,{registerBlockType:el}=wp.blocks,{PanelBody:tl,PanelRow:al,CheckboxControl:ll,TextareaControl:rl,TextControl:nl,RadioControl:sl,SelectControl:ol,Button:il}=wp.components,{RichText:cl,InspectorControls:ul,MediaUploadCheck:dl,MediaUpload:ml,InnerBlocks:bl,useBlockProps:pl}=wp.blockEditor,hl=[["core/paragraph",{placeholder:"Add content"}]];el("purdue-blocks/cta-card",{title:Ja("CTA Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"clone",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M100,9.38V71.87a9.38,9.38,0,0,1-9.37,9.38H81.25v9.37A9.38,9.38,0,0,1,71.87,100H9.37A9.38,9.38,0,0,1,0,90.62V28.13a9.38,9.38,0,0,1,9.37-9.38h9.38V9.38A9.38,9.38,0,0,1,28.12,0H90.63A9.38,9.38,0,0,1,100,9.38ZM71.87,89.45v-8.2H28.12a9.38,9.38,0,0,1-9.37-9.38V28.13h-8.2A1.17,1.17,0,0,0,9.37,29.3V89.45a1.17,1.17,0,0,0,1.18,1.17H70.7A1.17,1.17,0,0,0,71.87,89.45ZM90.63,70.7V10.55a1.17,1.17,0,0,0-1.18-1.17H29.3a1.17,1.17,0,0,0-1.18,1.17V70.7a1.17,1.17,0,0,0,1.18,1.17H89.45A1.17,1.17,0,0,0,90.63,70.7Z",transform:"translate(0 0)"})))),category:"purdue-blocks",keywords:[],attributes:{layout:{type:"string",default:"horizontal"},cardType:{type:"string",default:"small"},title:{type:"string",source:"html",selector:".title"},titleLevel:{type:"string",default:"p"},subText:{type:"string",source:"html",selector:"p.content"},hasLink:{type:"boolean",default:!1},link:{type:"string",default:""},linkText:{type:"string",default:""},imgLocation:{type:"string",default:"left"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1},height:{type:"string",default:"100"},headerColor:{type:"string",default:"black"},titleAlign:{type:"string",default:"left"},contentAlign:{type:"string",default:"left"},imageRatio:{type:"string",default:"3by2"}},supports:{className:!1,anchor:!0},description:Ja("Create a call-to-action card with an image and text. The link to the card is optional."),edit:e=>[(0,t.createElement)(ul,null,(0,t.createElement)(tl,null,(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Card layout",help:"Choose to align the elements vertically or horizontally",selected:e.attributes.layout,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:t=>{e.setAttributes({layout:t})}})),"horizontal"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Card type",help:"Choose Large if there will be a lot of text or lists on the card. Otherwise choose Small.",selected:e.attributes.cardType,options:[{label:"Large",value:"large"},{label:"Small",value:"small"}],onChange:t=>{e.setAttributes({cardType:t})}})):"",(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Height of the card",help:"100%: the height of the card will be 100% height of its parent container; Auto: the height of the card will depend upon the height of its children.",selected:e.attributes.height,options:[{label:"100%",value:"100"},{label:"Auto",value:"auto"}],onChange:t=>{e.setAttributes({height:t})}})),(0,t.createElement)(al,null,(0,t.createElement)(ol,{label:"Heading level of the title",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(al,null,(0,t.createElement)(ol,{label:"Color the title",value:e.attributes.headerColor,options:[{label:"Black",value:"black"},{label:"Digital Gold",value:"gold"},{label:"Steel",value:"steel"}],onChange:t=>{e.setAttributes({headerColor:t})}})),"vertical"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Align the title",selected:e.attributes.titleAlign,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({titleAlign:t})}})):"","vertical"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Align the content",help:"This is for the optional content under the title.",selected:e.attributes.contentAlign,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({contentAlign:t})}})):"","vertical"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Image Aspect Ratio",help:"Image aspect ratio of width by height.",selected:e.attributes.imageRatio,options:[{label:"3 by 2",value:"3by2"},{label:"1 by 1",value:"1by1"}],onChange:t=>{e.setAttributes({imageRatio:t})}})):"","horizontal"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(sl,{label:"Align image",help:"Choose to place the image to the left or right.",selected:e.attributes.imgLocation,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({imgLocation:t})}})):"",(0,t.createElement)(al,null,(0,t.createElement)(rl,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),e.attributes.imgUrl?(0,t.createElement)(al,null,(0,t.createElement)(il,{className:"remove-image-button",onClick:()=>{e.setAttributes({imgUrl:""})}},"Remove image")):"","small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout?(0,t.createElement)(al,null,(0,t.createElement)(ll,{label:"Add a CTA link to this card?",help:"Note you can only add this link when there are no links in the content of the card. Otherwise it'll cause error. ",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})):"",("small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout)&&e.attributes.hasLink?(0,t.createElement)(al,null,(0,t.createElement)(nl,{label:"Call to action text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",("small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout)&&e.attributes.hasLink?(0,t.createElement)(al,null,(0,t.createElement)(nl,{label:"Link address",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})):"",("small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout)&&e.attributes.hasLink?(0,t.createElement)(al,null,(0,t.createElement)(ll,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"")),(0,t.createElement)("div",{className:`cta-card-editor${"horizontal"===e.attributes.layout?" cta-card-horizonal":" cta-card-vertical"}\n ${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" cta-card-small":""}\n ${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" cta-card-large":""}\n ${"left"===e.attributes.imgLocation&&"horizontal"===e.attributes.layout?" cta-card-left":""}\n ${"right"===e.attributes.imgLocation&&"horizontal"===e.attributes.layout?" cta-card-right":""}\n ${"1by1"===e.attributes.imageRatio&&"vertical"===e.attributes.layout?" cta-card-1by1":""}\n ${"auto"===e.attributes.height?" cta-card--height-auto":""}\n `},(0,t.createElement)("div",{className:"columns is-multiline"},(0,t.createElement)("div",{className:`column\n ${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-two-fifths-desktop is-two-fifths-tablet is-full-mobile":""}\n ${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-one-third-desktop is-one-third-tablet is-full-mobile":""}\n ${"vertical"===e.attributes.layout?" cta-card-vertical__image":""}\n `},(0,t.createElement)(dl,null,(0,t.createElement)(ml,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{className:"image is-3by2",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("button",{onClick:l},""!==e.attributes.imgUrl?"Select a new image":"Select an image"))}}))),(0,t.createElement)("div",{className:`column\n ${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-three-fifths-desktop is-three-fifths-tablet is-full-mobile":""}\n ${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-two-third-desktop is-two-third-tablet is-full-mobile":""}\n `},(0,t.createElement)("div",{className:`title${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}`},(0,t.createElement)(cl,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:`title\n ${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}\n ${"center"===e.attributes.titleAlign&&"vertical"===e.attributes.layout?" header-centered":""}\n `,onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title (Optional)",keepPlaceholderOnFocus:!0})),(0,t.createElement)("div",{className:"content"},"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout?(0,t.createElement)(cl,{tagName:"p",value:e.attributes.subText,className:"content"+("center"===e.attributes.contentAlign?" content-centered":""),onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Text (Optional)"}):""),"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout?(0,t.createElement)(bl,{template:hl,templateLock:!1}):"","small"===e.attributes.cardType&&"horizontal"===e.attributes.layout&&e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.linkText)):"","vertical"===e.attributes.layout&&e.attributes.hasLink?(0,t.createElement)("div",{className:"purdue-blocks__button purdue-blocks__button--gold-light"},(0,t.createElement)("span",null,e.attributes.linkText)):"")))],save:e=>{const a=pl.save();return(0,t.createElement)("div",x({},a,{className:`${"horizontal"===e.attributes.layout?"cta-card-horizonal":"cta-card-vertical"}${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" cta-card-small":""}${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" cta-card-large":""}${"left"===e.attributes.imgLocation&&"horizontal"===e.attributes.layout?" cta-card-left":""}${"right"===e.attributes.imgLocation&&"horizontal"===e.attributes.layout?" cta-card-right":""} ${"1by1"===e.attributes.imageRatio&&"vertical"===e.attributes.layout?" cta-card-1by1":""}${"auto"===e.attributes.height?" cta-card--height-auto":""}`}),(0,t.createElement)("div",{className:"columns is-multiline"},(0,t.createElement)("div",{className:`column${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-two-fifths-desktop is-two-fifths-tablet is-full-mobile":""}${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-one-third-desktop is-one-third-tablet is-full-mobile":""}${"vertical"===e.attributes.layout?" cta-card-vertical__image":""}`},(0,t.createElement)("figure",{className:"image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))),(0,t.createElement)("div",{className:`column${"small"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-three-fifths-desktop is-three-fifths-tablet is-full-mobile":""}${"large"===e.attributes.cardType&&"horizontal"===e.attributes.layout?" is-two-third-desktop is-two-third-tablet is-full-mobile":""}`},e.attributes.title?(0,t.createElement)(cl.Content,{className:`title${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}${"center"===e.attributes.titleAlign&&"vertical"===e.attributes.layout?" header-centered":""}\n `,tagName:e.attributes.titleLevel,value:e.attributes.title}):"",("small"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout)&&e.attributes.subText?(0,t.createElement)(cl.Content,{className:"content"+("center"===e.attributes.contentAlign?" content-centered":""),tagName:"p",value:e.attributes.subText}):"","small"===e.attributes.cardType&&"horizontal"===e.attributes.layout&&!0===e.attributes.hasLink&&e.attributes.linkText?(0,t.createElement)("a",{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",className:"read-more-button",rel:"noopener noreferrer"},(0,t.createElement)("span",null,e.attributes.linkText)):"","large"===e.attributes.cardType&&"horizontal"===e.attributes.layout||"vertical"===e.attributes.layout?(0,t.createElement)(bl.Content,null):"","vertical"===e.attributes.layout&&e.attributes.hasLink?(0,t.createElement)("a",{className:"purdue-blocks__button purdue-blocks__button--gold-light",href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText):"")))},deprecated:[{attributes:{cardType:{type:"string",default:"small"},title:{type:"string",source:"html",selector:".title"},titleLevel:{type:"string",default:"p"},subText:{type:"string",source:"html",selector:"p.content"},hasLink:{type:"boolean",default:!1},link:{type:"string",default:""},linkText:{type:"string",default:""},imgLocation:{type:"string",default:"left"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1},height:{type:"string",default:"100"},headerColor:{type:"string",default:"black"}},save:e=>"small"===e.attributes.cardType&&!0===e.attributes.hasLink?(0,t.createElement)("a",{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",className:`cta-card-horizonal${"small"===e.attributes.cardType?" cta-card-small":" cta-card-large"}${"left"===e.attributes.imgLocation?" cta-card-left":" cta-card-right"}${"auto"===e.attributes.height?" cta-card--height-auto":""}`,rel:"noopener noreferrer"},(0,t.createElement)("div",{className:"columns is-multiline"},(0,t.createElement)("div",{className:"column"+("small"===e.attributes.cardType?" is-two-fifths-desktop is-two-fifths-tablet is-full-mobile":" is-one-third-desktop is-one-third-tablet is-full-mobile")},(0,t.createElement)("figure",{className:"image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))),(0,t.createElement)("div",{className:"column"+("small"===e.attributes.cardType?" is-three-fifths-desktop is-three-fifths-tablet is-full-mobile":" is-two-thirds-desktop is-two-thirds-tablet is-full-mobile")},e.attributes.title?(0,t.createElement)(cl.Content,{className:`title${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}`,tagName:e.attributes.titleLevel,value:e.attributes.title}):"","small"===e.attributes.cardType&&e.attributes.subText?(0,t.createElement)(cl.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"","large"===e.attributes.cardType?(0,t.createElement)(bl.Content,null):"",e.attributes.linkText?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.linkText)):""))):(0,t.createElement)("div",{className:` cta-card-horizonal${"small"===e.attributes.cardType?" cta-card-small":" cta-card-large"}${"left"===e.attributes.imgLocation?" cta-card-left":" cta-card-right"}${"auto"===e.attributes.height?" cta-card--height-auto":""}`},(0,t.createElement)("div",{className:"columns is-multiline"},(0,t.createElement)("div",{className:"column"+("small"===e.attributes.cardType?" is-two-fifths-desktop is-two-fifths-tablet is-full-mobile":" is-one-third-desktop is-one-third-tablet is-full-mobile")},(0,t.createElement)("figure",{className:"image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))),(0,t.createElement)("div",{className:"column"+("small"===e.attributes.cardType?" is-three-fifths-desktop is-three-fifths-tablet is-full-mobile":" is-two-thirds-desktop is-two-thirds-tablet is-full-mobile")},e.attributes.title?(0,t.createElement)(cl.Content,{className:`title${"gold"===e.attributes.headerColor?" header-color-gold":""}${"steel"===e.attributes.headerColor?" header-color-steel":""}`,tagName:e.attributes.titleLevel,value:e.attributes.title}):"","small"===e.attributes.cardType&&e.attributes.subText?(0,t.createElement)(cl.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"","large"===e.attributes.cardType?(0,t.createElement)(bl.Content,null):"")))}]});var gl=window.wp.primitives,vl=(0,t.createElement)(gl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(gl.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"}));const{__:El}=wp.i18n,{registerBlockType:fl}=wp.blocks,{PanelBody:kl,PanelRow:yl,CheckboxControl:wl,TextareaControl:_l,TextControl:xl,RadioControl:Cl,SelectControl:Nl,Button:Tl,ToolbarGroup:Al}=wp.components,{RichText:Ll,InspectorControls:Sl,MediaUploadCheck:Bl,MediaUpload:Hl,InnerBlocks:Ul,BlockControls:Il}=wp.blockEditor,{apiFetch:Pl}=wp,{useState:Ml}=wp.element;function $l(e){return(0,t.createElement)("div",{className:"card feed-item"},(0,t.createElement)("a",{href:e.link},e.imgURL&&""!==e.imgURL?(0,t.createElement)("div",{className:"card-bg-image image is-2by1",role:"img",style:{backgroundImage:`url(${e.imgURL})`},"aria-label":e.imgALT}):"",(0,t.createElement)("div",{className:"card-content"},(0,t.createElement)("div",{className:"media"},(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("p",{className:"title is-4"},e.title))),(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,"Read More")))))}function Rl(e){return(0,t.createElement)("a",{className:"meida feed-item-noimage",href:e.link},(0,t.createElement)("div",{className:"media-left"},(0,t.createElement)("p",{className:"month"},e.month),(0,t.createElement)("p",{className:"day"},e.day)),(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("p",{className:"title"},e.title),(0,t.createElement)("p",{className:"desc"},e.text))))}function Ol(e){return(0,t.createElement)("div",{className:"card feed-item"},(0,t.createElement)("a",{href:e.link},e.imgURL&&""!==e.imgURL?(0,t.createElement)("div",{className:"card-bg-image image is-2by1",role:"img",style:{backgroundImage:`url(${e.imgURL})`},"aria-label":e.imgALT}):"",(0,t.createElement)("div",{className:"card-content"},(0,t.createElement)("div",{className:"media"},(0,t.createElement)("div",{className:"media-content"},(0,t.createElement)("p",{className:"subtitle"},e.date),(0,t.createElement)("p",{className:"title is-4"},e.title))),(0,t.createElement)("div",{className:"content-text"},e.text),(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,"Read More")))))}fl("purdue-blocks/purdue-rss",{title:El("Purdue RSS feed"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 66.67"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"newspaper",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M100,21.83V80.16a4.17,4.17,0,0,1-4.17,4.17H9.72A9.73,9.73,0,0,1,0,74.6V27.38a4.17,4.17,0,0,1,4.17-4.17h7.42a8.34,8.34,0,0,1,7.85-5.55H95.83A4.17,4.17,0,0,1,100,21.83ZM9.72,76a1.39,1.39,0,0,0,1.39-1.39v-43H8.33V74.6A1.39,1.39,0,0,0,9.72,76Zm82-50H19.44V74.6a9.1,9.1,0,0,1-.1,1.39H91.67ZM27.78,53.08V36.41a2.08,2.08,0,0,1,2.08-2.08H53.47a2.08,2.08,0,0,1,2.08,2.08V53.08a2.08,2.08,0,0,1-2.08,2.08H29.86A2.08,2.08,0,0,1,27.78,53.08Zm0,8.33a2.08,2.08,0,0,1,2.08-2.08H53.47a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H29.86a2.08,2.08,0,0,1-2.08-2.08Zm6.94-13.2H48.61V41.27H34.72Zm26.39-11.8a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Zm0,12.5a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Zm0,12.5a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Z",transform:"translate(0 -17.66)"})))),category:"purdue-blocks",keywords:[],attributes:{type:{type:"string",default:"withImage"},feedURL:{type:"string",default:""},title:{type:"string",source:"html",selector:".feed-header"},titleLevel:{type:"string",default:"p"},hasLink:{type:"boolean",default:!1},link:{type:"string",default:""},linkText:{type:"string",default:""},imgLocation:{type:"string",default:"left"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},external:{type:"boolean",default:!1},data:[],error:{type:"string",default:"Loading..."}},supports:{className:!1},description:El('Display entries from RSS feed. Entries will not update automatically. Please use "Purdue News" block instead.'),edit:e=>{const a=e.attributes.data&&e.attributes.data.length>0?e.attributes.data.slice(0,3).map((e=>(0,t.createElement)("div",{key:e.id,className:"column is-one-third-desktop is-one-third-tablet is-full-mobile"},$l(e)))):"",l=e.attributes.data&&e.attributes.data.length>0?[...e.attributes.data].slice(0,4).map((e=>(0,t.createElement)("div",{key:e.id,class:"feed-item-noimage"},Rl(e)))):"",r=e.attributes.data&&e.attributes.data.length>0?[...e.attributes.data].map((e=>(0,t.createElement)("div",{key:e.id,className:"column is-one-third-desktop is-half-tablet is-full-mobile"},Ol(e)))):"",[n,s]=Ml(!e.attributes.feedURL),o=[{icon:vl,title:El("Edit RSS URL"),onClick:()=>s(!0)}];return[(0,t.createElement)(Il,null,(0,t.createElement)(Al,{controls:o})),(0,t.createElement)(Sl,null,(0,t.createElement)(kl,null,(0,t.createElement)(yl,null,(0,t.createElement)(Cl,{label:"Layout of the RSS feed",selected:e.attributes.type,options:[{label:"Recent news with image",value:"withImage"},{label:"Recent news without image",value:"withoutImage"},{label:"All News/Events",value:"all"}],onChange:t=>{e.setAttributes({type:t})}})),(0,t.createElement)(yl,null,(0,t.createElement)(Nl,{label:"Heading level of the Header",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),e.attributes.imgUrl?(0,t.createElement)(yl,null,(0,t.createElement)(_l,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})):"",e.attributes.imgUrl?(0,t.createElement)(yl,null,(0,t.createElement)(Tl,{className:"remove-image-button",onClick:()=>{e.setAttributes({imgUrl:""})}},"Remove image")):"",(0,t.createElement)(yl,null,(0,t.createElement)(wl,{label:"Add a link to the news/events page?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(yl,null,(0,t.createElement)(xl,{label:"Link text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",e.attributes.hasLink?(0,t.createElement)(yl,null,(0,t.createElement)(xl,{label:"Link URL",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})):"",e.attributes.hasLink?(0,t.createElement)(yl,null,(0,t.createElement)(wl,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"")),(0,t.createElement)("div",null,n?(0,t.createElement)("div",{className:"news-feed-editor"},(0,t.createElement)("p",null,'Enter feed URL in the box and then click "Use URL" to retrive the feed'),(0,t.createElement)("form",{onSubmit:t=>{t.preventDefault(),e.attributes.feedURL&&s(!1),Pl({path:"/purduerssfeed/v2/getFeed/?url="+e.attributes.feedURL,method:"GET"}).then((t=>{t&&(JSON.parse(t).error?(e.setAttributes({error:JSON.parse(t).error}),e.setAttributes({data:null})):(e.setAttributes({data:JSON.parse(t)}),e.setAttributes({error:""})))}))},className:"rss-form"},(0,t.createElement)(xl,{placeholder:El("Enter URL here…"),value:e.attributes.feedURL,onChange:t=>e.setAttributes({feedURL:t}),className:"rss-input"}),(0,t.createElement)(Tl,{isPrimary:!0,type:"submit"},El("Use URL")))):(0,t.createElement)("div",{className:"news-feed"},(0,t.createElement)(Ll,{className:"feed-header",tagname:e.setAttributes.titleLevel,value:e.attributes.title,onChange:t=>{e.setAttributes({title:t})},placeholder:"Add A Header (Optional)",keepPlaceholderOnFocus:!0,allowedFormats:[]}),""!==e.attributes.error?(0,t.createElement)("p",{className:"error"},e.attributes.error):"",!e.attributes.data||"withImage"!==e.attributes.type&&"all"!==e.attributes.type?"":(0,t.createElement)("div",{className:"columns is-multiline feed-items components-disabled"},"withImage"===e.attributes.type?a:r),e.attributes.data&&"withImage"===e.attributes.type&&e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button components-disabled"},(0,t.createElement)("a",{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText)):"",e.attributes.data&&"withoutImage"===e.attributes.type?(0,t.createElement)("div",{className:"feed-grid"},(0,t.createElement)("div",{className:"feed-image"},(0,t.createElement)(Bl,null,(0,t.createElement)(Hl,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{className:"image is-3by2",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)(Tl,{onClick:l},""!==e.attributes.imgUrl?"Select a new image":"Select an image"))}}))),(0,t.createElement)("div",{className:"feed-items components-disabled"},l),e.attributes.hasLink?(0,t.createElement)("a",{className:"button components-disabled",href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText):""):""))]},save:e=>{const a=e.attributes.data&&e.attributes.data.length>0?e.attributes.data.slice(0,3).map((e=>(0,t.createElement)("div",{key:e.id,className:"column is-one-third-desktop is-one-third-tablet is-full-mobile"},$l(e)))):"",l=e.attributes.data&&e.attributes.data.length>0?[...e.attributes.data].slice(0,4).map((e=>(0,t.createElement)("div",{key:e.id,class:"feed-item-noimage"},Rl(e)))):"",r=e.attributes.data&&e.attributes.data.length>0?[...e.attributes.data].map((e=>(0,t.createElement)("div",{key:e.id,className:"column is-one-third-desktop is-half-tablet is-full-mobile"},Ol(e)))):"";return(0,t.createElement)("div",{className:"news-feed"},(0,t.createElement)("div",{className:"container"},e.attributes.title?(0,t.createElement)(Ll.Content,{className:"feed-header",tagName:e.attributes.titleLevel,value:e.attributes.title}):"",""!==e.attributes.error?(0,t.createElement)("p",{className:"error"},e.attributes.error):"",!e.attributes.data||"withImage"!==e.attributes.type&&"all"!==e.attributes.type?"":(0,t.createElement)("div",{className:"columns is-multiline feed-items"},"withImage"===e.attributes.type?a:r),e.attributes.data&&"withImage"===e.attributes.type&&e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("a",{href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText)):"",e.attributes.data&&"withoutImage"===e.attributes.type?(0,t.createElement)("div",{className:"feed-grid"},e.attributes.imgUrl?(0,t.createElement)("figure",{className:"feed-image is-3by2"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText})):"",(0,t.createElement)("div",{className:"feed-items"},l),e.attributes.hasLink?(0,t.createElement)("a",{className:"button",href:e.attributes.link,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.linkText):""):""))}});const{__:Dl}=wp.i18n,{registerBlockType:Vl}=wp.blocks,{PanelBody:Gl,PanelRow:Fl,CheckboxControl:Zl,TextareaControl:ql,TextControl:zl,RadioControl:jl,SelectControl:Wl,Button:Yl}=wp.components,{RichText:Xl,InspectorControls:Kl,InnerBlocks:Ql,useBlockProps:Jl}=wp.blockEditor;Vl("purdue-blocks/anchor-link-navigation",{title:Dl("Right Column - Anchor Link Navigation"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("rect",{width:"100",height:"100",rx:"8.55"}),(0,t.createElement)("g",{id:"Arrow-right",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-fff",d:"M47.85,9.91a4.54,4.54,0,0,1,6.43,0L91.16,46.77a4.53,4.53,0,0,1,0,6.44L54.28,90.09a4.54,4.54,0,0,1-6.43,0l-4.21-4.22a4.55,4.55,0,0,1,.08-6.5L66.58,57.59H12.05A4.54,4.54,0,0,1,7.5,53V47a4.54,4.54,0,0,1,4.55-4.55H66.58L43.72,20.63a4.52,4.52,0,0,1-.08-6.5Z"})))),category:"purdue-blocks",keywords:[],attributes:{accordion:{type:"boolean",default:!1},includeH2:{type:"boolean",default:!0},includeH3:{type:"boolean",default:!1},includeH4:{type:"boolean",default:!1},includeH5:{type:"boolean",default:!1},includeH6:{type:"boolean",default:!1},range:{type:"string",default:"page"}},supports:{className:!1,anchor:!0},description:Dl("Create a single level menu from the headers that have an HTML anchor."),edit:e=>[(0,t.createElement)(Kl,null,(0,t.createElement)(Gl,null,(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Include Headings on accordion block?",checked:e.attributes.accordion,onChange:()=>e.setAttributes({accordion:!e.attributes.accordion})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H2 heading level only?",checked:e.attributes.includeH2,onChange:()=>e.setAttributes({includeH2:!e.attributes.includeH2})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H3 heading level only?",checked:e.attributes.includeH3,onChange:()=>e.setAttributes({includeH3:!e.attributes.includeH3})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H4 heading level only?",checked:e.attributes.includeH4,onChange:()=>e.setAttributes({includeH4:!e.attributes.includeH4})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H5 heading level only?",checked:e.attributes.includeH5,onChange:()=>e.setAttributes({includeH5:!e.attributes.includeH5})})),(0,t.createElement)(Fl,null,(0,t.createElement)(Zl,{label:"Pull H6 heading level only?",checked:e.attributes.includeH6,onChange:()=>e.setAttributes({includeH6:!e.attributes.includeH6})})),(0,t.createElement)(Fl,null,(0,t.createElement)(jl,{label:"Where to pull the headings?",help:"The block needs to be placed in a columns block or content page layout block in order to use 'This Section' option.",selected:e.attributes.range,options:[{label:"This Section",value:"section"},{label:"Whole Page",value:"page"}],onChange:t=>{e.setAttributes({range:t})}})))),(0,t.createElement)("div",{className:"anchor-link-block-editor"},"Preview/Publish the page to see the anchor link navigation menu.")],save:e=>{const a=Jl.save();return(0,t.createElement)("div",x({},a,{className:"anchor-link-block"}),(0,t.createElement)("div",{class:`anchor-link-block-links\n ${e.attributes.accordion?" has-accordion":""}\n ${e.attributes.includeH2?"":" no-H2"}\n ${e.attributes.includeH3?" has-H3":""}\n ${e.attributes.includeH4?" has-H4":""}\n ${e.attributes.includeH5?" has-H5":""}\n ${e.attributes.includeH6?" has-H6":""}\n ${"page"===e.attributes.range?"":" pull-from-section"}\n `}),(0,t.createElement)("button",{id:"to-top-sidebar",class:"to-top-sidebar"},(0,t.createElement)("span",null,"Back To Top")))}});let er='',tr='',ar='',lr='',rr='',nr='',sr='',or='',ir='',cr='',ur='',dr='',mr='',br='',pr='',hr='',gr='',vr='',Er='',fr='',kr='',yr='',wr='';const{__:_r}=wp.i18n,{registerBlockType:xr}=wp.blocks,{PanelBody:Cr,PanelRow:Nr,CheckboxControl:Tr,TextareaControl:Ar,TextControl:Lr,RadioControl:Sr,SelectControl:Br,Button:Hr}=wp.components,{RichText:Ur,InspectorControls:Ir,InnerBlocks:Pr,MediaUploadCheck:Mr,MediaUpload:$r,useBlockProps:Rr}=wp.blockEditor;xr("purdue-blocks/image-toggle-card",{title:_r("Image Toggle Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("defs",null),(0,t.createElement)("rect",{width:"100",height:"100",rx:"8.55"}),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-fff",d:"M78.15,37.21a28,28,0,0,1-7,18.51c-2.66,3-6.83,9.41-8.38,14.74H55.12a8.9,8.9,0,0,1,.36-2.29,50.5,50.5,0,0,1,9.93-17.51,20.46,20.46,0,1,0-30.82,0A50.45,50.45,0,0,1,44.54,68.2a7.82,7.82,0,0,1,.34,2.25v0H37.2c-1.55-5.33-5.72-11.7-8.38-14.74A28.14,28.14,0,1,1,78.15,37.21ZM52.56,24.41A2.56,2.56,0,0,1,50,27,10.25,10.25,0,0,0,39.76,37.21a2.56,2.56,0,1,1-5.11,0A15.37,15.37,0,0,1,50,21.85,2.56,2.56,0,0,1,52.56,24.41ZM37.21,75.59H62.79v6.9a2.55,2.55,0,0,1-.43,1.42L58.44,89.8a2.58,2.58,0,0,1-2.14,1.14H43.69a2.58,2.58,0,0,1-2.13-1.14l-3.92-5.89a2.54,2.54,0,0,1-.42-1.42Z"})))),category:"purdue-blocks",keywords:[],attributes:{images:{type:"array",default:[]},cardTitle:{type:"string",default:""},firstTitle:{type:"string",default:""},secondTitle:{type:"string",default:""},linkText:{type:"string",default:""},linkUrl:{type:"string",default:""},includeLink:{type:"boolean",default:!1},openInNewTab:{type:"boolean",default:!1},icon:{type:"string",default:""},cardStyle:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:_r("Add a block with up to two images that can be toggled with an optional link."),edit:a=>{const l=()=>{a.setAttributes({images:""})};return[(0,t.createElement)(Ir,null,(0,t.createElement)(Cr,null,(0,t.createElement)(Nr,null,(0,t.createElement)(Br,{label:"Card Header Style",value:a.attributes.cardStyle,options:[{value:"",label:"Light Gray"},{value:"has-header-black",label:"Black"}],onChange:e=>{a.setAttributes({cardStyle:e})}})),(0,t.createElement)(Nr,null,(0,t.createElement)(Tr,{label:"Add a link to this card?",checked:a.attributes.includeLink,onChange:()=>a.setAttributes({includeLink:!a.attributes.includeLink})})),a.attributes.includeLink?(0,t.createElement)(Cr,null,(0,t.createElement)(Nr,null,(0,t.createElement)(Lr,{label:"Link Text",value:a.attributes.linkText,onChange:e=>a.setAttributes({linkText:e})})),(0,t.createElement)(Nr,null,(0,t.createElement)(Lr,{label:"Link URL",value:a.attributes.linkUrl,onChange:e=>a.setAttributes({linkUrl:e})}))):"",(0,t.createElement)(Nr,null,(0,t.createElement)(Tr,{label:"Open link in new tab?",checked:a.attributes.openInNewTab,onChange:()=>a.setAttributes({openInNewTab:!a.attributes.openInNewTab})})))),(0,t.createElement)("div",{className:"image-toggle-card-block-editor"},(0,t.createElement)("div",{className:"image-toggle-card-block-editor__inputs"},(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",null,"Card Heading"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==a.attributes.cardTitle?a.attributes.cardTitle:"",className:"input",type:"text",placeholder:"Card Heading...",onChange:e=>{a.setAttributes({cardTitle:e.target.value})}})),(0,t.createElement)("div",{className:"image-toggle-card-block-editor__icon-selector"},(0,t.createElement)("button",{id:"iconSelectorButton",onClick:Or,className:"image-toggle-card-block-editor__button"},"Select Optional Icon"),(0,t.createElement)("div",{id:"iconPopup",className:"image-toggle-card-block-editor__icon-selector--popup"},Object.values(e).map((e=>(0,t.createElement)("button",{className:"image-toggle-card-block-editor__icon-selector--icon",dangerouslySetInnerHTML:{__html:e},onClick:t=>{a.setAttributes({icon:e})}})))),a.attributes.icon?(0,t.createElement)(Hr,{className:"image-toggle-card-block-editor__button",onClick:()=>{a.setAttributes({icon:""})}},"Remove Icon"):"",(0,t.createElement)("div",{className:"image-toggle-card-block-editor__icon-selector--selected-icon",dangerouslySetInnerHTML:{__html:a.attributes.icon}})))),(0,t.createElement)(Mr,null,(0,t.createElement)($r,{multiple:!0,gallery:!0,onSelect:e=>{e.length>0&&e.length<3&&a.setAttributes({images:e})},render:e=>{let{open:r}=e;return a.attributes.images.length>0&&a.attributes.images.length<3?(0,t.createElement)("div",{className:"image-toggle-card-block-editor__preview"},(0,t.createElement)("div",{className:"image-toggle-card-block-editor__imgGroup"},a.attributes.images.map((e=>(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:"",src:e.url}))))),(0,t.createElement)(Hr,{className:"image-toggle-card-block-editor__button",onClick:r},"Select New Images"),(0,t.createElement)(Hr,{className:"bulma-blocks-editor-site-hero__button",onClick:l},"Remove images")):(0,t.createElement)("div",{className:"image-toggle-card-block-editor__container"},(0,t.createElement)("span",{className:"image-toggle-card-block-editor__heading"},(0,t.createElement)("span",{className:"dashicons dashicons-format-image"}),(0,t.createElement)("span",null,"Image Toggle Card")),(0,t.createElement)("p",{className:"image-toggle-card-block-editor__description"},"Pick up to two images from the media library."),(0,t.createElement)(Hr,{className:"image-toggle-card-block-editor__button",onClick:r},"Open Media Library"))}})),(0,t.createElement)("span",{style:{color:"gray",paddingLeft:"0.75rem",paddingBottom:"0.5rem"}},"Note: Toggle buttons will only appear when two images are selected."),a.attributes.images.length>1?(0,t.createElement)("div",{className:"image-toggle-card-block-editor__inputs"},(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",null,"First Image Title"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==a.attributes.firstTitle?a.attributes.firstTitle:"",className:"input",type:"text",placeholder:"First Image Title...",onChange:e=>{a.setAttributes({firstTitle:e.target.value})}}))),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("label",null,"Second Image Title"),(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==a.attributes.secondTitle?a.attributes.secondTitle:"",className:"input",type:"text",placeholder:"Second Image Title...",onChange:e=>{a.setAttributes({secondTitle:e.target.value})}})))):"")]},save:e=>{const a=Rr.save();return(0,t.createElement)("div",x({},a,{className:"pu-image-toggle box"}),(0,t.createElement)("div",{className:"pu-image-toggle__heading"+(""!==e.attributes.cardStyle?` ${e.attributes.cardStyle}`:"")},(0,t.createElement)("span",null,""!==e.attributes.icon?(0,t.createElement)("span",{className:"pu-image-toggle__heading--icon"+(e.attributes.icon.includes('data-bg="true"')?" has-bg-white":""),dangerouslySetInnerHTML:{__html:e.attributes.icon}}):""," ",e.attributes.cardTitle),e.attributes.includeLink?(0,t.createElement)("a",{href:e.attributes.linkUrl,target:e.attributes.openInNewTab?"_blank":"",rel:"noopener noreferrer"},e.attributes.linkText):""),(0,t.createElement)("div",{className:"pu-image-toggle__images"},e.attributes.images?e.attributes.images.map(((e,a)=>(0,t.createElement)("img",{className:0===a?"show":"",alt:e.alt,src:e.url}))):""),e.attributes.images.length>1?(0,t.createElement)("div",{className:"pu-image-toggle__buttons"},(0,t.createElement)("button",{className:"toggle-button selected"},e.attributes.firstTitle),(0,t.createElement)("button",{className:"toggle-button"},e.attributes.secondTitle)):"")}});const Or=e=>{const t=e.target.nextSibling;t.classList.contains("open")?t.classList.remove("open"):t.classList.add("open")},{__:Dr}=wp.i18n,{registerBlockType:Vr}=wp.blocks,{PanelBody:Gr,PanelRow:Fr,CheckboxControl:Zr,TextareaControl:qr,TextControl:zr,RadioControl:jr,SelectControl:Wr,Button:Yr}=wp.components,{RichText:Xr,InspectorControls:Kr,InnerBlocks:Qr,useBlockProps:Jr}=wp.blockEditor;Vr("purdue-blocks/content-page-layout",{title:Dr("Content Page Layout"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Columns",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-d9ab28",d:"M100,15.62V84.38a9.38,9.38,0,0,1-9.38,9.37H9.37A9.38,9.38,0,0,1,0,84.38V15.62A9.38,9.38,0,0,1,9.37,6.25H90.62A9.38,9.38,0,0,1,100,15.62ZM43.75,31.25H12.5v50H43.75Zm43.75,0H56.25v50H87.5Z",transform:"translate(0 -6.25)"})))),category:"purdue-blocks",keywords:[],attributes:{width:{type:"string",default:"narrow"},withSidebar:{type:"boolean",default:!1},sidebarLocationDesktop:{type:"string",default:"right"},sidebarLocationMobile:{type:"string",default:"below"},contentLocation:{type:"string",default:"center"},bgColor:{type:"string",default:""},border:{type:"boolean",default:!1},twoColumn:{type:"boolean",default:!1},paddingTop:{type:"string",default:""},paddingBottom:{type:"string",default:""},stackReverseMobile:{type:"boolean",default:!1},divider:{type:"boolean",default:!1},verticalCenter:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:Dr("A content page layout with a main content area with/without a sidebar area."),edit:e=>[(0,t.createElement)(Kr,null,(0,t.createElement)(Gr,null,(0,t.createElement)(Fr,null,(0,t.createElement)(Wr,{label:"Background Color",value:e.attributes.bgColor,options:[{value:"",label:"None"},{value:"has-background-black",label:"Black"},{value:"has-background-grey-lighter",label:"Light Gray"},{value:"has-background-black-ter",label:"Dark Gray"},{value:"has-background-boiler-gold",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({bgColor:t})}})),(0,t.createElement)(Fr,null,(0,t.createElement)(Wr,{label:"Padding at the top",value:e.attributes.paddingTop,options:[{value:"has-padding-top-none",label:"None"},{value:"has-padding-top-small",label:"Small"},{value:"",label:"Medium"},{value:"has-padding-top-large",label:"Large"}],onChange:t=>{e.setAttributes({paddingTop:t})}})),(0,t.createElement)(Fr,null,(0,t.createElement)(Wr,{label:"Padding at the bottom",value:e.attributes.paddingBottom,options:[{value:"has-padding-bottom-none",label:"None"},{value:"has-padding-bottom-small",label:"Small"},{value:"",label:"Medium"},{value:"has-padding-bottom-large",label:"Large"}],onChange:t=>{e.setAttributes({paddingBottom:t})}})),(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Add a border at the bottom?",checked:e.attributes.border,onChange:()=>{e.setAttributes({border:!e.attributes.border})}})),(0,t.createElement)(Fr,null,(0,t.createElement)(jr,{label:"Main content aria width",selected:e.attributes.width,options:[{label:"Narrow",value:"narrow"},{label:"Wide",value:"wide"}],onChange:t=>{e.setAttributes({width:t})}})),"narrow"!==e.attributes.width||e.attributes.withSidebar?"":(0,t.createElement)(Fr,null,(0,t.createElement)(jr,{label:"Main content aria location",selected:e.attributes.contentLocation,options:[{label:"Center",value:"center"},{label:"Left",value:"left"}],onChange:t=>{e.setAttributes({contentLocation:t})}})),"narrow"===e.attributes.width?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Add A Sidebar?",help:"Would you like to add sidebar to this page?",checked:e.attributes.withSidebar,onChange:()=>{e.attributes.withSidebar?e.setAttributes({withSidebar:!1}):e.setAttributes({withSidebar:!0})}})):"","narrow"===e.attributes.width&&e.attributes.withSidebar?(0,t.createElement)(Fr,null,(0,t.createElement)(jr,{label:"Sidebar Location On Desktop",help:"Choose to place sidebar on the left/right side of the main content.",selected:e.attributes.sidebarLocationDesktop,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({sidebarLocationDesktop:t})}})):"","narrow"===e.attributes.width&&e.attributes.withSidebar?(0,t.createElement)(Fr,null,(0,t.createElement)(jr,{label:"Sidebar Location On Mobile",help:"Choose to place sidebar above/below the main content.",selected:e.attributes.sidebarLocationMobile,options:[{label:"Above main content",value:"above"},{label:"Below main content",value:"below"}],onChange:t=>{e.setAttributes({sidebarLocationMobile:t})}})):"","wide"===e.attributes.width?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Put content in two columns?",checked:e.attributes.twoColumn,onChange:()=>{e.setAttributes({twoColumn:!e.attributes.twoColumn})}})):"","wide"===e.attributes.width&&e.attributes.twoColumn?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Center content vertically?",checked:e.attributes.verticalCenter,onChange:()=>{e.setAttributes({verticalCenter:!e.attributes.verticalCenter})}})):"","wide"===e.attributes.width&&e.attributes.twoColumn?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Reverse the stack order the columns on mobile?",checked:e.attributes.stackReverseMobile,onChange:()=>{e.setAttributes({stackReverseMobile:!e.attributes.stackReverseMobile})}})):"","wide"===e.attributes.width&&e.attributes.twoColumn?(0,t.createElement)(Fr,null,(0,t.createElement)(Zr,{label:"Add a divider between columns?",checked:e.attributes.divider,onChange:()=>{e.setAttributes({divider:!e.attributes.divider})}})):"")),(0,t.createElement)("div",{className:`section\n ${e.attributes.withSidebar?" page-layout-with-sidebar":""}\n ${e.attributes.bgColor?` ${e.attributes.bgColor}`:""}\n ${e.attributes.paddingTop?` ${e.attributes.paddingTop}`:""}\n ${e.attributes.paddingBottom?` ${e.attributes.paddingBottom}`:""}\n ${e.attributes.border?" has-border-bottom":""}\n ${"narrow"!==e.attributes.width||e.attributes.withSidebar||"left"!==e.attributes.contentLocation?"":" align-left"}\n ${"wide"===e.attributes.width?" page-layout-wide":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn?" page-layout-two-column":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.stackReverseMobile?" page-layout-two-column-reverser":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.divider?" page-layout-two-column-divider":""}\n `},(0,t.createElement)("div",{className:`container${"left"===e.attributes.sidebarLocationDesktop&&"narrow"===e.attributes.width?" desktop-reverse":""}${"narrow"===e.attributes.width&&"above"===e.attributes.sidebarLocationMobile||"wide"===e.attributes.width&&e.attributes.stackReverseMobile?" mobile-reverse":""}`},(0,t.createElement)(Qr,{template:[["core/columns",{className:"page-layout-columns columns is-multiline"},[["core/column",{className:"column is-two-thirds-desktop is-full-tablet is-full-mobile page-layout-main"},[["core/paragraph",{placeholder:"Start typing to add content, or remove this default paragraph block and then add new blocks."}]]],["core/column",{className:"column is-one-quarter-desktop is-full-tablet is-full-mobile page-layout-sidebar"},[["core/paragraph",{placeholder:"Start typing to add content, or remove this default paragraph block and then add new blocks."}]]]]]],templateInsertUpdatesSelection:!1})))],save:e=>{const a=Jr.save();return(0,t.createElement)("div",x({},a,{className:`section\n ${e.attributes.withSidebar?" page-layout-with-sidebar":""}\n ${e.attributes.bgColor?` ${e.attributes.bgColor}`:""}\n ${e.attributes.paddingTop?` ${e.attributes.paddingTop}`:""}\n ${e.attributes.paddingBottom?` ${e.attributes.paddingBottom}`:""}\n ${e.attributes.border?" has-border-bottom":""}\n ${"narrow"!==e.attributes.width||e.attributes.withSidebar||"left"!==e.attributes.contentLocation?"":" align-left"}\n ${"wide"===e.attributes.width?" page-layout-wide":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn?" page-layout-two-column":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.stackReverseMobile?" page-layout-two-column-reverser":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.divider?" page-layout-two-column-divider":""}\n ${"wide"===e.attributes.width&&e.attributes.twoColumn&&e.attributes.verticalCenter?" page-layout-two-column-verticalCenter":""}\n `}),(0,t.createElement)("div",{className:`container${"left"===e.attributes.sidebarLocationDesktop&&"narrow"===e.attributes.width?" desktop-reverse":""}${"narrow"===e.attributes.width&&"above"===e.attributes.sidebarLocationMobile||"wide"===e.attributes.width&&e.attributes.stackReverseMobile?" mobile-reverse":""}`},(0,t.createElement)(Qr.Content,null)))}});const{__:en}=wp.i18n,{registerBlockType:tn}=wp.blocks,{PanelBody:an,PanelRow:ln,TextControl:rn,Button:nn,CheckboxControl:sn,RadioControl:on,ToolbarGroup:cn}=wp.components,{RichText:un,InspectorControls:dn,MediaUploadCheck:mn,MediaUpload:bn,InnerBlocks:pn,BlockControls:hn,useBlockProps:gn}=wp.blockEditor;tn("purdue-blocks/sidebar-cta",{title:en("Right Column - Sidebar CTA"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 97.47"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Arrow-right",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M47.47,2.84a5.34,5.34,0,0,1,7.57,0L98.43,46.21a5.34,5.34,0,0,1,0,7.56L55,97.16a5.34,5.34,0,0,1-7.57,0l-4.95-5a5.35,5.35,0,0,1,.09-7.65L69.5,58.93H5.36A5.35,5.35,0,0,1,0,53.57V46.43a5.35,5.35,0,0,1,5.36-5.36H69.5L42.61,15.45a5.31,5.31,0,0,1-.09-7.65Z",transform:"translate(0 -1.27)"})))),category:"purdue-blocks",keywords:[],attributes:{backgroundColor:{type:"string",default:"white"},header:{type:"string",source:"html",selector:"p.header"},content:{type:"string",source:"html",selector:"p.content"},ctaText:{type:"string",source:"html",selector:"a.cta-button"},ctaUrl:{type:"string",default:""},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:en("Use this block to add a CTA card on the sidebar."),edit:e=>[(0,t.createElement)(dn,null,(0,t.createElement)(an,null,(0,t.createElement)(ln,null,(0,t.createElement)(on,{label:"Background Color",help:"Choose to background color of the proofpoint.",selected:e.attributes.backgroundColor,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({backgroundColor:t})}}))),(0,t.createElement)(an,null,(0,t.createElement)("h2",null,"Button Link settings"),(0,t.createElement)(ln,null,(0,t.createElement)(rn,{label:"Link URL",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})),(0,t.createElement)(ln,null,(0,t.createElement)(sn,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:`purdue-blocks-sidebar-cta${"black"===e.attributes.backgroundColor?" purdue-blocks-sidebar-cta-black":""}\n ${"gray"===e.attributes.backgroundColor?" purdue-blocks-sidebar-cta-gray":""}`},(0,t.createElement)(un,{tagname:"p",value:e.attributes.header,className:"header",onChange:t=>{e.setAttributes({header:t})},placeholder:"Add Header Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)(un,{tagname:"p",value:e.attributes.content,className:"content",onChange:t=>{e.setAttributes({content:t})},placeholder:"Add Content Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)(un,{tagname:"a",value:e.attributes.ctaText,className:"cta-button",onChange:t=>{e.setAttributes({ctaText:t})},placeholder:"Add Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}))],save:e=>{const a=gn.save();return(0,t.createElement)("div",x({},a,{className:`purdue-blocks-sidebar-cta${"black"===e.attributes.backgroundColor?" purdue-blocks-sidebar-cta-black":""}\n ${"gray"===e.attributes.backgroundColor?" purdue-blocks-sidebar-cta-gray":""}`}),e.attributes.header?(0,t.createElement)(un.Content,{className:"header",tagName:"p",value:e.attributes.header}):"",e.attributes.content?(0,t.createElement)(un.Content,{className:"content",tagName:"p",value:e.attributes.content}):"",e.attributes.ctaUrl||e.attributes.ctaText?(0,t.createElement)("a",{href:e.attributes.ctaUrl,className:"cta-button",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText):"")}});var vn=window.wp.serverSideRender,En=a.n(vn);const{__:fn}=wp.i18n,{registerBlockType:kn}=wp.blocks,{PanelBody:yn,PanelRow:wn,CheckboxControl:xn,TextareaControl:Cn,TextControl:Nn,RadioControl:Tn,SelectControl:An,Button:Ln,ToolbarGroup:Sn,Disabled:Bn}=wp.components,{RichText:Hn,InspectorControls:Un,MediaUploadCheck:In,MediaUpload:Pn,InnerBlocks:Mn,BlockControls:$n,useBlockProps:Rn}=wp.blockEditor,{apiFetch:On}=wp,{useState:Dn}=wp.element;kn("purdue-blocks/purdue-news",{title:fn("Purdue News"),description:fn("Display entries from RSS feed."),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 66.67"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"newspaper",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M100,21.83V80.16a4.17,4.17,0,0,1-4.17,4.17H9.72A9.73,9.73,0,0,1,0,74.6V27.38a4.17,4.17,0,0,1,4.17-4.17h7.42a8.34,8.34,0,0,1,7.85-5.55H95.83A4.17,4.17,0,0,1,100,21.83ZM9.72,76a1.39,1.39,0,0,0,1.39-1.39v-43H8.33V74.6A1.39,1.39,0,0,0,9.72,76Zm82-50H19.44V74.6a9.1,9.1,0,0,1-.1,1.39H91.67ZM27.78,53.08V36.41a2.08,2.08,0,0,1,2.08-2.08H53.47a2.08,2.08,0,0,1,2.08,2.08V53.08a2.08,2.08,0,0,1-2.08,2.08H29.86A2.08,2.08,0,0,1,27.78,53.08Zm0,8.33a2.08,2.08,0,0,1,2.08-2.08H53.47a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H29.86a2.08,2.08,0,0,1-2.08-2.08Zm6.94-13.2H48.61V41.27H34.72Zm26.39-11.8a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Zm0,12.5a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Zm0,12.5a2.08,2.08,0,0,1,2.08-2.08H81.25a2.08,2.08,0,0,1,2.08,2.08v4.17a2.08,2.08,0,0,1-2.08,2.08H63.19a2.08,2.08,0,0,1-2.08-2.08Z",transform:"translate(0 -17.66)"})))),category:"purdue-blocks",keywords:[],edit:e=>{const[a,l]=Dn(!e.attributes.feedURL),r=[{icon:vl,title:fn("Edit RSS URL"),onClick:()=>l(!0)}],n=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)($n,null,(0,t.createElement)(Sn,{controls:r})),(0,t.createElement)(Un,null,(0,t.createElement)(yn,null,(0,t.createElement)(wn,null,(0,t.createElement)(Tn,{label:"Layout of the RSS feed",selected:e.attributes.type,options:[{label:"Recent news with image",value:"withImage"},{label:"Recent news without image",value:"withoutImage"},{label:"All News/Events from the feed (max 10) ",value:"all"}],onChange:t=>{e.setAttributes({type:t})}})),(0,t.createElement)(wn,null,(0,t.createElement)(Nn,{label:"Add a header to this region?",value:e.attributes.header,onChange:t=>e.setAttributes({header:t})})),(0,t.createElement)(wn,null,(0,t.createElement)(Nn,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})),e.attributes.header?(0,t.createElement)(wn,null,(0,t.createElement)(An,{label:"Heading level of the Header",value:e.attributes.headerLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({headerLevel:t})}})):"","withoutImage"===e.attributes.type?(0,t.createElement)(wn,null,(0,t.createElement)("p",null,"Choose a hero Image")):"","withoutImage"===e.attributes.type?(0,t.createElement)(wn,null,(0,t.createElement)(In,null,(0,t.createElement)(Pn,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"purdue-blocks-editor-news__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(Ln,{className:"purdue-blocks-editor-feature-story__button",onClick:l},"Select a New Image"),(0,t.createElement)(Ln,{className:"bulma-blocks-editor-site-hero__button purdue-news__remove-image-button",onClick:n},"Remove image")):(0,t.createElement)("div",{className:"purdue-blocks-editor-news__container"},(0,t.createElement)("p",{className:"purdue-blocks-editor-news__description"},"Pick an image from the media library. The recommended aspect ratio is 3:2."),(0,t.createElement)(Ln,{className:"purdue-blocks-editor-feature-story__button",onClick:l},"Open Media Library"))}}))):"","withoutImage"===e.attributes.type?(0,t.createElement)(wn,null,(0,t.createElement)(Cn,{label:"Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})):"","all"!==e.attributes.type?(0,t.createElement)(wn,null,(0,t.createElement)(xn,{label:"Add a link to the news/events page?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})):"","all"!==e.attributes.type&&e.attributes.hasLink?(0,t.createElement)(wn,null,(0,t.createElement)(Nn,{label:"Link text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"","all"!==e.attributes.type&&e.attributes.hasLink?(0,t.createElement)(wn,null,(0,t.createElement)(Nn,{label:"Link URL",value:e.attributes.link,onChange:t=>e.setAttributes({link:t})})):"","all"!==e.attributes.type&&e.attributes.hasLink?(0,t.createElement)(wn,null,(0,t.createElement)(xn,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"")),(0,t.createElement)("div",null,a?(0,t.createElement)("div",{className:"news-feed-editor"},(0,t.createElement)("p",null,'Enter feed URL in the box and then click "Use URL" to retrive the feed'),(0,t.createElement)("form",{onSubmit:t=>{t.preventDefault(),e.attributes.feedURL&&l(!1)},className:"rss-form"},(0,t.createElement)(Nn,{placeholder:fn("Enter URL here…"),value:e.attributes.feedURL,onChange:t=>e.setAttributes({feedURL:t}),className:"rss-input"}),(0,t.createElement)(Ln,{isPrimary:!0,type:"submit"},fn("Use URL")))):(0,t.createElement)(Bn,null,(0,t.createElement)(En(),{block:"purdue-blocks/purdue-news",attributes:e.attributes})))]}});const{__:Vn}=wp.i18n,{registerBlockType:Gn}=wp.blocks,{PanelBody:Fn,PanelRow:Zn,SelectControl:qn,CheckboxControl:zn,TextControl:jn}=wp.components,{InspectorControls:Wn}=wp.blockEditor,{withSelect:Yn}=wp.data,{apiFetch:Xn}=wp;var Kn=[];Gn("purdue-blocks/custom-side-menu",{title:Vn("Custom Side Menu"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 85 82.85"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Arrow-right",class:"color-dust-gold"},(0,t.createElement)("path",{class:"cls-1",d:"M47.85,9.91a4.54,4.54,0,0,1,6.42,0h0L91.16,46.77a4.53,4.53,0,0,1,0,6.41l0,0L54.28,90.09a4.54,4.54,0,0,1-6.42,0h0l-4.21-4.22a4.55,4.55,0,0,1,0-6.43l.07-.07L66.58,57.59H12.05A4.54,4.54,0,0,1,7.5,53.06V47A4.54,4.54,0,0,1,12,42.45H66.58L43.72,20.63a4.52,4.52,0,0,1-.19-6.39l.11-.11Z",transform:"translate(-7.5 -8.58)"}))),category:"purdue-blocks",keywords:[],description:Vn('Select a menu to create a side navigation for this page. It requires the installation of "WP-REST-API V2 Menus" to work.'),edit:Yn((e=>{const t=Xn({path:"/menus/v1/menus/",method:"GET"}).then((e=>(Kn=e,e)));return{menus:Kn,response:t}}))((e=>{const{menus:a,response:l}=e;if(!l)return(0,t.createElement)("div",{className:"custom-side-menu"},(0,t.createElement)("p",{className:"error-message"},"Loading..."));if(0===l.length)return(0,t.createElement)("div",{className:"custom-side-menu"},(0,t.createElement)("p",{className:"error-message"},"No menus found!"));const r=[{value:"",label:"Select a menu"}];for(let e=0;e{e.setAttributes({selectedMenu:t})}})),(0,t.createElement)(Zn,null,(0,t.createElement)(zn,{label:"Add a back to top button at the bottom?",checked:e.attributes.toTop,onChange:()=>e.setAttributes({toTop:!e.attributes.toTop})})),(0,t.createElement)(Zn,null,(0,t.createElement)(jn,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})))),(0,t.createElement)("div",{className:"custom-side-menu-editor components-disabled"},(0,t.createElement)(En(),{block:"purdue-blocks/custom-side-menu",attributes:e.attributes}))]}))});const{__:Qn}=wp.i18n,{registerBlockType:Jn}=wp.blocks,{PanelBody:es,PanelRow:ts,TextControl:as,TextareaControl:ls,Button:rs,CheckboxControl:ns,RadioControl:ss,Popover:os,ToolbarButton:is,KeyboardShortcuts:cs}=wp.components,{InspectorControls:us,MediaUploadCheck:ds,MediaUpload:ms,InnerBlocks:bs,RichText:ps,BlockControls:hs,useBlockProps:gs}=wp.blockEditor;Jn("purdue-blocks/purdue-button",{title:Qn("Purdue Button"),icon:(0,t.createElement)("svg",{id:"e39343d6-a9a0-44c7-9f48-599e26c08610","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100"},(0,t.createElement)("g",{id:"clone",class:"cls-2"},(0,t.createElement)("g",{class:"cls-2"},(0,t.createElement)("path",{class:"a5e7d352-d338-4ff0-9c2b-3bce1de664a1",d:"M100,89.28571A10.718,10.718,0,0,1,89.28571,100H10.71429A10.718,10.718,0,0,1,0,89.28571V10.71429A10.718,10.718,0,0,1,10.71429,0H89.28571A10.718,10.718,0,0,1,100,10.71429ZM89.28571,12.0529a1.34289,1.34289,0,0,0-1.33861-1.33861H12.0529a1.34289,1.34289,0,0,0-1.33861,1.33861V87.9471a1.34289,1.34289,0,0,0,1.33861,1.33861H87.9471a1.34289,1.34289,0,0,0,1.33861-1.33861ZM21.42857,53.57143V46.42857a2.68655,2.68655,0,0,1,2.679-2.679H75.89241a2.68655,2.68655,0,0,1,2.679,2.679v7.14286a2.68655,2.68655,0,0,1-2.679,2.679H24.10759A2.68655,2.68655,0,0,1,21.42857,53.57143Z",transform:"translate(0)"})))),category:"purdue-blocks",keywords:[],attributes:{buttonStyle:{type:"string",default:"fill"},backgroundColor:{type:"string",default:"black"},fontStyle:{type:"string",default:"primary"},width:{type:"string",default:"auto"},buttonText:{type:"string",source:"html",selector:"span.purdue-blocks__button__text"},hasLink:{type:"boolean",default:!1},buttonURL:{type:"string",default:""},external:{type:"boolean",default:!1},fancyColor:{type:"string",default:"black"},height:{type:"string",default:"auto"},isDownload:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:Qn("This block adds a button styled in line with Purdue brand."),edit:e=>[(0,t.createElement)(us,null,(0,t.createElement)(es,null,(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Font style",selected:e.attributes.fontStyle,options:[{label:"Primary (Regular and uppercase)",value:"primary"},{label:"Narrow (Condesed and capitalized",value:"narrow"},{label:"Fancy",value:"fancy"}],onChange:t=>{e.setAttributes({fontStyle:t})}})),"fancy"===e.attributes.fontStyle?"":(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Button Style",selected:e.attributes.buttonStyle,options:[{label:"Fill",value:"fill"},{label:"Outline",value:"outline"}],onChange:t=>{e.setAttributes({buttonStyle:t}),e.setAttributes({backgroundColor:"black"})}})),"fancy"===e.attributes.fontStyle?(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Button Background Color",selected:e.attributes.fancyColor,options:[{label:"Black",value:"black"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({fancyColor:t})}})):(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Button Background Color",selected:e.attributes.backgroundColor,options:"fill"===e.attributes.buttonStyle?[{label:"Black",value:"black"},{label:"Gold (use on light background)",value:"goldLignt"},{label:"Gold (use on dark background)",value:"goldDark"},{label:"Opaque",value:"opaque"}]:[{label:"Black",value:"black"},{label:"Gold (use on light background)",value:"goldLignt"},{label:"Gold (use on dark background)",value:"goldDark"}],onChange:t=>{e.setAttributes({backgroundColor:t})}})),(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Button Width",selected:e.attributes.width,options:[{label:"Full width",value:"full"},{label:"Full width on mobile only",value:"fullMobile"},{label:"Auto",value:"auto"}],onChange:t=>{e.setAttributes({width:t}),wp.hooks.addFilter("editor.BlockListBlock","purdue-blocks/purdue-button-modify-element",Es)}})),(0,t.createElement)(ts,null,(0,t.createElement)(ss,{label:"Height",help:"Choose to the height of the button.",selected:e.attributes.height,options:[{label:"Auto",value:"auto"},{label:"100%",value:"full"}],onChange:t=>{e.setAttributes({height:t})}}))),(0,t.createElement)(es,null,(0,t.createElement)(ts,null,(0,t.createElement)(ns,{label:"Add a link to this button?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(ts,null,(0,t.createElement)(as,{label:"Link URL",value:e.attributes.buttonURL,onChange:t=>e.setAttributes({buttonURL:t})})):"",e.attributes.hasLink?(0,t.createElement)(ts,null,(0,t.createElement)(ns,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",e.attributes.hasLink&&"fancy"!==e.attributes.fontStyle?(0,t.createElement)(ts,null,(0,t.createElement)(ns,{label:"Is this a download button?",checked:e.attributes.isDownload,onChange:()=>e.setAttributes({isDownload:!e.attributes.isDownload})})):"")),"fancy"===e.attributes.fontStyle?(0,t.createElement)("div",{className:`purdue-blocks-editor-button purdue-blocks__button purdue-blocks__button--fancy\n ${"black"===e.attributes.fancyColor?" purdue-blocks__button--fancy-black":""}\n ${"white"===e.attributes.fancyColor?" purdue-blocks__button--fancy-white":""}\n ${"full"===e.attributes.width?" purdue-blocks__button--full":""}\n ${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}\n ${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}\n ${"full"===e.attributes.height?" purdue-blocks__button--height":""}\n `},(0,t.createElement)(ps,{tagName:"span",value:e.attributes.buttonText,className:"purdue-blocks__button__text",onChange:t=>{e.setAttributes({buttonText:t})},placeholder:"Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)("span",{className:"purdue-blocks__button__icon"},(0,t.createElement)("i",{class:"fas fa-angle-right"}))):(0,t.createElement)("div",{className:`purdue-blocks-editor-button purdue-blocks__button\n ${"goldLignt"===e.attributes.backgroundColor?" purdue-blocks__button--gold-light":""}\n ${"goldDark"===e.attributes.backgroundColor?" purdue-blocks__button--gold-dark":""}\n ${"opaque"===e.attributes.backgroundColor?" purdue-blocks__button--opaque":""}\n ${"fill"===e.attributes.buttonStyle?"":" purdue-blocks__button--outline"}\n ${"full"===e.attributes.width?" purdue-blocks__button--full":""}\n ${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}\n ${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}\n ${"full"===e.attributes.height?" purdue-blocks__button--height":""}\n `},(0,t.createElement)("span",{class:"shrink-padding"}),(0,t.createElement)(ps,{tagName:"span",value:e.attributes.buttonText,className:"purdue-blocks__button__text",onChange:t=>{e.setAttributes({buttonText:t})},placeholder:"Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)("span",{class:"shrink-padding"}))],save:e=>{const a=gs.save();return e.attributes.hasLink&&e.attributes.buttonURL?"fancy"===e.attributes.fontStyle?(0,t.createElement)("a",x({},a,{className:`purdue-blocks__button purdue-blocks__button--fancy\n ${"black"===e.attributes.fancyColor?" purdue-blocks__button--fancy-black":""}\n ${"white"===e.attributes.fancyColor?" purdue-blocks__button--fancy-white":""}\n ${"full"===e.attributes.width?" purdue-blocks__button--full":""}\n ${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}\n ${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}\n ${"full"===e.attributes.height?" purdue-blocks__button--height":""}\n `,href:e.attributes.buttonURL,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"}),(0,t.createElement)(ps.Content,{className:"purdue-blocks__button__text",tagName:"span",value:e.attributes.buttonText}),(0,t.createElement)("span",{className:"purdue-blocks__button__icon"},(0,t.createElement)("i",{class:"fas fa-angle-right"}))):(0,t.createElement)("a",x({},a,{role:"link",className:`purdue-blocks__button${"full"===e.attributes.height?" purdue-blocks__button--height":""}${"goldLignt"===e.attributes.backgroundColor?" purdue-blocks__button--gold-light":""}${"goldDark"===e.attributes.backgroundColor?" purdue-blocks__button--gold-dark":""}${"opaque"===e.attributes.backgroundColor?" purdue-blocks__button--opaque":""}${"fill"===e.attributes.buttonStyle?"":" purdue-blocks__button--outline"}${"full"===e.attributes.width?" purdue-blocks__button--full":""}${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}`,href:e.attributes.buttonURL,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"}),(0,t.createElement)("span",{class:"shrink-padding"}),(0,t.createElement)(ps.Content,{className:"purdue-blocks__button__text",tagName:"span",value:e.attributes.buttonText}),(0,t.createElement)("span",{class:"shrink-padding"})):(0,t.createElement)("div",x({role:"button",className:`purdue-blocks__button${"full"===e.attributes.height?" purdue-blocks__button--height":""}${"goldLignt"===e.attributes.backgroundColor?" purdue-blocks__button--gold-light":""}${"goldDark"===e.attributes.backgroundColor?" purdue-blocks__button--gold-dark":""}${"opaque"===e.attributes.backgroundColor?" purdue-blocks__button--opaque":""}${"fill"===e.attributes.buttonStyle?"":" purdue-blocks__button--outline"}${"full"===e.attributes.width?" purdue-blocks__button--full":""}${"fullMobile"===e.attributes.width?" purdue-blocks__button--full-mobile":""}${"narrow"===e.attributes.fontStyle?" purdue-blocks__button--narrow":""}`},a),(0,t.createElement)("span",{class:"shrink-padding"}),(0,t.createElement)(ps.Content,{className:"purdue-blocks__button__text",tagName:"span",value:e.attributes.buttonText}),(0,t.createElement)("span",{class:"shrink-padding"}))}});const{createHigherOrderComponent:vs}=wp.compose,Es=vs((e=>a=>{let l;return"purdue-blocks/purdue-button"===a.block.name&&(l=["fullMobile"===a.attributes.width?" purdue-button-block-editor-width--full-mobile":"","auto"===a.attributes.width?" purdue-button-block-editor-width--auto":""].join("")),(0,t.createElement)(e,x({},a,{className:l}))}),"modifyBlockListBlockButton");wp.hooks.addFilter("editor.BlockListBlock","purdue-blocks/purdue-button-modify-element",Es);const{__:fs}=wp.i18n,{registerBlockType:ks}=wp.blocks,{PanelBody:ys,PanelRow:ws,RadioControl:_s,SelectControl:xs,Button:Cs,CheckboxControl:Ns}=wp.components,{InnerBlocks:Ts,InspectorControls:As,MediaUploadCheck:Ls,MediaUpload:Ss,RichText:Bs,useBlockProps:Hs}=wp.blockEditor,{select:Us}=wp.data;ks("purdue-blocks/columns-row",{title:fs("Row of Columns"),icon:(0,t.createElement)("svg",{id:"ef9c2100-31be-4639-82c5-0ef6f30faf8a","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 71.42857"},(0,t.createElement)("g",{id:"e07d924f-208c-4ad5-884f-434897ed4326","data-name":"Grip-horizontal",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M28.57143,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H7.14286A7.14374,7.14374,0,0,1,0,29.46429V15.17857A7.14375,7.14375,0,0,1,7.14286,8.03571H21.42857A7.14375,7.14375,0,0,1,28.57143,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H7.14286A7.14375,7.14375,0,0,1,0,72.32143V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H21.42857A7.14374,7.14374,0,0,1,28.57143,58.03571ZM64.28571,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14285,7.14285H42.85714a7.14374,7.14374,0,0,1-7.14285-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14285-7.14286H57.14286A7.14375,7.14375,0,0,1,64.28571,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14285,7.14286H42.85714a7.14375,7.14375,0,0,1-7.14285-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14285-7.14285H57.14286A7.14374,7.14374,0,0,1,64.28571,58.03571ZM100,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H78.57143a7.14374,7.14374,0,0,1-7.14286-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14286-7.14286H92.85714A7.14375,7.14375,0,0,1,100,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H78.57143a7.14375,7.14375,0,0,1-7.14286-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H92.85714A7.14374,7.14374,0,0,1,100,58.03571Z",transform:"translate(0 -8.03571)"})))),category:"purdue-blocks",keywords:[],attributes:{sectionPadding:{type:"string",default:"small"},bgColor:{type:"string",default:""},title:{type:"string",default:""},titleLevel:{type:"string",default:"p"},headerColor:{type:"string",default:"black"},subText:{type:"string",default:""},subTextColor:{type:"string",default:"black"},titleAlign:{type:"string",default:"left"},subTextAlign:{type:"string",default:"left"},numColumns:{type:"number",default:1},dividers:{type:"boolean",default:!1},centerColumns:{type:"boolean",default:!1},addBackground:{type:"boolean",default:!1},backgroundImageType:{type:"string",default:"fabric"},backgroundImageUrl:{type:"string",default:file_data.fabric_url},backgroundImageAlt:{type:"string",default:""},backgroundOverlay:{type:"string",default:"has-overlay-black"},rowType:{type:"string",default:"regular"},addSpace:{type:"boolean",default:!0},addSpaceMobile:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:fs("Add a row of columns to the page."),edit:e=>{if(1===e.attributes.numColumns){const t=e.clientId,a=Us("core/editor").getBlocksByClientId(t)[0].innerBlocks[0]||null;a?a.innerBlocks.length<1&&Is(e,1,1):Is(e,1,1)}return"fabric"===e.attributes.backgroundImageType?(e.setAttributes({backgroundImageUrl:file_data.fabric_url}),e.setAttributes({backgroundImageAlt:""})):"concrete"===e.attributes.backgroundImageType&&(e.setAttributes({backgroundImageUrl:file_data.concrete_url}),e.setAttributes({backgroundImageAlt:""})),[(0,t.createElement)(As,null,(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(_s,{label:"Add a row",selected:e.attributes.rowType,options:[{value:"regular",label:"Regular Row with content"},{value:"empty",label:"Empty Row"},{value:"emptyLine",label:"Empty Row With A Guide Line"}],onChange:t=>{e.setAttributes({rowType:t})}})),"regular"===e.attributes.rowType?(0,t.createElement)(ws,null,(0,t.createElement)(_s,{label:"Padding Size",help:"Select the amount of spacing at the top and bottom of the section.",selected:e.attributes.sectionPadding,options:[{label:"None",value:"none"},{label:"Small",value:"small"},{label:"Medium",value:"is-medium"},{label:"Large",value:"is-large"}],onChange:t=>{e.setAttributes({sectionPadding:t})}})):"",(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Add Background Image",checked:e.attributes.addBackground,onChange:t=>{e.setAttributes({addBackground:t}),e.setAttributes({bgColor:""})}})),e.attributes.addBackground?(0,t.createElement)(ws,null,(0,t.createElement)(_s,{label:"Select Background Image",selected:e.attributes.backgroundImageType,options:[{value:"fabric",label:"Fabric"},{value:"concrete",label:"Concrete"},{value:"own",label:"Choose Your Own Image"}],onChange:t=>{e.setAttributes({backgroundImageType:t})}})):"",e.attributes.addBackground&&"own"===e.attributes.backgroundImageType?(0,t.createElement)(ws,null,(0,t.createElement)(Ls,null,(0,t.createElement)(Ss,{onSelect:t=>{e.setAttributes({backgroundImageUrl:t.url,backgroundImageAlt:""!==e.attributes.backgroundImageAlt?e.attributes.backgroundImageAlt:t.alt})},render:a=>{let{open:l}=a;return""!==e.attributes.backgroundImageUrl?(0,t.createElement)("div",{className:"purdue-blocks-editor-news__preview"},(0,t.createElement)(Cs,{className:"remove-image-button has-margin-left",onClick:l},"Select a New Image"),(0,t.createElement)("p",{className:"has-margin-bottom"},"For best results, use an image with no people or text.")):(0,t.createElement)("div",{className:"purdue-blocks-editor-news__container"},(0,t.createElement)(Cs,{className:"remove-image-button has-margin-left",onClick:l},"Open Media Library"),(0,t.createElement)("p",{className:"has-margin-bottom"},(0,t.createElement)("i",null,"For best results, use an image with no people or text.")))}}))):"",e.attributes.addBackground&&"concrete"!==e.attributes.backgroundImageType?(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Image Overlay Color",value:e.attributes.backgroundOverlay,options:[{value:"",label:"None"},{value:"has-overlay-black",label:"Black"},{value:"has-overlay-white",label:"White"},{value:"has-overlay-steel",label:"Steel Gray"},{value:"has-overlay-gold",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({backgroundOverlay:t})}})):"",e.attributes.addBackground?"":(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Background Color",value:e.attributes.bgColor,options:[{value:"",label:"None"},{value:"has-background-black",label:"Black"},{value:"has-background-light-gray",label:"Lightest Digital Gray"},{value:"has-background-grey-lighter",label:"Medium Digital Gray"},{value:"has-background-black-ter",label:"Steel(Dark) Gray"},{value:"has-background-boiler-gold",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({bgColor:t})}}))),"regular"===e.attributes.rowType?(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Number of Columns",value:e.attributes.numColumns,options:[{value:1,label:"One Column"},{value:2,label:"Two Columns"},{value:3,label:"Three Columns"},{value:4,label:"Four Columns"}],onChange:t=>{let a=parseInt(t);Is(e,e.attributes.numColumns,a),e.setAttributes({numColumns:a})}})),(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Include dividers between columns?",checked:e.attributes.dividers,onChange:t=>e.setAttributes({dividers:t})})),(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Center the columns?",checked:e.attributes.centerColumns,onChange:t=>e.setAttributes({centerColumns:t})}))):"","regular"===e.attributes.rowType?(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Heading level of the title",value:e.attributes.titleLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Heading Color",value:e.attributes.headerColor,options:[{label:"Black",value:"black"},{label:"Steel",value:"steel"},{label:"Digital Gold",value:"gold"},{label:"Aged Gold",value:"aged"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({headerColor:t})}})),(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Subtext Color",value:e.attributes.subTextColor,options:[{label:"Black",value:"black"},{label:"Steel",value:"steel"},{label:"Digital Gold",value:"gold"},{label:"Aged Gold",value:"aged"},{label:"White",value:"white"}],onChange:t=>{e.setAttributes({subTextColor:t})}}))):"","regular"===e.attributes.rowType?(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Heading alignment",value:e.attributes.titleAlign,options:[{label:"Left Aligned",value:"left"},{label:"Centered",value:"center"}],onChange:t=>{e.setAttributes({titleAlign:t})}})),(0,t.createElement)(ws,null,(0,t.createElement)(xs,{label:"Sub text alignment",value:e.attributes.subTextAlign,options:[{label:"Left Aligned",value:"left"},{label:"Centered",value:"center"}],onChange:t=>{e.setAttributes({subTextAlign:t})}})),(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Add space below subtext?",checked:e.attributes.addSpace,onChange:t=>e.setAttributes({addSpace:t})}))):"",(0,t.createElement)(ys,null,(0,t.createElement)(ws,null,(0,t.createElement)(Ns,{label:"Add space at the bottom on mobile?",checked:e.attributes.addSpaceMobile,onChange:t=>e.setAttributes({addSpaceMobile:t})})))),(0,t.createElement)("div",{className:`pu-columns-row pu-columns-row-editor section\n ${e.attributes.bgColor?` ${e.attributes.bgColor}`:""}\n ${"none"===e.attributes.sectionPadding?"no-padding":""}\n ${"small"!==e.attributes.sectionPadding&&"none"!==e.attributes.sectionPadding&&"regular"===e.attributes.rowType?` ${e.attributes.sectionPadding}`:""}\n ${e.attributes.addBackground&&"concrete"!==e.attributes.backgroundImageType?` ${e.attributes.backgroundOverlay}`:""}\n ${e.attributes.addBackground&&"concrete"===e.attributes.backgroundImageType?" has-overlay-concrete":""}\n ${"empty"===e.attributes.rowType?" pu-columns-row--empty":""}\n ${"emptyLine"===e.attributes.rowType?" pu-columns-row--empty-line":""}\n ${e.attributes.addSpaceMobile?" pu-columns-row--space-mobile":""}\n `,style:{backgroundImage:`url(${e.attributes.addBackground?e.attributes.backgroundImageUrl:""})`},"aria-label":e.attributes.backgroundImageAlt},"regular"===e.attributes.rowType?(0,t.createElement)("div",{className:"content"+("none"!==e.attributes.sectionPadding?" container":"")},(0,t.createElement)("div",{className:"bulma-blocks-editor-columns"},(0,t.createElement)("div",{className:"title"},(0,t.createElement)(Bs,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:`title align--${e.attributes.titleAlign} title--${e.attributes.headerColor}`,onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Heading",keepPlaceholderOnFocus:!0,allowedFormats:[]})),(0,t.createElement)("div",{className:"content"+(e.attributes.addSpace?"":" content--no-margin")},(0,t.createElement)(Bs,{tagName:"p",value:e.attributes.subText,className:`align--${e.attributes.subTextAlign} content subtext--${e.attributes.subTextColor}`,onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Sub-Text",allowedFormats:[]})),(0,t.createElement)(Ts,{templateLock:"all"}))):"")]},save:e=>{const a=`url(${e.attributes.backgroundImageUrl})`,l=Hs.save();return(0,t.createElement)("div",x({},l,{className:`pu-columns-row section\n ${e.attributes.bgColor?` ${e.attributes.bgColor}`:""}\n ${"none"===e.attributes.sectionPadding?"no-padding":""}\n ${"small"!==e.attributes.sectionPadding&&"none"!==e.attributes.sectionPadding&&"regular"===e.attributes.rowType?` ${e.attributes.sectionPadding}`:""}\n ${e.attributes.addBackground&&"concrete"!==e.attributes.backgroundImageType?` ${e.attributes.backgroundOverlay}`:""}\n ${e.attributes.addBackground&&"concrete"===e.attributes.backgroundImageType?" has-overlay-concrete":""}\n ${"empty"===e.attributes.rowType?" pu-columns-row--empty":""}\n ${"emptyLine"===e.attributes.rowType?" pu-columns-row--empty-line":""}\n ${e.attributes.addSpaceMobile?" pu-columns-row--space-mobile":""}\n `,style:{backgroundImage:`${e.attributes.addBackground?a:"none"}`},"aria-label":e.attributes.backgroundImageAlt}),"regular"===e.attributes.rowType?(0,t.createElement)("div",{className:"content"+("none"!==e.attributes.sectionPadding?" container":"")},""!==e.attributes.title&&e.attributes.title||""!==e.attributes.subText&&e.attributes.subText?(0,t.createElement)("div",{className:"content"+(e.attributes.addSpace?"":" content--no-margin")},(0,t.createElement)("div",{className:"columns is-centered"},(0,t.createElement)("div",{className:"column is-8"},""!==e.attributes.title&&void 0!==e.attributes.title?(0,t.createElement)(Bs.Content,{className:`title align--${e.attributes.titleAlign} title--${e.attributes.headerColor}`,tagName:e.attributes.titleLevel,value:e.attributes.title}):"",""!==e.attributes.subText&&void 0!==e.attributes.subText?(0,t.createElement)(Bs.Content,{className:`align--${e.attributes.subTextAlign} subtext--${e.attributes.subTextColor}`,tagName:"p",value:e.attributes.subText}):""))):"",(0,t.createElement)("div",{className:`columns is-multiline ${e.attributes.dividers?"has-dividers":""}${e.attributes.centerColumns?" is-centered":""}`},(0,t.createElement)(Ts.Content,null))):"")}});const Is=(e,t,a)=>{let l=wp.data.select("core/block-editor").getBlock(e.clientId).innerBlocks;const r=a>t,n=0===a;if(1===t&&t===a)l=[(0,na.createBlock)("bulma-blocks/column")],wp.data.dispatch("core/block-editor").replaceInnerBlocks(e.clientId,l,!1);else if(r&&!n){const r=a-t;for(let e=0;e{let a,l;if(0===e.attributes.quoteGroup.length&&e.setAttributes({quoteGroup:[{quoteContent:"",name:"",nameTitle:"",hasLink:!1,ctaText:"",ctaLink:"",external:!1}]}),e.attributes.quoteGroup.length>0){let r=e.attributes.quoteGroup.length-1;a=e.attributes.quoteGroup.map(((a,l)=>(0,t.createElement)(qs,{key:l,className:"quote-block-details",title:`Quote ${l+1} Details`,initialOpen:!0},(0,t.createElement)(zs,null,(0,t.createElement)(Qs,{label:"Add a CTA link to this quote?",checked:a.hasLink,onChange:()=>(t=>{let a=[...e.attributes.quoteGroup];a[t].hasLink=!a[t].hasLink,e.setAttributes({quoteGroup:a})})(l)})),a.hasLink?(0,t.createElement)(zs,null,(0,t.createElement)(Ys,{label:"Call to action text",value:a.ctaText,onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].ctaText=t,e.setAttributes({quoteGroup:l})})(t,l)})):"",a.hasLink?(0,t.createElement)(zs,null,(0,t.createElement)(Ys,{label:"Link address",value:a.ctaLink,onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].ctaLink=t,e.setAttributes({quoteGroup:l})})(t,l)})):"",a.hasLink?(0,t.createElement)(zs,null,(0,t.createElement)(Qs,{label:"Open link in new tab?",checked:a.external,onChange:()=>(t=>{let a=[...e.attributes.quoteGroup];a[t].external=!a[t].external,e.setAttributes({quoteGroup:a})})(l)})):"",e.attributes.quoteGroup.length>1?(0,t.createElement)("hr",null):"",e.attributes.quoteGroup.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this quote:")),l(t=>{let a=[...e.attributes.quoteGroup],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({quoteGroup:a})})(l),icon:Ps}):"",l>0?(0,t.createElement)(Ds,{className:"remove-image-button move-quote",onClick:()=>(t=>{let a=[...e.attributes.quoteGroup],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({quoteGroup:a})})(l),icon:Ms}):""):"",e.attributes.quoteGroup.length>1?(0,t.createElement)("hr",null):"",e.attributes.quoteGroup.length>1?(0,t.createElement)(zs,null,(0,t.createElement)(Ds,{className:"remove-image-button remove-quote",onClick:()=>(t=>{let a=[...e.attributes.quoteGroup];a.splice(t,1),e.setAttributes({quoteGroup:a})})(l)},"Remove this Quote")):""))),l=e.attributes.quoteGroup.map(((a,l)=>(0,t.createElement)("div",{key:l,className:"purdue-block-editor-quote"},(0,t.createElement)("div",{className:"purdue-block-quote__content"},(0,t.createElement)("textarea",{value:""!==a.quoteContent?a.quoteContent:"",className:"textarea",placeholder:"Add quote content here...",onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].quoteContent=t.target.value,e.setAttributes({quoteGroup:l})})(t,l)})),(0,t.createElement)("div",{className:"purdue-block-quote__name"},(0,t.createElement)("input",{value:a.name,className:"input",type:"text",placeholder:"Quote Name...",onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].name=t.target.value,e.setAttributes({quoteGroup:l})})(t,l)})),(0,t.createElement)("div",null,(0,t.createElement)(lo,{tagname:"p",value:a.nameTitle,className:"purdue-block-quote__title",onChange:t=>((t,a)=>{let l=[...e.attributes.quoteGroup];l[a].nameTitle=t,e.setAttributes({quoteGroup:l})})(t,l),placeholder:"Quote Name Title...",keepPlaceholderOnFocus:!0})))))}return[(0,t.createElement)(Js,{key:"1"},(0,t.createElement)(qs,null,(0,t.createElement)(zs,null,(0,t.createElement)(Xs,{label:"Background Color",help:"Choose the background color of the quote.",selected:e.attributes.background,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({background:t})}}))),a,(0,t.createElement)(qs,null,e.attributes.quoteGroup.length<5?(0,t.createElement)(Ds,{className:"remove-image-button add-quote",onClick:(()=>{let t=[...e.attributes.quoteGroup];t.push({quoteContent:"",name:"",nameTitle:"",hasLink:!1,ctaText:"",ctaLink:"",external:!1}),e.setAttributes({quoteGroup:t})}).bind(void 0)},$s("Add Another Quote")):"")),(0,t.createElement)("div",{key:"2",className:`purdue-block-quote-group-editor purdue-block-quote-group section${"black"===e.attributes.background?" background-black":""}${"gray"===e.attributes.background?" background-black-ter":""}`},l)]},save:e=>{const a=ao.save(),l=e.attributes.quoteGroup.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"purdue-block-quote"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns is-centered"},(0,t.createElement)("div",{className:"column is-two-thirds-desktop is-full-tablet is-full-mobile"},(0,t.createElement)("p",{className:"purdue-block-quote__content"},e.quoteContent),(0,t.createElement)("div",{className:"purdue-block-quote__bottom"},(0,t.createElement)("div",{className:"purdue-block-quote__info"},""!==e.name?(0,t.createElement)("p",{className:"purdue-block-quote__name"},e.name):"",""!==e.nameTitle?(0,t.createElement)(lo.Content,{className:"purdue-block-quote__title",tagName:"p",value:e.nameTitle}):""),""!==e.ctaLink?(0,t.createElement)("a",{className:"purdue-block-quote__cta",href:e.ctaLink,target:e.external?"_blank":"_self",rel:"noopener noreferrer"},e.ctaText):""))))))),r=e.attributes.quoteGroup.map(((e,a)=>{let l=a+1;return(0,t.createElement)("span",{key:a,className:"purdue-block-quote-group__dot"+(0===a?" active":""),"data-target":a,"aria-label":`quote ${l}`})}));return(0,t.createElement)("div",x({},a,{className:`purdue-block-quote-group ${"black"===e.attributes.background?" has-background-black":""}${"gray"===e.attributes.background?" has-background-black-ter":""}`}),(0,t.createElement)("div",{className:"purdue-block-quote-wrapper"},l),e.attributes.quoteGroup.length>1?(0,t.createElement)("div",{className:"purdue-block-quote-group__arrow-wrapper"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"purdue-block-quote-group__arrow purdue-block-quote-group__arrow-left","aria-label":"previous"},(0,t.createElement)("i",{class:"fas fa-chevron-left"})),(0,t.createElement)("div",{className:"purdue-block-quote-group__arrow purdue-block-quote-group__arrow-right","aria-label":"next"},(0,t.createElement)("i",{class:"fas fa-chevron-right"})))):"",e.attributes.quoteGroup.length>1?(0,t.createElement)("div",{className:"purdue-block-quote-group__dots"},r):"")}});const{__:so}=wp.i18n,{registerBlockType:oo}=wp.blocks,{PanelBody:io,PanelRow:co,RadioControl:uo,SelectControl:mo,CheckboxControl:bo,TextareaControl:po,TextControl:ho,Button:go}=wp.components,{InspectorControls:vo,RichText:Eo,useBlockProps:fo}=wp.blockEditor;oo("purdue-blocks/alert-banner",{title:so("Alert Banner"),icon:(0,t.createElement)("svg",{id:"a8ae3902-6091-40f1-ba15-728f5bf1f742","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100.0008 88.88934"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"e2c1153f-a3b0-433f-9633-3fec02e357e5","data-name":"Exclamation-triangle",class:"a7b4a3b0-640a-46e0-a18c-acb6750103c6"},(0,t.createElement)("g",{class:"a7b4a3b0-640a-46e0-a18c-acb6750103c6"},(0,t.createElement)("path",{class:"cls-2",d:"M91.65678,94.44467H8.34279A8.33857,8.33857,0,0,1,1.124,81.94631L42.78228,9.72008a8.33709,8.33709,0,0,1,14.43588,0L98.87472,81.94631A8.33821,8.33821,0,0,1,91.65678,94.44467ZM42.01405,75.00008a7.98617,7.98617,0,1,0,7.98617-7.98617A7.98564,7.98564,0,0,0,42.01405,75.00008Zm1.69185-13.0817a2.083,2.083,0,0,0,2.07988,1.97051h8.42888a2.083,2.083,0,0,0,2.07988-1.97051l1.2882-23.61128A2.08352,2.08352,0,0,0,55.502,36.1109H44.49844a2.08352,2.08352,0,0,0-2.08074,2.1962Z",transform:"translate(0.0004 -5.55533)"})))),category:"purdue-blocks",keywords:[],attributes:{content:{type:"string",default:""},link:{type:"string",default:""},linkText:{type:"string",default:""},type:{type:"string",default:"notice"},noticeColor:{type:"string",default:"gray"},alertColor:{type:"string",default:"green"},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:so("Create a notice or alert banner with a link."),edit:e=>[(0,t.createElement)(vo,null,(0,t.createElement)(io,null,(0,t.createElement)(co,{className:"blocks-editor-alert--recommendations"},(0,t.createElement)("h2",null,"Text Recommendations"),(0,t.createElement)("p",null,"The recommended maximum character count for the alert content is 90 characters."))),(0,t.createElement)(io,null,(0,t.createElement)(co,null,(0,t.createElement)(uo,{label:"Banner type",selected:e.attributes.type,options:[{label:"Notice",value:"notice"},{label:"Alert",value:"alert"}],onChange:t=>{e.setAttributes({type:t})}}))),(0,t.createElement)(io,null,"notice"===e.attributes.type?(0,t.createElement)(co,null,(0,t.createElement)(mo,{label:"Notice Color",help:"Select the color for your notice banner.",value:e.attributes.noticeColor,options:[{value:"gray",label:"Default (Gray)"},{value:"green",label:"Success (Green)"},{value:"blue",label:"Info (Blue)"},{value:"gold",label:"Message (Gold)"},{value:"orange",label:"Error (Orange)"}],onChange:t=>{e.setAttributes({noticeColor:t})}})):(0,t.createElement)(co,null,(0,t.createElement)(mo,{label:"Alert Color",help:"Select the color for your alert banner.",value:e.attributes.alertColor,options:[{value:"green",label:"All Clear (Green)"},{value:"blue",label:"Minor Alert (Blue)"},{value:"gold",label:"Moderate Alert (Gold)"},{value:"orange",label:"Severe Alert (Orange)"},{value:"red",label:"Extreme Alert (Red)"}],onChange:t=>{e.setAttributes({alertColor:t})}})))),(0,t.createElement)("div",{className:`blocks-editor-alert blocks-editor-alert--${e.attributes.type} ${e.attributes.type}--${"notice"===e.attributes.type?e.attributes.noticeColor:e.attributes.alertColor}`},(0,t.createElement)("div",{className:"content"},(0,t.createElement)(Eo,{tagName:"p",value:e.attributes.content,className:"editor-alert-content",onChange:t=>{e.setAttributes({content:t})},placeholder:"Alert content...",allowedFormats:[]})),(0,t.createElement)("div",{className:"alert-link"},(0,t.createElement)(Eo,{tagName:"div",value:e.attributes.linkText,className:"editor-link-content",onChange:t=>{e.setAttributes({linkText:t})},placeholder:"Alert Link (optional)"})))],save:e=>{const a=fo.save();return(0,t.createElement)("div",x({},a,{className:`alert-banner alert-banner--${e.attributes.type} ${e.attributes.type}--${"notice"===e.attributes.type?e.attributes.noticeColor:e.attributes.alertColor}`}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)(Eo.Content,{className:"alert-banner--content",tagName:"p",value:e.attributes.content}),""!==e.attributes.linkText&&void 0!==e.attributes.linkText?(0,t.createElement)(Eo.Content,{className:"alert-banner--link link-effect",tagName:"div",value:e.attributes.linkText}):""))}});const{__:ko}=wp.i18n,{registerBlockType:yo}=wp.blocks,{PanelBody:wo,PanelRow:_o,CheckboxControl:xo,TextareaControl:Co,TextControl:No,RadioControl:To,SelectControl:Ao}=wp.components,{RichText:Lo,InspectorControls:So,MediaUploadCheck:Bo,MediaUpload:Ho,InnerBlocks:Uo,useBlockProps:Io}=wp.blockEditor;yo("purdue-blocks/mini-hero",{title:ko("Mini Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",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)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".title"},subText:{type:"string",source:"html",selector:"p.content"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},includeLink:{type:"boolean",default:!1},linkExternal:{type:"boolean",default:!1},linkUrl:{type:"string",default:""},linkText:{type:"string",default:""},background:{type:"string",default:"dark"}},supports:{className:!1,anchor:!0},description:ko("Create a mini Hero row with a 7:1 background image."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(So,null,(0,t.createElement)(wo,null,(0,t.createElement)(_o,null,(0,t.createElement)(Ao,{label:"Background Color",help:"The color that is overlaid on the background image",value:e.attributes.background,options:[{label:"Dark",value:"dark"},{label:"Light",value:"light"}],onChange:t=>{e.setAttributes({background:t})}})),(0,t.createElement)(_o,null,(0,t.createElement)(Co,{label:"Hero Background Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})}))),(0,t.createElement)(wo,null,(0,t.createElement)(_o,null,(0,t.createElement)(xo,{label:"Include a Link?",checked:e.attributes.includeLink,onChange:()=>e.setAttributes({includeLink:!e.attributes.includeLink})})),e.attributes.includeLink?(0,t.createElement)(_o,null,(0,t.createElement)(No,{label:"Call to action text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",e.attributes.includeLink?(0,t.createElement)(_o,null,(0,t.createElement)(No,{label:"Link address",value:e.attributes.linkUrl,onChange:t=>e.setAttributes({linkUrl:t})})):"",e.attributes.includeLink?(0,t.createElement)(_o,null,(0,t.createElement)(xo,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({linkExternal:!e.attributes.linkExternal})})):"")),(0,t.createElement)("div",{className:"mini-hero mini-hero-editor"+("light"===e.attributes.background?" mini-hero-light":"")},(0,t.createElement)(Bo,null,(0,t.createElement)(Ho,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{class:"remove-button",onClick:a},"Remove image"):""),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{class:"columns is-centered"},(0,t.createElement)("div",{class:"column is-two-thirds-desktop is-full-tablet is-full-mobile"},(0,t.createElement)("div",{className:"mini-hero--content"},(0,t.createElement)(Lo,{tagname:"h1",value:e.attributes.title,className:"title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)(Lo,{tagName:"p",value:e.attributes.subText,className:"content",onChange:t=>{e.setAttributes({subText:t})},placeholder:"Add Text"}))))))}})))]},save:e=>{const a=Io.save();return(0,t.createElement)("div",x({},a,{className:"mini-hero"+("light"===e.attributes.background?" mini-hero-light":"")}),(0,t.createElement)("div",{className:"image",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{class:"columns is-centered"},(0,t.createElement)("div",{class:"column is-two-thirds-desktop is-full-tablet is-full-mobile"},(0,t.createElement)("div",{className:"mini-hero--content"},(0,t.createElement)(Lo.Content,{className:"title",tagName:"h1",value:e.attributes.title}),""!==e.attributes.subText&&void 0!==e.attributes.subText?(0,t.createElement)(Lo.Content,{className:"content",tagName:"p",value:e.attributes.subText}):"",e.attributes.includeLink&&""!==e.attributes.linkText&&""!==e.attributes.linkUrl?(0,t.createElement)("a",{href:e.attributes.linkUrl,className:"link"+("light"===e.attributes.background?" has-bg-light":" has-bg-dark"),target:e.attributes.linkExternal?"_blank":"_self",rel:"noopener"},e.attributes.linkText):""))))))}});const{__:Po}=wp.i18n,{registerBlockType:Mo}=wp.blocks,{PanelBody:$o,PanelRow:Ro,RadioControl:Oo,SelectControl:Do,CheckboxControl:Vo,TextControl:Go,TextareaControl:Fo}=wp.components,{InspectorControls:Zo,MediaUploadCheck:qo,MediaUpload:zo,RichText:jo,useBlockProps:Wo}=wp.blockEditor;Mo("purdue-blocks/profile-gallery",{title:Po("Profile Gallery"),icon:(0,t.createElement)("svg",{id:"ef9c2100-31be-4639-82c5-0ef6f30faf8a","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 71.42857"},(0,t.createElement)("g",{id:"e07d924f-208c-4ad5-884f-434897ed4326","data-name":"Grip-horizontal",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M28.57143,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H7.14286A7.14374,7.14374,0,0,1,0,29.46429V15.17857A7.14375,7.14375,0,0,1,7.14286,8.03571H21.42857A7.14375,7.14375,0,0,1,28.57143,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H7.14286A7.14375,7.14375,0,0,1,0,72.32143V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H21.42857A7.14374,7.14374,0,0,1,28.57143,58.03571ZM64.28571,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14285,7.14285H42.85714a7.14374,7.14374,0,0,1-7.14285-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14285-7.14286H57.14286A7.14375,7.14375,0,0,1,64.28571,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14285,7.14286H42.85714a7.14375,7.14375,0,0,1-7.14285-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14285-7.14285H57.14286A7.14374,7.14374,0,0,1,64.28571,58.03571ZM100,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H78.57143a7.14374,7.14374,0,0,1-7.14286-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14286-7.14286H92.85714A7.14375,7.14375,0,0,1,100,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H78.57143a7.14375,7.14375,0,0,1-7.14286-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H92.85714A7.14374,7.14374,0,0,1,100,58.03571Z",transform:"translate(0 -8.03571)"})))),category:"purdue-blocks",keywords:[],attributes:{profiles:{type:"array",default:[{name:"add",title:"",photoUrl:"",photoAlt:"",bio:"",bioEditorOpen:!1}]},numColumns:{type:"number",default:4},header:{type:"string",default:""},headerLocation:{type:"string",default:"center"}},supports:{className:!1,anchor:!0},description:Po("A gallery view of 1-4 columns of profiles with a modal overlay to view the full bio."),edit:e=>{const a=e.attributes.profiles,l=parseInt(e.attributes.numColumns);return[(0,t.createElement)(Zo,null,(0,t.createElement)($o,null,(0,t.createElement)(Ro,null,(0,t.createElement)(Do,{label:"Number of Columns",value:e.attributes.numColumns,options:[{value:1,label:"One Column"},{value:2,label:"Two Columns"},{value:3,label:"Three Columns"},{value:4,label:"Four Columns"}],onChange:t=>{e.setAttributes({numColumns:t})}})),(0,t.createElement)(Ro,null,(0,t.createElement)(Go,{label:"Add a header to this region",value:e.attributes.header,onChange:t=>e.setAttributes({header:t})})),e.attributes.header?(0,t.createElement)(Ro,null,(0,t.createElement)(Oo,{label:"Choose how to align the header.",selected:e.attributes.headerLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({headerLocation:t})}})):"")),(0,t.createElement)("div",{className:"editor-profile-gallery"},e.attributes.header?(0,t.createElement)("h2",{className:`align-${e.attributes.headerLocation}`},e.attributes.header):"",(0,t.createElement)("div",{className:`columns ${2===l?"editor-profile-gallery--md":1===l?"editor-profile-gallery--sm":""} is-multiline ${e.attributes.bioEditorOpen?"bio-editor-open":""}`},a.map(((a,r,n)=>{const s=4===l?"is-3":3===l?"is-4":2===l?"is-6":"is-12";return"add"===a.name?(0,t.createElement)("div",{className:`editor-profile-add column ${s}`},(0,t.createElement)("button",{onClick:t=>{const a=[...n];a.push({name:"",title:"",photoUrl:"",photoAlt:"",bio:""});const l=a.length;let r=a[l-2];a[l-2]=a[l-1],a[l-1]=r,e.setAttributes({profiles:a})},className:"editor-add-profile-button"},"Add a card")):(0,t.createElement)("div",{className:`column ${s}`},(0,t.createElement)("div",{className:"editor-profile-form"},(0,t.createElement)("div",{className:"editor-profile-order"},(0,t.createElement)("label",null,"Swap Position: "),(0,t.createElement)("select",{onChange:t=>{const a=t.target.value,l=[...n];let s=l[a];l[a]=l[r],l[r]=s,t.target.selectedIndex=r,e.setAttributes({profiles:l})}},n.map(((e,a,l)=>{if("add"!==e.name)return(0,t.createElement)("option",{selected:r===a?"selected":"",value:a},`${a+1}`)})))),(0,t.createElement)(qo,null,(0,t.createElement)(zo,{onSelect:t=>{const l=[...n];a.photoUrl=t.url,a.photoAlt=t.alt,l[r]=a,e.setAttributes({profiles:l})},render:e=>{let{open:l}=e;return(0,t.createElement)("div",{className:"image is-square "+(""===a.photoUrl?"is-empty":""),role:"img",style:{backgroundImage:`url(${a.photoUrl})`},"aria-label":a.photoAlt},(0,t.createElement)("button",{onClick:l},""!==a.photoUrl?"Select a new image":"Select an image"))}})),(0,t.createElement)("input",{className:"editor-profile-text-input",value:a.name,type:"text",placeholder:"Full Name",onChange:t=>{const l=[...n];a.name=t.target.value,l[r]=a,e.setAttributes({profiles:l})}}),(0,t.createElement)("textarea",{className:"editor-profile-text-input",value:a.title,type:"text",placeholder:"Title",onChange:t=>{const l=[...n];a.title=t.target.value,l[r]=a,e.setAttributes({profiles:l})}}),(0,t.createElement)("div",{className:"editor-profile-buttons"},(0,t.createElement)("button",{className:"editor-profile-buttons--edit",onClick:t=>{const l=[...n];a.bioEditorOpen=!a.bioEditorOpen,l[r]=a,l.forEach(((e,t)=>{r!==t&&(e.bioEditorOpen=!1)})),e.setAttributes({profiles:l})}},a.bioEditorOpen?"Close":"Edit Biography"),(0,t.createElement)("button",{className:"editor-profile-buttons--delete",onClick:t=>{const a=[...n];a.splice(r,1),e.setAttributes({profiles:a})}},"Remove card"))),a.bioEditorOpen?(0,t.createElement)("div",{className:"editor-profile-bio "+(l>3?"editor-profile-bio--wide":"")},(0,t.createElement)(jo,{tagName:"p",className:"pu-profile-gallery--bio",value:a.bio,placeholder:"Biography...",onChange:t=>{const l=[...n];a.bio=t,l[r]=a,e.setAttributes({profiles:l})}})):"")}))))]},save:e=>{const a=Wo.save(),l=e.attributes.profiles,r=parseInt(e.attributes.numColumns),n=4===r?"is-3":3===r?"is-4":2===r?"is-6":"is-12";return e.attributes.header?(0,t.createElement)("div",{className:"pu-profile-gallery"},(0,t.createElement)("h2",{className:`align-${e.attributes.headerLocation}`},e.attributes.header),(0,t.createElement)("div",x({},a,{className:"pu-profile-gallery columns is-multiline"}),l.map(((e,a,l)=>{if("add"!==e.name){const l=`${a}-${e.name}`;return(0,t.createElement)("div",{className:`column ${n} is-half-mobile`},(0,t.createElement)("div",{className:"profile-gallery-open"+(e.bio?"":" profile-no-bio"),"data-toggle":l},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${e.photoUrl})`},"aria-label":e.photoAlt}),e.bio?(0,t.createElement)("button",{className:"modal-open-button","aria-label":"More information"},(0,t.createElement)("i",{class:"fas fa-plus","aria-hidden":"true"})):""),(0,t.createElement)("p",{className:"pu-profile-gallery--name"},e.name),(0,t.createElement)("p",{className:"pu-profile-gallery--title"},e.title),e.bio?(0,t.createElement)("div",{className:"pu-profile-gallery--modal","data-modal":l},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"box"},(0,t.createElement)("div",{className:"modal--close-button","aria-label":"close"},(0,t.createElement)("i",{class:"fas fa-times","aria-hidden":"true"})),(0,t.createElement)("div",{className:"modal--img-container"},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${e.photoUrl})`},"aria-label":e.photoAlt})),(0,t.createElement)("div",{className:"modal--content-container"},(0,t.createElement)("p",{className:"pu-profile-gallery--name"},e.name),(0,t.createElement)("p",{className:"pu-profile-gallery--title"},e.title),(0,t.createElement)(jo.Content,{className:"pu-profile-gallery--bio",tagName:"p",value:e.bio}),(0,t.createElement)("button",{className:"modal--secondary-close-button"},"< BACK TO ARTICLE"))))):"")}})))):(0,t.createElement)("div",x({},a,{className:"pu-profile-gallery columns is-multiline"}),l.map(((e,a,l)=>{if("add"!==e.name){const l=`${a}-${e.name}`;return(0,t.createElement)("div",{className:`column ${n} is-half-mobile`},(0,t.createElement)("div",{className:"profile-gallery-open"+(e.bio?"":" profile-no-bio"),"data-toggle":l},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${e.photoUrl})`},"aria-label":e.photoAlt}),e.bio?(0,t.createElement)("button",{className:"modal-open-button","aria-label":"More information"},(0,t.createElement)("i",{class:"fas fa-plus","aria-hidden":"true"})):""),(0,t.createElement)("p",{className:"pu-profile-gallery--name"},e.name),(0,t.createElement)("p",{className:"pu-profile-gallery--title"},e.title),e.bio?(0,t.createElement)("div",{className:"pu-profile-gallery--modal","data-modal":l},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"box"},(0,t.createElement)("div",{className:"modal--close-button","aria-label":"close"},(0,t.createElement)("i",{class:"fas fa-times","aria-hidden":"true"})),(0,t.createElement)("div",{className:"modal--img-container"},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${e.photoUrl})`},"aria-label":e.photoAlt})),(0,t.createElement)("div",{className:"modal--content-container"},(0,t.createElement)("p",{className:"pu-profile-gallery--name"},e.name),(0,t.createElement)("p",{className:"pu-profile-gallery--title"},e.title),(0,t.createElement)(jo.Content,{className:"pu-profile-gallery--bio",tagName:"p",value:e.bio}),(0,t.createElement)("button",{className:"modal--secondary-close-button"},"< BACK TO ARTICLE"))))):"")}})))}});const{__:Yo}=wp.i18n,{registerBlockType:Xo}=wp.blocks,{PanelBody:Ko,PanelRow:Qo,RangeControl:Jo,CheckboxControl:ei,SelectControl:ti,Button:ai}=wp.components,{RichText:li,InnerBlocks:ri,InspectorControls:ni,useBlockProps:si}=wp.blockEditor;Xo("purdue-blocks/tabs",{title:Yo("Tabs"),icon:(0,t.createElement)("svg",{id:"ef9c2100-31be-4639-82c5-0ef6f30faf8a","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 71.42857"},(0,t.createElement)("g",{id:"e07d924f-208c-4ad5-884f-434897ed4326","data-name":"Grip-horizontal",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M28.57143,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H7.14286A7.14374,7.14374,0,0,1,0,29.46429V15.17857A7.14375,7.14375,0,0,1,7.14286,8.03571H21.42857A7.14375,7.14375,0,0,1,28.57143,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H7.14286A7.14375,7.14375,0,0,1,0,72.32143V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H21.42857A7.14374,7.14374,0,0,1,28.57143,58.03571ZM64.28571,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14285,7.14285H42.85714a7.14374,7.14374,0,0,1-7.14285-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14285-7.14286H57.14286A7.14375,7.14375,0,0,1,64.28571,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14285,7.14286H42.85714a7.14375,7.14375,0,0,1-7.14285-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14285-7.14285H57.14286A7.14374,7.14374,0,0,1,64.28571,58.03571ZM100,15.17857V29.46429a7.14374,7.14374,0,0,1-7.14286,7.14285H78.57143a7.14374,7.14374,0,0,1-7.14286-7.14285V15.17857a7.14375,7.14375,0,0,1,7.14286-7.14286H92.85714A7.14375,7.14375,0,0,1,100,15.17857Zm0,42.85714V72.32143a7.14375,7.14375,0,0,1-7.14286,7.14286H78.57143a7.14375,7.14375,0,0,1-7.14286-7.14286V58.03571a7.14374,7.14374,0,0,1,7.14286-7.14285H92.85714A7.14374,7.14374,0,0,1,100,58.03571Z",transform:"translate(0 -8.03571)"})))),category:"purdue-blocks",keywords:[],attributes:{numTabs:{type:"number",default:0},headers:{type:"array",default:[]},headerSize:{type:"string",default:"large"},addPadding:{type:"boolean",default:!0}},supports:{className:!1,anchor:!0},description:Yo("Add tabs."),edit:e=>(0===e.attributes.numTabs&&oi(e,1,1),[(0,t.createElement)(ni,null,(0,t.createElement)(Ko,null,(0,t.createElement)(Qo,null,(0,t.createElement)(ti,{label:"Number of Tabs",value:e.attributes.numTabs,options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"5",value:5},{label:"6",value:6}],onChange:t=>{oi(e,e.attributes.numTabs,parseInt(t))}})),(0,t.createElement)(Qo,null,(0,t.createElement)(ti,{label:"Font size of the tabs' header",value:e.attributes.headerSize,options:[{label:"Large",value:"large"},{label:"Medium",value:"medium"},{label:"Small",value:"small"}],onChange:t=>{e.setAttributes({headerSize:t})}})),(0,t.createElement)(Qo,null,(0,t.createElement)(ei,{label:"Add paddings to the panels on desktop?",checked:e.attributes.addPadding,onChange:()=>e.setAttributes({addPadding:!e.attributes.addPadding})})))),(0,t.createElement)("div",{className:"pu-blocks-editor-tabs pu-blocks-tabs"+(e.attributes.addPadding?" has-padding":"")},(0,t.createElement)("div",{className:"pu-blocks-tabs__headers"},e.attributes.headers.map(((a,l)=>(0,t.createElement)(ai,{onClick:t=>{wp.data.select("core/block-editor").getBlock(e.clientId).innerBlocks.forEach((e=>{e.attributes.aria===a.id?wp.data.dispatch("core/block-editor").updateBlockAttributes(e.clientId,{editorSelected:!0}):wp.data.dispatch("core/block-editor").updateBlockAttributes(e.clientId,{editorSelected:!1})}));let l=[...e.attributes.headers];l.forEach((e=>{a.id===e.id?e.active=!0:e.active=!1})),e.setAttributes({headers:l})},role:"tab"},(0,t.createElement)(li,{tagname:"p",value:a.text,className:`pu-blocks-tabs__header\n ${"medium"===e.attributes.headerSize?" pu-blocks-tabs__header-medium":""}\n ${"small"===e.attributes.headerSize?" pu-blocks-tabs__header-small":""}${a.active?" active":""}\n `,onChange:t=>{let a=[...e.attributes.headers];a[l].text=t,e.setAttributes({headers:a})},placeholder:"Add tab header text"}))))),(0,t.createElement)(ri,{templateLock:"all"}))]),save:e=>{const a=si.save();return(0,t.createElement)("div",x({className:"pu-blocks-tabs"+(e.attributes.addPadding?" has-padding":"")},a),(0,t.createElement)("div",{className:"pu-blocks-tabs__headers"},e.attributes.headers.length>0?e.attributes.headers.map((a=>(0,t.createElement)(li.Content,{id:`header-${a.id}`,className:`pu-blocks-tabs__header\n ${"medium"===e.attributes.headerSize?" pu-blocks-tabs__header-medium":""}\n ${"small"===e.attributes.headerSize?" pu-blocks-tabs__header-small":""}\n ${a.active?" active":""}\n `,tagName:"button",role:"tab",value:a.text,"aria-controls":`panel-${a.id}`,"aria-selected":a.active?"true":"false"}))):""),(0,t.createElement)(ri.Content,null))}});const oi=(e,t,a)=>{const l=wp.data.select("core/block-editor");let r=l.getBlock(e.clientId).innerBlocks;e.setAttributes({numTabs:a});const n=a>t,s=0===a;let o=[...e.attributes.headers];if(1===t&&t===a){const t=(0,na.createBlock)("purdue-blocks/tab"),a={id:e.clientId+"-0",text:"",active:!0};r=[t],o.push(a),e.setAttributes({headers:o}),wp.data.dispatch("core/block-editor").replaceInnerBlocks(e.clientId,r,!1),wp.data.dispatch("core/block-editor").updateBlockAttributes(l.getBlock(e.clientId).innerBlocks[0].clientId,{editorSelected:!0,selected:!0})}else if(n&&!s){const l=a-t;for(let e=0;e[(0,t.createElement)("div",{className:"pu-blocks-tabs__panel"+(e.attributes.editorSelected?" active":"")},(0,t.createElement)(pi,{template:gi,templateLock:!1,templateInsertUpdatesSelection:!1}))],save:e=>(0,t.createElement)("div",{className:"pu-blocks-tabs__panel"+(e.attributes.editorSelected?" active":""),"aria-labelledby":`header-${e.attributes.aria}`,id:`panel-${e.attributes.aria}`},(0,t.createElement)(pi.Content,null))});const{__:vi}=wp.i18n,{registerBlockType:Ei}=wp.blocks,{PanelBody:fi,PanelRow:ki,SelectControl:yi}=wp.components,{RichText:wi,InspectorControls:_i,MediaUploadCheck:xi,MediaUpload:Ci,InnerBlocks:Ni,useBlockProps:Ti}=wp.blockEditor;Ei("purdue-blocks/shape-separator",{title:vi("Shape Separator"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",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)"})))),category:"purdue-blocks",keywords:[],attributes:{topColor:{type:"string",default:"black"},bottomColor:{type:"string",default:"boiler"}},supports:{className:!1,anchor:!0},description:vi("Add a separator section with a downward pointing arrow shape to be placed between two other sections."),edit:e=>[(0,t.createElement)(_i,null,(0,t.createElement)(fi,null,(0,t.createElement)(ki,null,(0,t.createElement)(yi,{label:"Top Color",help:"The color of the arrow shape. This should match the previous section.",value:e.attributes.topColor,options:[{value:"black",label:"Black"},{value:"white",label:"White"},{value:"lightest",label:"Lightest Digital Gray"},{value:"light",label:"Light Digital Gray"},{value:"medium",label:"Medium Digital Gray"},{value:"steel",label:"Steel(Dark) Gray"},{value:"boiler",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({topColor:t})}})),(0,t.createElement)(ki,null,(0,t.createElement)(yi,{label:"Bottom Color",help:"The color behind the arrow shape. This should match the following section.",value:e.attributes.bottomColor,options:[{value:"black",label:"Black"},{value:"white",label:"White"},{value:"lightest",label:"Lightest Digital Gray"},{value:"light",label:"Light Digital Gray"},{value:"medium",label:"Medium Digital Gray"},{value:"steel",label:"Steel(Dark) Gray"},{value:"boiler",label:"Boilermaker Gold"}],onChange:t=>{e.setAttributes({bottomColor:t})}})))),(0,t.createElement)("div",{className:`pu-shape-separator bg-${e.attributes.bottomColor}`},(0,t.createElement)("div",{className:`pu-shape-separator--top bg-${e.attributes.topColor}`}))],save:e=>{const a=Ti.save();return(0,t.createElement)("div",x({},a,{className:`pu-shape-separator bg-${e.attributes.bottomColor}`}),(0,t.createElement)("div",{className:`pu-shape-separator--top bg-${e.attributes.topColor}`}))}});const{__:Ai}=wp.i18n,{registerBlockType:Li}=wp.blocks,{PanelBody:Si,PanelRow:Bi,CheckboxControl:Hi,TextareaControl:Ui,TextControl:Ii,RadioControl:Pi,SelectControl:Mi}=wp.components,{RichText:$i,InspectorControls:Ri,MediaUploadCheck:Oi,MediaUpload:Di,InnerBlocks:Vi,useBlockProps:Gi}=wp.blockEditor;Li("purdue-blocks/video-hero",{title:Ai("Video Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",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)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".title"},buttonText:{type:"string",source:"html",selector:".cta-button"},buttonURL:{type:"string",default:""},external:{type:"boolean",default:!1},videoUrl:{type:"string",default:""},posterUrl:{type:"string",default:""},type:{type:"string",default:"video"},imgUrl:{type:"string",default:""},altTexti:{type:"string",default:""},altTextv:{type:"string",default:""},images:{type:"array",default:[]},currentImage:{type:"number",default:1}},supports:{className:!1,anchor:!0},description:Ai("Create a hero banner that will display a background image, video or carousel."),edit:e=>[(0,t.createElement)(Ri,null,(0,t.createElement)(Si,null,(0,t.createElement)(Bi,null,(0,t.createElement)(Pi,{label:"Type of the background",help:"If you want to use one single image as the background of this block, select Image; if you want to use carousel as the background, select Carousel; otherwise, select Video.",selected:e.attributes.type,options:[{label:"Video",value:"video"},{label:"Image",value:"image"},{label:"Carousel",value:"carousel"}],onChange:t=>{e.setAttributes({type:t})}}))),(0,t.createElement)(Si,null,"video"===e.attributes.type?(0,t.createElement)(Bi,null,(0,t.createElement)("p",null,(0,t.createElement)("strong",null,"Select an image to replace the video as the hero on mobile devices."))):"","video"===e.attributes.type?(0,t.createElement)(Bi,null,(0,t.createElement)(Oi,null,(0,t.createElement)(Di,{allowedTypes:["image"],onSelect:t=>{e.setAttributes({posterUrl:t.url,altTextv:""!==e.attributes.altTextv?e.attributes.altTextv:img.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",null,(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},""!==e.attributes.posterUrl?"Select a new image":"Select an image")),""!==e.attributes.posterUrl?(0,t.createElement)("img",{src:e.attributes.posterUrl}):"")}}))):"","carousel"!==e.attributes.type?(0,t.createElement)(Bi,null,(0,t.createElement)(Ui,{label:"Hero Image Alt Text",help:"When video is selected as hero media type, this is the Alt text of the image displaying on mobile devices.",value:"image"===e.attributes.type?e.attributes.altTexti:e.attributes.altTextv,onChange:t=>"image"===e.attributes.type?e.setAttributes({altTexti:t}):e.setAttributes({altTextv:t})})):"",(0,t.createElement)(Bi,null,(0,t.createElement)(Ii,{label:"CTA Link URL",value:e.attributes.buttonURL,onChange:t=>e.setAttributes({buttonURL:t})})),(0,t.createElement)(Bi,null,(0,t.createElement)(Hi,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})))),(0,t.createElement)("div",{className:"video-hero-editor"},"carousel"===e.attributes.type?(0,t.createElement)(Oi,null,(0,t.createElement)(Di,{addToGallery:!0,multiple:!0,gallery:!0,onSelect:t=>{e.setAttributes({images:t})},render:a=>{let{open:l}=a,r=[...e.attributes.images],n=parseInt(e.attributes.currentImage),s=r.length>0?r[n-1].url:"",o=r.length>0?r[n-1].alt:"";return(0,t.createElement)("div",{class:"video-hero--background-image",role:"img",style:{backgroundImage:`url(${s})`},"aria-label":o},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},0===e.attributes.images.length?"Select images":"Select new images")),e.attributes.images.length>1?(0,t.createElement)("div",{className:"video-hero__carousel__arrow-wrapper"},(0,t.createElement)("span",{className:"video-hero--carousel__arrow video-hero--carousel__arrow-left",onClick:()=>{e.attributes.currentImage>1?e.setAttributes({currentImage:e.attributes.currentImage-1}):e.setAttributes({currentImage:e.attributes.images.length})}},(0,t.createElement)("i",{class:"fas fa-chevron-left"})),(0,t.createElement)("span",{className:"video-hero--carousel__current"},e.attributes.currentImage),(0,t.createElement)("span",{className:"video-hero--carousel__total"},"/",e.attributes.images.length),(0,t.createElement)("span",{className:"video-hero--carousel__arrow video-hero--carousel__arrow-right",onClick:()=>{e.attributes.currentImage{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)($i,{tagname:"span",value:e.attributes.buttonText,className:"cta-button",onChange:t=>{e.setAttributes({buttonText:t})},placeholder:"Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]})))}})):"","image"===e.attributes.type||"video"===e.attributes.type?(0,t.createElement)(Oi,null,(0,t.createElement)(Di,{multiple:!1,gallery:!1,onSelect:t=>{"video"===e.attributes.type?(e.setAttributes({videoUrl:""}),e.setAttributes({videoUrl:t.url})):e.setAttributes({imgUrl:t.url,altTexti:""!==e.attributes.altTexti?e.attributes.altTexti:t.alt})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{class:"video-hero--background-image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},"video"===e.attributes.type&&""!==e.attributes.videoUrl?(0,t.createElement)("video",{className:"video-hero-editor--video",muted:""},(0,t.createElement)("source",{src:e.attributes.videoUrl,type:"video/mp4"})):"",(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},"video"===e.attributes.type?""!==e.attributes.videoUrl?"Select a new video":"Select a video":""!==e.attributes.imgUrl?"Select a new image":"Select an image")),(0,t.createElement)("div",{className:"video-hero-editor--overlay"}),(0,t.createElement)("div",{className:"video-hero-editor--content"},(0,t.createElement)($i,{tagname:"h1",value:e.attributes.title,className:"title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)($i,{tagname:"span",value:e.attributes.buttonText,className:"cta-button",onChange:t=>{e.setAttributes({buttonText:t})},placeholder:"Button Text",keepPlaceholderOnFocus:!0,allowedFormats:[]})))}})):"")],save:e=>{const a=Gi.save();return"carousel"===e.attributes.type?(0,t.createElement)("div",x({},a,{className:"video-hero video-hero--carousel"}),(0,t.createElement)("div",{className:"video-hero--carousel__wrapper"},e.attributes.images.length>0?e.attributes.images.map((e=>(0,t.createElement)("div",{className:"video-hero--carousel__image",style:{backgroundImage:`url(${e.url})`},"aria-label":e.alt}))):""),e.attributes.images.length>1?(0,t.createElement)("div",{class:"video-hero--control"},(0,t.createElement)("button",{class:"video-hero--pause-button"},(0,t.createElement)("span",{class:"sr-only"},"Pause"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-pause-circle","aria-hidden":"true"}))),(0,t.createElement)("button",{class:"video-hero--play-button hide"},(0,t.createElement)("span",{class:"sr-only"},"Play"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-play-circle","aria-hidden":"true"})))):"",e.attributes.images.length>1?(0,t.createElement)("div",{className:"video-hero--carousel__arrow-wrapper"},(0,t.createElement)("span",{className:"video-hero--carousel__arrow video-hero--carousel__arrow-left"},(0,t.createElement)("i",{class:"fas fa-chevron-left"})),(0,t.createElement)("span",{className:"video-hero--carousel__current"},"1"),(0,t.createElement)("span",{className:"video-hero--carousel__total"},"/",e.attributes.images.length),(0,t.createElement)("span",{className:"video-hero--carousel__arrow video-hero--carousel__arrow-right"},(0,t.createElement)("i",{class:"fas fa-chevron-right"}))):"",(0,t.createElement)("div",{className:"video-hero--content"},(0,t.createElement)($i.Content,{className:"title",tagName:"h1",value:e.attributes.title}),e.attributes.buttonURL||e.attributes.buttonText?(0,t.createElement)("a",{href:e.attributes.buttonURL,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)($i.Content,{className:"cta-button",tagName:"span",value:e.attributes.buttonText})):"")):(0,t.createElement)("div",x({},a,{className:"video-hero video-hero--background-image",style:{backgroundImage:`url(${"video"===e.attributes.type?e.attributes.posterUrl:e.attributes.imgUrl})`},"aria-label":"video"===e.attributes.type?e.attributes.altTextv:e.attributes.altTexti}),"video"===e.attributes.type?(0,t.createElement)("video",{autobuffer:"",autoplay:"",className:"video-hero--video",loop:"",muted:"",playsinline:"",poster:e.attributes.posterUrl||"",src:e.attributes.videoUrl}):"",(0,t.createElement)("div",{className:"video-hero--overlay"}),"video"===e.attributes.type?(0,t.createElement)("div",{class:"video-hero--control"},(0,t.createElement)("button",{class:"video-hero--pause-button"},(0,t.createElement)("span",{class:"sr-only"},"Pause"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-pause-circle","aria-hidden":"true"}))),(0,t.createElement)("button",{class:"video-hero--play-button hide"},(0,t.createElement)("span",{class:"sr-only"},"Play"),(0,t.createElement)("span",null,(0,t.createElement)("i",{class:"fas fa-play-circle","aria-hidden":"true"})))):"",(0,t.createElement)("div",{className:"video-hero--content"},(0,t.createElement)($i.Content,{className:"title",tagName:"h1",value:e.attributes.title}),e.attributes.buttonURL||e.attributes.buttonText?(0,t.createElement)("a",{href:e.attributes.buttonURL,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)($i.Content,{className:"cta-button",tagName:"span",value:e.attributes.buttonText})):""))}});const{__:Fi}=wp.i18n,{registerBlockType:Zi}=wp.blocks,{PanelBody:qi,PanelRow:zi,TextareaControl:ji,TextControl:Wi,Button:Yi,RadioControl:Xi,CheckboxControl:Ki,SelectControl:Qi,Disabled:Ji}=wp.components,{RichText:ec,InspectorControls:tc,MediaUploadCheck:ac,MediaUpload:lc,InnerBlocks:rc}=wp.blockEditor,{RawHTML:nc}=wp.element,sc=[["core/paragraph",{placeholder:"Body content copy"}]];function oc(e){const t=null==e?void 0:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null}Zi("purdue-blocks/story-line",{title:Fi("Storyline"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 68.75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"lightbulb",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"cls-2",d:"M84.38,34.38A34.21,34.21,0,0,1,75.87,57c-3.25,3.71-8.35,11.49-10.24,18H56.26v0a11,11,0,0,1,.43-2.79A61.73,61.73,0,0,1,68.82,50.81a25,25,0,1,0-37.64,0A61.7,61.7,0,0,1,43.33,72.23,9.49,9.49,0,0,1,43.74,75v0H34.37c-1.89-6.51-7-14.29-10.24-18A34.37,34.37,0,1,1,84.38,34.38ZM53.12,18.75A3.12,3.12,0,0,1,50,21.88a12.51,12.51,0,0,0-12.5,12.5,3.13,3.13,0,0,1-6.25,0A18.77,18.77,0,0,1,50,15.63,3.11,3.11,0,0,1,53.12,18.75ZM34.38,81.25H65.62v8.43a3.11,3.11,0,0,1-.52,1.73L60.3,98.6a3.1,3.1,0,0,1-2.6,1.4H42.3a3.1,3.1,0,0,1-2.6-1.4l-4.79-7.19a3.11,3.11,0,0,1-.52-1.73Z",transform:"translate(-15.62)"})))),category:"purdue-blocks",keywords:[],attributes:{storyTitle:{type:"string",source:"html",selector:".story-title"},backgroundColor:{type:"string",default:"white"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},imageAlign:{type:"string",default:"left"},contentAlign:{type:"string",default:"bottom"},hasLink:{type:"boolean",default:!1},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h2"},addPaddingTop:{type:"boolean",default:!1},addPaddingBottom:{type:"boolean",default:!1},backgroundImageUrl:{type:"string",default:""},addExtraLineTop:{type:"boolean",default:!1},id:{type:"string",default:""},type:{type:"string",default:"image"},youtubeTitle:{type:"string",default:""},youtubeURL:{type:"string",default:""},uploadURL:{type:"string",default:""},uploadTitle:{type:"string",default:""}},supports:{className:!1},description:Fi("This block adds a storyline row on the page."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:"",altText:"",uploadURL:"",uploadTitle:""})};"dark"===e.attributes.backgroundColor?e.setAttributes({backgroundImageUrl:file_data.concreteDark_url}):e.setAttributes({backgroundImageUrl:""});const l=oc(e.attributes.youtubeURL),r=(0,t.createElement)("iframe",{id:l,class:"storyline-youtube",title:e.attributes.youtubeTitle,src:`https://www.youtube.com/embed/${l}`,frameborder:"0",allowfullscreen:!0});return[(0,t.createElement)(tc,null,(0,t.createElement)(qi,null,(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})),(0,t.createElement)(zi,null,(0,t.createElement)(Xi,{label:"Background Color",help:"Choose the background color.",selected:e.attributes.backgroundColor,options:[{label:"White",value:"white"},{label:"Light Gray",value:"gray"},{label:"Dark",value:"dark"},{label:"Transparent on Dark Background",value:"tDark"},{label:"Transparent on Lignt Background",value:"tLight"}],onChange:t=>{e.setAttributes({backgroundColor:t})}})),(0,t.createElement)(zi,null,(0,t.createElement)(Xi,{label:"Media Type",help:"Choose between image, upload video, or Youtube video.",selected:e.attributes.type,options:[{label:"Image",value:"image"},{label:"Upload Video",value:"upload"},{label:"Youtube Video",value:"youtube"}],onChange:t=>{e.setAttributes({type:t})}})),"youtube"===e.attributes.type?(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"Youtube video URL",value:e.attributes.youtubeURL,onChange:t=>e.setAttributes({youtubeURL:t})})):"","youtube"===e.attributes.type?(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"Youtube Video Title",value:e.attributes.youtubeTitle,onChange:t=>{e.setAttributes({youtubeTitle:t})}})):"",(0,t.createElement)(zi,null,(0,t.createElement)(Xi,{label:"Media Alignment",help:"Choose to place the media to the left or right.",selected:e.attributes.imageAlign,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({imageAlign:t})}})),(0,t.createElement)(zi,null,(0,t.createElement)(Xi,{label:"Content Alignment",help:"Choose to align the content to the bottom of the image when it's short or the center of the image when it's tall.",selected:e.attributes.contentAlign,options:[{label:"Bottom",value:"bottom"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({contentAlign:t})}})),(0,t.createElement)(zi,null,(0,t.createElement)(Qi,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}}))),(0,t.createElement)(qi,null,(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Add a CTA link?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})):"",e.attributes.hasLink?(0,t.createElement)(zi,null,(0,t.createElement)(Wi,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(zi,null,(0,t.createElement)(ji,{label:"Featured Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Add padding above guide line?",checked:e.attributes.addPaddingTop,onChange:t=>e.setAttributes({addPaddingTop:t})})),(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Add padding below top guide line on mobile?",checked:e.attributes.addExtraLineTop,onChange:t=>e.setAttributes({addExtraLineTop:t})})),(0,t.createElement)(zi,null,(0,t.createElement)(Ki,{label:"Add padding below guide line?",checked:e.attributes.addPaddingBottom,onChange:t=>e.setAttributes({addPaddingBottom:t})})))),(0,t.createElement)("div",{className:`purdue-blocks-storyline purdue-blocks-editor-storyline\n ${e.attributes.addExtraLineTop&&!e.attributes.addPaddingTop?" purdue-blocks-storyline-top-line":""}\n ${e.attributes.addPaddingTop?" purdue-blocks-storyline-top-space":""}\n ${e.attributes.addPaddingBottom?" purdue-blocks-storyline-bottom-space":""}\n ${"gray"===e.attributes.backgroundColor?" purdue-blocks-storyline-gray":""}\n ${"dark"===e.attributes.backgroundColor?" purdue-blocks-storyline-dark":""}\n ${"white"===e.attributes.backgroundColor?" purdue-blocks-storyline-white":""}\n ${"tDark"===e.attributes.backgroundColor?" purdue-blocks-storyline-tDark":""}\n `,style:{backgroundImage:`url(${"dark"===e.attributes.backgroundColor?e.attributes.backgroundImageUrl:""})`},"aria-label":""},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns is-multiline"+("left"===e.attributes.imageAlign?"":" columns-reversed")},(0,t.createElement)("div",{className:"column is-half-desktop is-half-tablet is-full-mobile"},"youtube"===e.attributes.type?(0,t.createElement)(Ji,null,r):"image"===e.attributes.type?(0,t.createElement)(ac,null,(0,t.createElement)(lc,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"image-container"},(0,t.createElement)("img",{className:"image",src:e.attributes.imgUrl,alt:e.attributes.altText}),(0,t.createElement)("div",{className:"image-buttons"},(0,t.createElement)(Yi,{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),e.attributes.imgUrl?(0,t.createElement)(Yi,{className:"remove-image-button",onClick:a},"Remove image"):""))}})):"upload"===e.attributes.type?(0,t.createElement)(ac,null,(0,t.createElement)(lc,{onSelect:t=>{e.setAttributes({uploadURL:t.url,uploadTitle:t.title})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"image-container"},(0,t.createElement)(Ji,null,(0,t.createElement)("video",{muted:!0,playsinline:"",title:e.attributes.uploadTitle,src:e.attributes.uploadURL})),(0,t.createElement)("div",{className:"image-buttons"},(0,t.createElement)(Yi,{className:"remove-image-button",onClick:r},""!==e.attributes.uploadURL?"Select a new Video":"Select an Video"),e.attributes.uploadURL?(0,t.createElement)(Yi,{className:"remove-image-button",onClick:a},"Remove Video"):""))}})):""),(0,t.createElement)("div",{className:`column is-half-desktop is-half-tablet is-full-mobile${"bottom"===e.attributes.contentAlign?" column-align-bottom":""}${"center"===e.attributes.contentAlign?" column-align-center":""}`},(0,t.createElement)("div",{className:"content-container"},(0,t.createElement)(ec,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title",onChange:t=>{e.setAttributes({storyTitle:t})},placeholder:"Add header",keepPlaceholderOnFocus:!0}),(0,t.createElement)(rc,{template:sc,templateLock:!1}),e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.ctaText),(0,t.createElement)("span",{className:"read-more-button-icon"})):"")))))]},save:e=>{const a=oc(e.attributes.youtubeURL),l=`https://www.youtube.com/embed/${a}`,r=`[iframe id=${a} title=${e.attributes.youtubeTitle} src=${l} frameborder="0" allow="fullscreen"]`,n=`url(${e.attributes.backgroundImageUrl})`;return(0,t.createElement)("div",{id:e.attributes.id?e.attributes.id:null,className:`purdue-blocks-storyline\n ${e.attributes.addExtraLineTop?" purdue-blocks-storyline-top-line":""}\n ${e.attributes.addPaddingTop?" purdue-blocks-storyline-top-space":""}\n ${e.attributes.addPaddingBottom?" purdue-blocks-storyline-bottom-space":""}\n ${"gray"===e.attributes.backgroundColor?" purdue-blocks-storyline-gray":""}\n ${"dark"===e.attributes.backgroundColor?" purdue-blocks-storyline-dark":""}\n ${"white"===e.attributes.backgroundColor?" purdue-blocks-storyline-white":""}\n ${"tDark"===e.attributes.backgroundColor?" purdue-blocks-storyline-tDark":""}\n `,style:{backgroundImage:`${"dark"===e.attributes.backgroundColor?n:"none"}`},"aria-label":""},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns is-multiline"+("left"===e.attributes.imageAlign?"":" columns-reversed")},(0,t.createElement)("div",{className:"column is-half-desktop is-half-tablet is-full-mobile"},(0,t.createElement)("div",{className:"image-container"},e.attributes.imgUrl&&"image"===e.attributes.type?(0,t.createElement)("img",{className:"image",src:e.attributes.imgUrl,alt:e.attributes.altText}):"",e.attributes.youtubeURL&&"youtube"===e.attributes.type?(0,t.createElement)("div",{class:"iframe-container"},(0,t.createElement)(nc,null,r)):"",e.attributes.uploadURL&&"upload"===e.attributes.type?(0,t.createElement)("video",{controls:!0,playsinline:"",src:e.attributes.uploadURL,title:e.attributes.uploadTitle}):"")),(0,t.createElement)("div",{className:`column is-half-desktop is-half-tablet is-full-mobile${"bottom"===e.attributes.contentAlign?" column-align-bottom":""}${"center"===e.attributes.contentAlign?" column-align-center":""}`},(0,t.createElement)("div",{className:"content-container"},e.attributes.storyTitle?(0,t.createElement)(ec.Content,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title"}):"",(0,t.createElement)(rc.Content,null),e.attributes.hasLink?(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText,(0,t.createElement)("span",{className:"read-more-button-icon"})):"")))))}});const{__:ic}=wp.i18n,{registerBlockType:cc}=wp.blocks,{PanelBody:uc,PanelRow:dc,CheckboxControl:mc,TextareaControl:bc,SelectControl:pc,TextControl:hc,RadioControl:gc,Button:vc,Disabled:Ec}=wp.components,{RichText:fc,InspectorControls:kc,MediaUploadCheck:yc,MediaUpload:wc,InnerBlocks:_c,useBlockProps:xc}=wp.blockEditor,{select:Cc}=wp.data,Nc=[["core/paragraph",{placeholder:"Body content copy"}]],Tc=["video"];cc("purdue-blocks/large-featured-story",{title:ic("Large Image Featured Story"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{layout:{type:"string",default:"gradient"},storyTitle:{type:"string",source:"html",selector:".story-title"},ctaOptionalSub:{type:"string",default:""},hasLink:{type:"boolean",default:!1},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h2"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},addLightBox:{type:"boolean",default:!1},buttonText:{type:"string",default:""},videoPlatform:{type:"string",default:"youtube"},videoUrlYoutube:{type:"string",default:""},videoUrlUpload:{type:"string",default:""},videoTitle:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:ic("Adds a large image featured story."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})},l=()=>{e.setAttributes({videoUrlUpload:""})};return[(0,t.createElement)(kc,null,(0,t.createElement)(uc,null,(0,t.createElement)(dc,null,(0,t.createElement)(gc,{label:"Layout",selected:e.attributes.layout,options:[{label:"Gradient",value:"gradient"},{label:"Text Box",value:"box"}],onChange:t=>{e.setAttributes({layout:t})}})),(0,t.createElement)(dc,null,(0,t.createElement)(pc,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}})),(0,t.createElement)(dc,null,(0,t.createElement)(mc,{label:"Add a CTA link?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})):"",e.attributes.hasLink?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(dc,null,(0,t.createElement)(mc,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(dc,null,(0,t.createElement)(bc,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})),(0,t.createElement)(dc,null,(0,t.createElement)(mc,{label:"Add a video lightbox?",checked:e.attributes.addLightBox,onChange:()=>e.setAttributes({addLightBox:!e.attributes.addLightBox})})),e.attributes.addLightBox?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Button Text",help:"The text on the button that opens the lightbox.",value:e.attributes.buttonText,onChange:t=>e.setAttributes({buttonText:t})})):"",e.attributes.addLightBox?(0,t.createElement)(dc,null,(0,t.createElement)(gc,{label:"Video Platform",help:"Select the platform of the video",selected:e.attributes.videoPlatform,options:[{label:"Youtube",value:"youtube"},{label:"Upload a video",value:"upload"}],onChange:t=>{e.setAttributes({videoPlatform:t})}})):"",e.attributes.addLightBox&&"youtube"===e.attributes.videoPlatform?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Youtube Video URL",value:e.attributes.videoUrlYoutube,onChange:t=>e.setAttributes({videoUrlYoutube:t})})):"",e.attributes.addLightBox&&"youtube"===e.attributes.videoPlatform?(0,t.createElement)(dc,null,(0,t.createElement)(hc,{label:"Youtube Video Title",value:e.attributes.videoTitle,onChange:t=>{e.setAttributes({videoTitle:""}),e.setAttributes({videoTitle:t})}})):"",e.attributes.addLightBox&&"upload"===e.attributes.videoPlatform?(0,t.createElement)(yc,null,(0,t.createElement)(wc,{accept:"video",allowedTypes:Tc,onSelect:t=>{e.setAttributes({videoUrlUpload:t.url,videoTitle:t.title})},render:a=>{let{open:r}=a;return""!==e.attributes.videoUrlUpload?(0,t.createElement)("div",{className:"bulma-blocks-editor-site-hero__preview"},(0,t.createElement)("video",{controls:!0,playsinline:"",src:e.attributes.videoUrlUpload,title:e.attributes.videoTitle}),(0,t.createElement)(vc,{className:"remove-image-button multiple",onClick:r},"Select a New Video"),(0,t.createElement)(vc,{className:"remove-image-button multiple",onClick:l},"Remove video")):(0,t.createElement)("div",null,(0,t.createElement)("p",{className:"bulma-blocks-editor-site-hero__description"},"Pick a video from the media library."),(0,t.createElement)(vc,{className:"remove-image-button",onClick:r},"Open Media Library"))}})):"")),(0,t.createElement)("div",{className:"pu-cta-hero pu-large-image pu-large-image-editor animate"+("box"===e.attributes.layout?" pu-large-image--box":"")},(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)(yc,null,(0,t.createElement)(wc,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"background-image",role:e.attributes.altText?"img":"",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{className:"remove-image-button",onClick:a},"Remove image"):""))}})),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)(fc,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title",onChange:t=>{e.setAttributes({storyTitle:t})},placeholder:"Add header",keepPlaceholderOnFocus:!0}),(0,t.createElement)(_c,{template:Nc,templateLock:!1}),e.attributes.hasLink&&!e.attributes.addLightBox?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",null,e.attributes.ctaText),(0,t.createElement)("span",{className:"read-more-button-icon"})):"",e.attributes.addLightBox?(0,t.createElement)("div",{className:"button-container"},e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},e.attributes.ctaText,(0,t.createElement)("span",{className:"read-more-button-icon"})):"",(0,t.createElement)("button",{className:"pu-lightbox-button"},e.attributes.buttonText)):"")))))]},save:e=>{const a=xc.save(),l=function(e){const t=null==e?void 0:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:null}(e.attributes.videoUrlYoutube),r=(0,t.createElement)("iframe",{id:l,class:"pu-lightbox-youtube",title:e.attributes.videoTitle,src:`https://www.youtube.com/embed/${l}`,frameborder:"0",allowfullscreen:!0});return(0,t.createElement)("div",x({},a,{className:"pu-cta-hero pu-large-image"+("box"===e.attributes.layout?" pu-large-image--box animate":"")}),(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"background-image","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},e.attributes.storyTitle?(0,t.createElement)(fc.Content,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title"}):"",(0,t.createElement)(_c.Content,null),e.attributes.hasLink&&!e.attributes.addLightBox?(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText,(0,t.createElement)("span",{className:"read-more-button-icon"})):"",e.attributes.addLightBox?(0,t.createElement)("div",{className:"button-container"},e.attributes.hasLink?(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},e.attributes.ctaText,(0,t.createElement)("span",{className:"read-more-button-icon"})):"",(0,t.createElement)("button",{className:"pu-lightbox-button"},e.attributes.buttonText)):"")))),e.attributes.addLightBox?(0,t.createElement)("div",{className:"pu-lightbox"},(0,t.createElement)("div",{className:"modal--close-button"},(0,t.createElement)("i",{class:"fas fa-times","aria-hidden":"true"})),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"video-container"},(0,t.createElement)("div",{className:"video"},"youtube"===e.attributes.videoPlatform?r:"","upload"===e.attributes.videoPlatform?(0,t.createElement)("video",{controls:!0,playsinline:"",src:e.attributes.videoUrlUpload,title:e.attributes.videoTitle}):"")))):"")}});const{__:Ac}=wp.i18n,{registerBlockType:Lc}=wp.blocks,{PanelBody:Sc,PanelRow:Bc,CheckboxControl:Hc,TextareaControl:Uc,SelectControl:Ic,TextControl:Pc,Button:Mc}=wp.components,{RichText:$c,InspectorControls:Rc,MediaUploadCheck:Oc,MediaUpload:Dc,InnerBlocks:Vc,useBlockProps:Gc}=wp.blockEditor,{select:Fc}=wp.data;Lc("purdue-blocks/large-text",{title:Ac("Large Text"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{largeText:{type:"string",source:"html",selector:"span.large-text"},smallText:{type:"string",source:"html",selector:"span.small-text"},ctaOptionalSub:{type:"string",default:""},hasLink:{type:"boolean",default:!1},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h2"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:Ac("Adds a large image featured story."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};var l=e.attributes.headerLevel;return[(0,t.createElement)(Rc,null,(0,t.createElement)(Sc,null,(0,t.createElement)(Bc,null,(0,t.createElement)(Ic,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}})),(0,t.createElement)(Bc,null,(0,t.createElement)(Hc,{label:"Add a CTA link?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(Bc,null,(0,t.createElement)(Pc,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})):"",e.attributes.hasLink?(0,t.createElement)(Bc,null,(0,t.createElement)(Pc,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(Bc,null,(0,t.createElement)(Hc,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(Bc,null,(0,t.createElement)(Uc,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"pu-cta-hero pu-large-image pu-large-image-editor pu-large-text animate"},(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)(Oc,null,(0,t.createElement)(Dc,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"background-image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"remove-button",class:"buttons-container"},(0,t.createElement)("button",{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{className:"remove-image-button",onClick:a},"Remove image"):""))}})),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("div",{className:"columns is-centered"},(0,t.createElement)("div",{className:"column is-two-thirds-desktop is-three-quarters-tablet is-full-mobile"},(0,t.createElement)(l,null,(0,t.createElement)($c,{tagName:"span",value:e.attributes.largeText,className:"large-text",onChange:t=>{e.setAttributes({largeText:t})},placeholder:"Add Large text",keepPlaceholderOnFocus:!0,allowedFormats:[]}),(0,t.createElement)($c,{tagName:"span",value:e.attributes.smallText,className:"small-text",onChange:t=>{e.setAttributes({smallText:t})},placeholder:"Add regular text",keepPlaceholderOnFocus:!0,allowedFormats:[]})),e.attributes.hasLink?(0,t.createElement)("div",{className:"bottom-content"},(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",{className:"read-more-button-text"},e.attributes.ctaText))):"")))))))]},save:e=>{var a=e.attributes.headerLevel;const l=Gc.save();return(0,t.createElement)("div",x({},l,{className:"pu-cta-hero pu-large-image pu-large-text"}),(0,t.createElement)("div",{className:"hero is-large"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{className:"background-image","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)("div",{className:"columns is-centered"},(0,t.createElement)("div",{className:"column is-two-thirds-desktop is-three-quarters-tablet is-full-mobile"},(0,t.createElement)(a,null,e.attributes.largeText?(0,t.createElement)($c.Content,{tagName:"span",value:e.attributes.largeText,className:"large-text"}):"",e.attributes.smallText?(0,t.createElement)($c.Content,{tagName:"span",value:e.attributes.smallText,className:"small-text"}):""),e.attributes.hasLink?(0,t.createElement)("div",{className:"bottom-content"},(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("span",{className:"read-more-button-text"},e.attributes.ctaText))):"")))))))}});const{__:Zc}=wp.i18n,{registerBlockType:qc}=wp.blocks,{Placeholder:zc,Button:jc,FormFileUpload:Wc,SelectControl:Yc,IconButton:Xc,Panel:Kc,PanelBody:Qc,PanelRow:Jc,Toolbar:eu,BaseControl:tu,TextControl:au,RadioControl:lu,TextareaControl:ru,CheckboxControl:nu}=wp.components,{InspectorControls:su,MediaUploadCheck:ou,MediaUpload:iu,InnerBlocks:cu,RichText:uu,useBlockProps:du}=wp.blockEditor,{Component:mu,Fragment:bu}=wp.element,pu=[["core/paragraph",{placeholder:"Add content"}]];qc("purdue-blocks/sidebar-box",{title:Zc("Sidebar Box"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".sidebar-box__title"},titleLevel:{type:"string",default:"p"},addMargin:{type:"string",default:""},linkGroup:{type:"array",default:[]}},supports:{className:!1,anchor:!0},description:Zc("Add a box with optional header and CTA buttons."),edit:e=>{const a=()=>{let t=[...e.attributes.linkGroup];t.push({ctaText:"",ctaLink:"",external:!1}),e.setAttributes({linkGroup:t})};let l;if(e.attributes.linkGroup.length>0){let a=e.attributes.linkGroup.length-1;l=e.attributes.linkGroup.map(((l,r)=>(0,t.createElement)(Qc,{key:r,className:"quote-block-details",title:`Link ${r+1} Details`,initialOpen:!0},(0,t.createElement)(Jc,null,(0,t.createElement)(au,{label:"Call to action text",value:l.ctaText,onChange:t=>((t,a)=>{let l=[...e.attributes.linkGroup];l[a].ctaText=t,e.setAttributes({linkGroup:l})})(t,r)})),(0,t.createElement)(Jc,null,(0,t.createElement)(au,{label:"Link address",value:l.ctaLink,onChange:t=>((t,a)=>{let l=[...e.attributes.linkGroup];l[a].ctaLink=t,e.setAttributes({linkGroup:l})})(t,r)})),(0,t.createElement)(Jc,null,(0,t.createElement)(nu,{label:"Open link in new tab?",checked:l.external,onChange:()=>(t=>{let a=[...e.attributes.linkGroup];a[t].external=!a[t].external,e.setAttributes({linkGroup:a})})(r)})),e.attributes.linkGroup.length>1?(0,t.createElement)("hr",null):"",e.attributes.linkGroup.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this Link:")),r(t=>{let a=[...e.attributes.linkGroup],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({linkGroup:a})})(r),icon:Ps}):"",r>0?(0,t.createElement)(jc,{className:"remove-image-button move-quote",onClick:()=>(t=>{let a=[...e.attributes.linkGroup],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({linkGroup:a})})(r),icon:Ms}):""):"",e.attributes.linkGroup.length>0?(0,t.createElement)("hr",null):"",e.attributes.linkGroup.length>0?(0,t.createElement)(Jc,null,(0,t.createElement)(jc,{className:"remove-image-button remove-quote",onClick:()=>(t=>{let a=[...e.attributes.linkGroup];a.splice(t,1),e.setAttributes({linkGroup:a})})(r)},"Remove this Link")):"")))}return[(0,t.createElement)(su,{key:"1"},(0,t.createElement)(Qc,null,(0,t.createElement)(Jc,null,(0,t.createElement)(Yc,{label:"Heading level of the Header",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(Jc,null,(0,t.createElement)(nu,{label:"Add margin below?",checked:e.attributes.addMargin,onChange:()=>e.setAttributes({addMargin:!e.attributes.addMargin})}))),l,(0,t.createElement)(Qc,null,0===e.attributes.linkGroup.length?(0,t.createElement)(jc,{className:"remove-image-button add-quote",onClick:a.bind(void 0)},Zc("Add A CTA Link")):"",e.attributes.linkGroup.length>0&&e.attributes.linkGroup.length<5?(0,t.createElement)(jc,{className:"remove-image-button add-quote",onClick:a.bind(void 0)},Zc("Add Another CTA Link")):"")),(0,t.createElement)("div",{key:"2",className:"purdue-block-sidebar-box-editor purdue-block-sidebar-box"+(e.attributes.addMargin?" purdue-block-sidebar-box--margin":"")},(0,t.createElement)(uu,{tagname:e.setAttributes.titleLevel,value:e.attributes.title,className:"sidebar-box__title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)("div",{className:"sidebar-box__content"},(0,t.createElement)(cu,{template:pu,templateLock:!1})),e.attributes.linkGroup.length>0?e.attributes.linkGroup.map(((e,a)=>""!==e.ctaLink||""!==e.ctaText?(0,t.createElement)("a",{key:a,className:"sidebar-box__link components-disabled",href:e.ctaLink,target:e.external?"_blank":"_self",rel:"noopener noreferrer"},e.ctaText):"")):"")]},save:e=>{const a=du.save();return(0,t.createElement)("div",x({},a,{className:"purdue-block-sidebar-box"+(e.attributes.addMargin?" purdue-block-sidebar-box--margin":"")}),e.attributes.title?(0,t.createElement)(uu.Content,{className:"sidebar-box__title",tagName:e.attributes.titleLevel,value:e.attributes.title}):"",(0,t.createElement)("div",{className:"sidebar-box__content"},(0,t.createElement)(cu.Content,null)),e.attributes.linkGroup.length>0?e.attributes.linkGroup.map(((e,a)=>""!==e.ctaLink||""!==e.ctaText?(0,t.createElement)("a",{key:a,className:"sidebar-box__link",href:e.ctaLink,target:e.external?"_blank":"_self",rel:"noopener noreferrer"},e.ctaText):"")):"")}});const{__:hu}=wp.i18n,{registerBlockType:gu}=wp.blocks,{Placeholder:vu,Button:Eu,FormFileUpload:fu,SelectControl:ku,IconButton:yu,Panel:wu,PanelBody:_u,PanelRow:xu,Toolbar:Cu,BaseControl:Nu,TextControl:Tu,RadioControl:Au,TextareaControl:Lu,CheckboxControl:Su}=wp.components,{InspectorControls:Bu,MediaUploadCheck:Hu,MediaUpload:Uu,InnerBlocks:Iu,RichText:Pu,useBlockProps:Mu}=wp.blockEditor,{Component:$u,Fragment:Ru}=wp.element;gu("purdue-blocks/contact-card",{title:hu("Contact Card"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{title:{type:"string",source:"html",selector:".contact-card__title"},titleLevel:{type:"string",default:"p"},addMargin:{type:"string",default:""},contactGroup:{type:"array",default:[]}},supports:{className:!1,anchor:!0},description:hu("Add a contact card."),edit:e=>{let a,l;if(0===e.attributes.contactGroup.length&&e.setAttributes({contactGroup:[{icon:"",text:{type:"string",source:"html",selector:".contact-card__text"}}]}),e.attributes.contactGroup.length>0){let r=e.attributes.contactGroup.length-1;a=e.attributes.contactGroup.map(((a,l)=>(0,t.createElement)(_u,{key:l,className:"quote-block-details",title:`Contact ${l+1} Details`,initialOpen:!0},(0,t.createElement)(xu,null,(0,t.createElement)(Tu,{label:"Icon",help:"Add a fontawesome icon in front of this piiece of contact info.",value:a.icon,onChange:t=>((t,a)=>{let l=[...e.attributes.contactGroup];l[a].icon=t,e.setAttributes({contactGroup:l})})(t,l)})),e.attributes.contactGroup.length>1?(0,t.createElement)("hr",null):"",e.attributes.contactGroup.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this piece of contact info:")),l(t=>{let a=[...e.attributes.contactGroup],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({contactGroup:a})})(l),icon:Ms}):"",l>0?(0,t.createElement)(Eu,{className:"remove-image-button move-quote",onClick:()=>(t=>{let a=[...e.attributes.contactGroup],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({contactGroup:a})})(l),icon:Ps}):""):"",e.attributes.contactGroup.length>0?(0,t.createElement)("hr",null):"",e.attributes.contactGroup.length>0?(0,t.createElement)(xu,null,(0,t.createElement)(Eu,{className:"remove-image-button remove-quote",onClick:()=>(t=>{let a=[...e.attributes.contactGroup];a.splice(t,1),e.setAttributes({contactGroup:a})})(l)},"Remove This Contact Info")):""))),l=e.attributes.contactGroup.map(((a,l)=>(0,t.createElement)("div",{key:l,className:"columns"},a.icon?(0,t.createElement)("div",{className:"column non-flex"},(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:a.icon}})):"",(0,t.createElement)("div",{className:"column"},(0,t.createElement)(Pu,{tagName:"p",value:a.text,className:"contact-card__text",onChange:t=>((t,a)=>{let l=[...e.attributes.contactGroup];l[a].text=t,e.setAttributes({contactGroup:l})})(t,l),placeholder:"Add Contact Info",keepPlaceholderOnFocus:!0})))))}return[(0,t.createElement)(Bu,{key:"1"},(0,t.createElement)(_u,null,(0,t.createElement)(xu,null,(0,t.createElement)(ku,{label:"Heading level of the Header",value:e.attributes.titleLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({titleLevel:t})}})),(0,t.createElement)(xu,null,(0,t.createElement)(Su,{label:"Add margin below?",checked:e.attributes.addMargin,onChange:()=>e.setAttributes({addMargin:!e.attributes.addMargin})}))),a,(0,t.createElement)(_u,null,(0,t.createElement)(Eu,{className:"remove-image-button add-quote",onClick:(()=>{let t=[...e.attributes.contactGroup];t.push({icon:"",text:{type:"string",source:"html",selector:".contact-card__text"}}),e.setAttributes({contactGroup:t})}).bind(void 0)},hu("Add Another Contact Info")))),(0,t.createElement)("div",{key:"2",className:"pu-contact-card-editor pu-contact-card"+(e.attributes.addMargin?" pu-contact-card--margin":"")},(0,t.createElement)(Pu,{tagName:e.setAttributes.titleLevel,value:e.attributes.title,className:"contact-card__title",onChange:t=>{e.setAttributes({title:t})},placeholder:"Add Title",keepPlaceholderOnFocus:!0}),(0,t.createElement)("div",{className:"contact-card__content"},l))]},save:e=>{const a=Mu.save();return(0,t.createElement)("div",x({},a,{className:"pu-contact-card"+(e.attributes.addMargin?" pu-contact-card--margin":"")}),e.attributes.title?(0,t.createElement)(Pu.Content,{className:"contact-card__title",tagName:e.attributes.titleLevel,value:e.attributes.title}):"",(0,t.createElement)("div",{className:"contact-card__content"},e.attributes.contactGroup.length>0?e.attributes.contactGroup.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"columns"},e.icon?(0,t.createElement)("div",{className:"column non-flex"},(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:e.icon}})):"",(0,t.createElement)("div",{className:"column"},(0,t.createElement)(Pu.Content,{className:"contact-card__text",tagName:"p",value:e.text}))))):""))}});const{__:Ou}=wp.i18n,{registerBlockType:Du}=wp.blocks,{PanelBody:Vu,PanelRow:Gu,CheckboxControl:Fu,TextareaControl:Zu,SelectControl:qu,TextControl:zu,RadioControl:ju,Button:Wu,Disabled:Yu}=wp.components,{RichText:Xu,InspectorControls:Ku,MediaUploadCheck:Qu,MediaUpload:Ju,InnerBlocks:ed,useBlockProps:td}=wp.blockEditor,{select:ad}=wp.data,ld=[["core/paragraph",{placeholder:"Optional subtext"}]];Du("purdue-blocks/text-hero",{title:Ou("Text Block Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{storyTitle:{type:"string",source:"html",selector:".story-title"},ctaOptionalSub:{type:"string",default:""},hasLink:{type:"boolean",default:!1},ctaUrl:{type:"string",default:""},ctaText:{type:"string",default:""},external:{type:"boolean",default:!1},headerLevel:{type:"string",default:"h1"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},position:{type:"string",default:"left"}},supports:{className:!1,anchor:!0},description:Ou("Adds a large image featured story."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(Ku,null,(0,t.createElement)(Vu,null,(0,t.createElement)(Gu,null,(0,t.createElement)(ju,{label:"Text Box Position",selected:e.attributes.position,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({position:t})}})),(0,t.createElement)(Gu,null,(0,t.createElement)(qu,{label:"Heading Level of the Header",help:"This only changes the HTML tag. The styles will stay the same.",value:e.attributes.headerLevel,options:[{label:"H1",value:"h1"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:t=>{e.setAttributes({headerLevel:t})}})),(0,t.createElement)(Gu,null,(0,t.createElement)(Fu,{label:"Add a CTA link?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(Gu,null,(0,t.createElement)(zu,{label:"Call to action text",value:e.attributes.ctaText,onChange:t=>e.setAttributes({ctaText:t})})):"",e.attributes.hasLink?(0,t.createElement)(Gu,null,(0,t.createElement)(zu,{label:"Link address",value:e.attributes.ctaUrl,onChange:t=>e.setAttributes({ctaUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(Gu,null,(0,t.createElement)(Fu,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(Gu,null,(0,t.createElement)(Zu,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"pu-cta-hero pu-text-hero pu-text-hero-editor"+("right"===e.attributes.position?" pu-text-hero--right":"")},(0,t.createElement)("div",{className:"hero is-medium"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)(Qu,null,(0,t.createElement)(Ju,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"background-image",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{className:"remove-image-button",onClick:a},"Remove image"):""))}})),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)(Xu,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title",onChange:t=>{e.setAttributes({storyTitle:t})},placeholder:"Add header",keepPlaceholderOnFocus:!0}),(0,t.createElement)(ed,{template:ld,templateLock:!1}),e.attributes.hasLink?(0,t.createElement)("div",{className:"read-more-button"},(0,t.createElement)("span",{className:"read-more-button-text"},e.attributes.ctaText),(0,t.createElement)("span",{className:"read-more-button-icon"})):"")))))]},save:e=>{const a=td.save();return(0,t.createElement)("div",x({},a,{className:"pu-cta-hero pu-text-hero"+("right"===e.attributes.position?" pu-text-hero--right":"")}),(0,t.createElement)("div",{className:"hero is-medium"},(0,t.createElement)("div",{className:"hero-body"},(0,t.createElement)("div",{role:e.attributes.altText?"img":"",className:"background-image","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}}),(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"content"},e.attributes.storyTitle?(0,t.createElement)(Xu.Content,{tagName:e.attributes.headerLevel,value:e.attributes.storyTitle,className:"story-title"}):"",(0,t.createElement)(ed.Content,null),e.attributes.hasLink?(0,t.createElement)("a",{className:"read-more-button",href:e.attributes.ctaUrl,target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("span",{className:"read-more-button-text"},e.attributes.ctaText),(0,t.createElement)("span",{className:"read-more-button-icon"})):"")))))}});const{__:rd}=wp.i18n,{registerBlockType:nd}=wp.blocks,{PanelBody:sd,PanelRow:od,CheckboxControl:id,TextareaControl:cd,TextControl:ud,RadioControl:dd,SelectControl:md,Button:bd,Disabled:pd}=wp.components,{InspectorControls:hd,MediaUploadCheck:gd,MediaUpload:vd,useBlockProps:Ed,RichText:fd}=wp.blockEditor,{apiFetch:kd}=wp,{useState:yd}=wp.element;nd("purdue-blocks/purdue-slider",{title:rd("Purdue Slider"),description:rd("Create a slider."),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],edit:e=>{0===e.attributes.cards.length&&e.setAttributes({cards:[{header:"",storyType:"",ctaText:"",ctaLink:"",external:!1,imageURL:"",imageAlt:"",tag:""}]}),0===e.attributes.tabs.length&&e.setAttributes({tabs:[{header:"",subtext:"",ctaText:"",ctaLink:"",external:!1,imageURL:"",imageAlt:""}]}),0===e.attributes.rtb.length&&e.setAttributes({rtb:[{leadText:"",largeText:"",smallText:"",source:"",ctaText:"",ctaLink:"",external:!1}]});const a=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards];a.splice(t,1),e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs];a.splice(t,1),e.setAttributes({tabs:a})}else if("rtb"===e.attributes.type){let a=[...e.attributes.rtb];a.splice(t,1),e.setAttributes({rtb:a})}},l=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards];a[t].imageURL="",a[t].imageAlt="",e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs];a[t].imageURL="",a[t].imageAlt="",e.setAttributes({tabs:a})}},r=(t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].ctaText=t,e.setAttributes({cards:l})}else if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].ctaText=t,e.setAttributes({tabs:l})}else if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].ctaText=t,e.setAttributes({rtb:l})}},n=(t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].ctaLink=t,e.setAttributes({cards:l})}else if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].ctaLink=t,e.setAttributes({tabs:l})}else if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].ctaLink=t,e.setAttributes({rtb:l})}},s=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards];a[t].external=!a[t].external,e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs];a[t].external=!a[t].external,e.setAttributes({tabs:a})}else if("rtb"===e.attributes.type){let a=[...e.attributes.rtb];a[t].external=!a[t].external,e.setAttributes({rtb:a})}},o=(t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].imageURL=t.url,l[a].imageAlt=t.alt,e.setAttributes({cards:l})}else if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].imageURL=t.url,l[a].imageAlt=t.alt,e.setAttributes({tabs:l})}},i=(t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].header=t,e.setAttributes({cards:l})}else if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].header=t,e.setAttributes({tabs:l})}},c=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({tabs:a})}else if("rtb"===e.attributes.type){let a=[...e.attributes.rtb],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({rtb:a})}},u=t=>{if("slider"===e.attributes.type){let a=[...e.attributes.cards],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({cards:a})}else if("tabs"===e.attributes.type){let a=[...e.attributes.tabs],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({tabs:a})}else if("rtb"===e.attributes.type){let a=[...e.attributes.rtb],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({rtb:a})}};let d;if("slider"===e.attributes.type&&e.attributes.cards.length>0){let m=e.attributes.cards.length-1;d=e.attributes.cards.map(((d,b)=>(0,t.createElement)(sd,{key:b,className:"quote-block-details",title:`Slides ${b+1} Details`,initialOpen:!0},(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Media Type",value:d.storyType,onChange:t=>((t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].storyType=t,e.setAttributes({cards:l})}})(t,b)})),(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Title",value:d.header,onChange:e=>i(e,b)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Text",value:d.ctaText,onChange:e=>r(e,b)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Link address",value:d.ctaLink,onChange:e=>n(e,b)})),(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Open link in new tab?",checked:d.external,onChange:()=>s(b)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Story Tag",value:d.tag,onChange:t=>((t,a)=>{if("slider"===e.attributes.type){let l=[...e.attributes.cards];l[a].tag=t,e.setAttributes({cards:l})}})(t,b)})),(0,t.createElement)(od,null,(0,t.createElement)(gd,null,(0,t.createElement)(vd,{onSelect:e=>o(e,b),render:e=>{let{open:a}=e;return""!==d.imageURL?(0,t.createElement)("div",{className:"purdue-blocks-editor-news__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:d.imageAlt,src:d.imageURL})),(0,t.createElement)(bd,{className:"purdue-blocks-editor-feature-story__button",onClick:a},"Select a New Image"),(0,t.createElement)(bd,{className:"bulma-blocks-editor-site-hero__button purdue-news__remove-image-button",onClick:()=>l(b)},"Remove image")):(0,t.createElement)("div",{className:"purdue-blocks-editor-news__container"},(0,t.createElement)("p",{className:"purdue-blocks-editor-news__description"},"Pick an image from the media library."),(0,t.createElement)(bd,{className:"purdue-blocks-editor-feature-story__button",onClick:a},"Open Media Library"))}}))),e.attributes.cards.length>1?(0,t.createElement)("hr",null):"",e.attributes.cards.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this slide:")),bc(b),icon:Ps}):"",b>0?(0,t.createElement)(bd,{className:"remove-image-button move-quote",onClick:()=>u(b),icon:Ms}):""):"",e.attributes.cards.length>1?(0,t.createElement)("hr",null):"",e.attributes.cards.length>1?(0,t.createElement)(od,null,(0,t.createElement)(bd,{className:"remove-image-button remove-quote",onClick:()=>a(b)},"Remove this slide")):"")))}else if("tabs"===e.attributes.type&&e.attributes.tabs.length>0){let l=e.attributes.tabs.length-1;d=e.attributes.tabs.map(((o,i)=>(0,t.createElement)(sd,{key:i,className:"quote-block-details",title:`Slides ${i+1} Details`,initialOpen:!0},(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Text",value:o.ctaText,onChange:e=>r(e,i)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Link address",value:o.ctaLink,onChange:e=>n(e,i)})),(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Open link in new tab?",checked:o.external,onChange:()=>s(i)})),e.attributes.tabs.length>1?(0,t.createElement)("hr",null):"",e.attributes.tabs.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this slide:")),ic(i),icon:Ps}):"",i>0?(0,t.createElement)(bd,{className:"remove-image-button move-quote",onClick:()=>u(i),icon:Ms}):""):"",e.attributes.tabs.length>1?(0,t.createElement)("hr",null):"",e.attributes.tabs.length>1?(0,t.createElement)(od,null,(0,t.createElement)(bd,{className:"remove-image-button remove-quote",onClick:()=>a(i)},"Remove this slide")):"")))}else if("rtb"===e.attributes.type&&e.attributes.rtb.length>0){let l=e.attributes.rtb.length-1;d=e.attributes.rtb.map(((o,i)=>(0,t.createElement)(sd,{key:i,className:"quote-block-details",title:`Slides ${i+1} Details`,initialOpen:!0},e.attributes.hasLead?(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Lead Text",value:o.leadText,onChange:t=>((t,a)=>{if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].leadText=t,e.setAttributes({rtb:l})}})(t,i)})):"",(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Highlighted Text",value:o.largeText,onChange:t=>((t,a)=>{if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].largeText=t,e.setAttributes({rtb:l})}})(t,i)})),(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Small Text",value:o.smallText,onChange:t=>((t,a)=>{if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].smallText=t,e.setAttributes({rtb:l})}})(t,i)})),(0,t.createElement)(od,null,(0,t.createElement)(cd,{label:"Source",value:o.source,onChange:t=>((t,a)=>{if("rtb"===e.attributes.type){let l=[...e.attributes.rtb];l[a].source=t,e.setAttributes({rtb:l})}})(t,i)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Text",value:o.ctaText,onChange:e=>r(e,i)})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Button Link address",value:o.ctaLink,onChange:e=>n(e,i)})),(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Open link in new tab?",checked:o.external,onChange:()=>s(i)})),e.attributes.rtb.length>1?(0,t.createElement)("hr",null):"",e.attributes.rtb.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this slide:")),ic(i),icon:Ps}):"",i>0?(0,t.createElement)(bd,{className:"remove-image-button move-quote",onClick:()=>u(i),icon:Ms}):""):"",e.attributes.rtb.length>1?(0,t.createElement)("hr",null):"",e.attributes.rtb.length>1?(0,t.createElement)(od,null,(0,t.createElement)(bd,{className:"remove-image-button remove-quote",onClick:()=>a(i)},"Remove this slide")):"")))}let m=e.attributes.headerLevel;return[(0,t.createElement)(hd,{key:"1"},(0,t.createElement)(sd,null,(0,t.createElement)(od,null,(0,t.createElement)(dd,{label:"Slider Type",help:"Use the rich text on the page editor to edit the full width cards option",selected:e.attributes.type,options:[{label:"Cards link to stories",value:"slider"},{label:"Full width image and text",value:"tabs"},{label:"RTB cards",value:"rtb"},{label:"Images",value:"img"}],onChange:t=>{e.setAttributes({type:t})}})),(0,t.createElement)(od,null,(0,t.createElement)(md,{label:"Choose a background",value:e.attributes.background,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({background:t})}})),(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Add a header to this region",value:e.attributes.header,onChange:t=>e.setAttributes({header:t})})),e.attributes.header?(0,t.createElement)(od,null,(0,t.createElement)(md,{label:"Heading level of the Header",value:e.attributes.headerLevel,options:[{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"},{label:"P",value:"p"}],onChange:t=>{e.setAttributes({headerLevel:t})}})):"",e.attributes.header?(0,t.createElement)(od,null,(0,t.createElement)(dd,{label:"Choose how to align the header.",selected:e.attributes.headerLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({headerLocation:t})}})):"",(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})),"rtb"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Add Lead Text above Highlighted Text?",checked:e.attributes.hasLead,onChange:()=>e.setAttributes({hasLead:!e.attributes.hasLead})})):"","rtb"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(md,{label:"Choose the number of cards to display on desktop.",value:e.attributes.displayNumber,options:[{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"}],onChange:t=>{e.setAttributes({displayNumber:t})}})):"","img"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(md,{label:"Choose the type of the image.",value:e.attributes.imgType,options:[{label:"Horizontal",value:"horizontal"},{label:"Vertical",value:"vertical"}],onChange:t=>{e.setAttributes({imgType:t})}})):"","img"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Loop the slides?",checked:e.attributes.loop,onChange:()=>e.setAttributes({loop:!e.attributes.loop})})):"","img"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Link the image to the image file?",checked:e.attributes.linkImg,onChange:()=>e.setAttributes({linkImg:!e.attributes.linkImg})})):"","rtb"===e.attributes.type?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Include dividers between cards?",checked:e.attributes.divider,onChange:()=>e.setAttributes({divider:!e.attributes.divider})})):"",(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Add CTA button?",checked:e.attributes.hasLink,onChange:()=>e.setAttributes({hasLink:!e.attributes.hasLink})})),e.attributes.hasLink?(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Link text",value:e.attributes.linkText,onChange:t=>e.setAttributes({linkText:t})})):"",e.attributes.hasLink?(0,t.createElement)(od,null,(0,t.createElement)(ud,{label:"Link URL",value:e.attributes.linkUrl,onChange:t=>e.setAttributes({linkUrl:t})})):"",e.attributes.hasLink?(0,t.createElement)(od,null,(0,t.createElement)(id,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})):"",(0,t.createElement)(od,null,(0,t.createElement)(dd,{label:"Choose how to align the CTA.",selected:e.attributes.ctaLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({ctaLocation:t})}}))),d,"img"!==e.attributes.type?(0,t.createElement)(sd,null,(0,t.createElement)(bd,{className:"remove-image-button add-quote",onClick:(()=>{if("slider"===e.attributes.type){let t=[...e.attributes.cards];t.push({header:"",storyType:"",ctaText:"",ctaLink:"",external:!1,imageURL:"",imageAlt:"",tag:""}),e.setAttributes({cards:t})}else if("tabs"===e.attributes.type){let t=[...e.attributes.tabs];t.push({header:"",subtext:"",ctaText:"",ctaLink:"",external:!1,imageURL:"",imageAlt:""}),e.setAttributes({tabs:t})}else if("rtb"===e.attributes.type){let t=[...e.attributes.rtb];t.push({leadText:"",largeText:"",smallText:"",source:"",ctaText:"",ctaLink:"",external:!1}),e.setAttributes({rtb:t})}}).bind(void 0)},rd("Add Another Slide"))):""),(0,t.createElement)("div",{key:"2",className:"purdue-block-slider-editor"},1===e.attributes.cards.length&&""===e.attributes.cards[0].header&&1===e.attributes.rtb.length&&""===e.attributes.rtb[0].largeText&&1===e.attributes.tabs.length&&""===e.attributes.tabs[0].header&&"img"!==e.attributes.type?(0,t.createElement)("p",{style:{textAlign:"center"}},"Add new items using sidebar."):"",(0,t.createElement)("div",{class:`purdue-slider\n has-${e.attributes.background}-background section is-medium`},(0,t.createElement)("div",{class:"container"},(0,t.createElement)(m,{class:`purdue-slider__header align-${e.attributes.headerLocation}`}," ",e.attributes.header),"slider"===e.attributes.type&&e.attributes.cards.length>0?(0,t.createElement)(pd,null,(0,t.createElement)("div",{class:"glide purdue-slider--default"},(0,t.createElement)("div",{class:"glide__track","data-glide-el":"track"},(0,t.createElement)("div",{class:"glide__slides"},e.attributes.cards.map((e=>(0,t.createElement)("div",{class:"glide__slide card"},e.imageURL?(0,t.createElement)("div",{class:"image is-2by1 background-image",role:"img",style:{backgroundImage:`url(${e.imageURL})`},"aria-label":"card.imageAlt"}):"",(0,t.createElement)("div",{class:"content"},e.storyType?(0,t.createElement)("p",{class:"story-type"},e.storyType):"",(0,t.createElement)("p",{class:"story-title"},e.header),e.ctaLink?(0,t.createElement)("div",{class:"read-more purdue-blocks__button purdue-blocks__button--gold-light purdue-blocks__button--outline"},(0,t.createElement)("span",null,e.ctaText)):"",e.tag?(0,t.createElement)("p",{class:"story-tag"},e.tag):"")))))),(0,t.createElement)("div",{class:"glide__bullets","data-glide-el":"controls[nav]"},e.attributes.cards.map(((e,a)=>(0,t.createElement)("button",{class:"glide__bullet","data-glide-dir":a})))),(0,t.createElement)("div",{class:"glide__arrows","data-glide-el":"controls"},(0,t.createElement)("button",{class:"glide__arrow glide__arrow--left","data-glide-dir":"<"},"prev"),(0,t.createElement)("button",{class:"glide__arrow glide__arrow--right","data-glide-dir":">"},"next")))):"","tabs"===e.attributes.type&&e.attributes.tabs.length>0?(0,t.createElement)("div",{class:"glide purdue-slider--tabs"},(0,t.createElement)("div",{class:"glide__track","data-glide-el":"track"},(0,t.createElement)("div",{class:"glide__slides"},e.attributes.tabs.map(((a,r)=>(0,t.createElement)("div",{class:"glide__slide columns"},(0,t.createElement)("div",{class:"column image-column"},(0,t.createElement)(gd,null,(0,t.createElement)(vd,{onSelect:e=>o(e,r),render:e=>{let{open:n}=e;return""!==a.imageURL?(0,t.createElement)("div",{class:"image background-image",role:"img",style:{backgroundImage:`url(${a.imageURL})`}},(0,t.createElement)(bd,{className:"remove-image-button",onClick:n},"Select a New Image"),(0,t.createElement)(bd,{className:"remove-image-button",onClick:()=>l(r)},"Remove image")):(0,t.createElement)(bd,{className:"remove-image-button",onClick:n},"Open Media Library")}}))),(0,t.createElement)("div",{class:"content column"},(0,t.createElement)(fd,{tagname:"p",value:a.header,className:"story-title",onChange:e=>i(e,r),placeholder:"Header...",keepPlaceholderOnFocus:!0}),(0,t.createElement)(fd,{tagname:"p",value:a.subtext,className:"story-subtext",onChange:t=>((t,a)=>{if("tabs"===e.attributes.type){let l=[...e.attributes.tabs];l[a].subtext=t,e.setAttributes({tabs:l})}})(t,r),placeholder:"Subtext...",keepPlaceholderOnFocus:!0}),a.ctaLink?(0,t.createElement)("div",{class:"purdue-blocks__button purdue-blocks__button--gold-light"},(0,t.createElement)("span",null,a.ctaText)):""))))))):"","rtb"===e.attributes.type&&e.attributes.rtb.length>0?(0,t.createElement)(pd,null,(0,t.createElement)("div",{class:"glide purdue-slider--rtb"+(e.attributes.divider?" has-divider":""),"data-number":e.attributes.displayNumber},(0,t.createElement)("div",{class:"glide__track","data-glide-el":"track"},(0,t.createElement)("div",{class:"glide__slides"},e.attributes.rtb.map((a=>(0,t.createElement)("div",{class:"glide__slide"},(0,t.createElement)("div",{class:"pu-proofpoint "+(e.attributes.hasLead?" pu-proofpoint__has-lead":"")},(0,t.createElement)("div",{class:"container"},a.leadText&&e.attributes.hasLead?(0,t.createElement)("span",{class:"lead-text pu-proofpoint__lead"},a.leadText):"",a.largeText?(0,t.createElement)("span",{class:"large-text pu-proofpoint__highlighted"},a.largeText):"",a.smallText?(0,t.createElement)("span",{class:"small-text pu-proofpoint__content"},a.smallText):"",a.source?(0,t.createElement)("span",{class:"source pu-proofpoint__source"},a.source):"",a.ctaLink?(0,t.createElement)("div",{class:"pu-proofpoint__button purdue-blocks__button purdue-blocks__button--gold-light"},(0,t.createElement)("span",null,a.ctaText)):""))))))),(0,t.createElement)("div",{class:"glide__bullets","data-glide-el":"controls[nav]"},e.attributes.rtb.map(((e,a)=>(0,t.createElement)("button",{class:"glide__bullet","data-glide-dir":a})))),(0,t.createElement)("div",{class:"glide__arrows","data-glide-el":"controls"},(0,t.createElement)("button",{class:"glide__arrow glide__arrow--left","data-glide-dir":"<"},"prev"),(0,t.createElement)("button",{class:"glide__arrow glide__arrow--right","data-glide-dir":">"},"next")))):"","img"===e.attributes.type?(0,t.createElement)(gd,null,(0,t.createElement)(vd,{addToGallery:!0,multiple:!0,gallery:!0,onSelect:t=>{e.setAttributes({imgs:t}),console.log(e.attributes.imgs)},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{class:"image-slider-editor"},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},0===e.attributes.imgs.length?"Select images":"Select new images")),e.attributes.imgs.length>0?(0,t.createElement)(pd,null,(0,t.createElement)("div",{className:`glide purdue-slider--img${e.attributes.loop?" purdue-slider--img-loop":""}${"vertical"===e.attributes.imgType?"purdue-slider--img-vertical":""}`},(0,t.createElement)("div",{class:"glide__track","data-glide-el":"track"},(0,t.createElement)("div",{class:"glide__slides"},e.attributes.imgs.map(((a,l)=>e.attributes.linkImg?(0,t.createElement)("a",{className:"glide__slide",href:a.url,target:"_blank"},(0,t.createElement)("figure",null,(0,t.createElement)("img",{src:a.url,alt:a.alt}),(0,t.createElement)("figcaption",null,a.caption))):(0,t.createElement)("figure",{className:"glide__slide"},(0,t.createElement)("img",{src:a.url,alt:a.alt}),(0,t.createElement)("figcaption",null,a.caption)))))),(0,t.createElement)("div",{class:"glide__bullets","data-glide-el":"controls[nav]"},e.attributes.imgs.map(((e,a)=>(0,t.createElement)("button",{class:"glide__bullet","data-glide-dir":a})))),(0,t.createElement)("div",{class:"glide__arrows","data-glide-el":"controls"},(0,t.createElement)("button",{class:"glide__arrow glide__arrow--left","data-glide-dir":"<"},"prev"),(0,t.createElement)("button",{class:"glide__arrow glide__arrow--right","data-glide-dir":">"},"next")))):"")}})):"",e.attributes.hasLink&&e.attributes.linkUrl?(0,t.createElement)(pd,null,(0,t.createElement)("div",{className:`purdue-slider__button-container align-${e.attributes.ctaLocation}`},(0,t.createElement)("div",{class:"purdue-slider__button purdue-blocks__button "+("black"===e.attributes.background?"purdue-blocks__button--gold-dark":"purdue-blocks__button--gold-light")},(0,t.createElement)("span",null,e.attributes.linkText)))):"")))]}});const{__:wd}=wp.i18n,{registerBlockType:_d}=wp.blocks,{PanelBody:xd,PanelRow:Cd,CheckboxControl:Nd,TextareaControl:Td,TextControl:Ad,RadioControl:Ld,SelectControl:Sd,Button:Bd,Disabled:Hd}=wp.components,{InspectorControls:Ud,MediaUploadCheck:Id,MediaUpload:Pd,useBlockProps:Md}=wp.blockEditor,{apiFetch:$d}=wp,{useState:Rd}=wp.element;_d("purdue-blocks/rtb-cards",{title:wd("Reason to believe cards"),description:wd("Create one or more Reason to believe cards."),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 100"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Bookmark",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",d:"M87.5,9.37V100L50,78.12,12.5,100V9.37A9.38,9.38,0,0,1,21.87,0H78.13A9.38,9.38,0,0,1,87.5,9.37Zm-9.37,1.18A1.18,1.18,0,0,0,77,9.37H23.05a1.18,1.18,0,0,0-1.18,1.18V83.68L50,67.27,78.13,83.68Z",transform:"translate(-12.5 0)"})))),category:"purdue-blocks",keywords:[],edit:e=>{let a;if(0===e.attributes.rtb.length&&e.setAttributes({rtb:[{hasLead:!1,leadText:"",largeText:"",smallText:"",source:"",ctaText:"",ctaLink:"",external:!1}]}),e.attributes.rtb.length>0){let l=e.attributes.rtb.length-1;a=e.attributes.rtb.map(((a,r)=>(0,t.createElement)(xd,{key:r,className:"quote-block-details",title:`Card ${r+1} Details`,initialOpen:!0},(0,t.createElement)(Cd,null,(0,t.createElement)(Nd,{label:"Add a lead text at the top?",checked:a.hasLead,onChange:()=>(t=>{let a=[...e.attributes.rtb];a[t].hasLead=!a[t].hasLead,e.setAttributes({rtb:a})})(r)})),a.hasLead?(0,t.createElement)(Cd,null,(0,t.createElement)(Td,{label:"Lead Text",value:a.leadText,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].leadText=t,e.setAttributes({rtb:l})})(t,r)})):"",(0,t.createElement)(Cd,null,(0,t.createElement)(Td,{label:"Highlighted Text",value:a.largeText,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].largeText=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Td,{label:"Small Text",value:a.smallText,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].smallText=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Td,{label:"Source",value:a.source,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].source=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ad,{label:"Button Text",value:a.ctaText,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].ctaText=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ad,{label:"Button Link address",value:a.ctaLink,onChange:t=>((t,a)=>{let l=[...e.attributes.rtb];l[a].ctaLink=t,e.setAttributes({rtb:l})})(t,r)})),(0,t.createElement)(Cd,null,(0,t.createElement)(Nd,{label:"Open link in new tab?",checked:a.external,onChange:()=>(t=>{let a=[...e.attributes.rtb];a[t].external=!a[t].external,e.setAttributes({rtb:a})})(r)})),e.attributes.rtb.length>1?(0,t.createElement)("hr",null):"",e.attributes.rtb.length>1?(0,t.createElement)("div",null,(0,t.createElement)("h3",null,(0,t.createElement)("b",null,"Reorder this card:")),r(t=>{let a=[...e.attributes.rtb],l=a[t];a[t]=a[t+1],a[t+1]=l,e.setAttributes({rtb:a})})(r),icon:Ps}):"",r>0?(0,t.createElement)(Bd,{className:"remove-image-button move-quote",onClick:()=>(t=>{let a=[...e.attributes.rtb],l=a[t];a[t]=a[t-1],a[t-1]=l,e.setAttributes({rtb:a})})(r),icon:Ms}):""):"",e.attributes.rtb.length>1?(0,t.createElement)("hr",null):"",e.attributes.rtb.length>1?(0,t.createElement)(Cd,null,(0,t.createElement)(Bd,{className:"remove-image-button remove-quote",onClick:()=>(t=>{let a=[...e.attributes.rtb];a.splice(t,1),e.setAttributes({rtb:a})})(r)},"Remove this card")):"")))}return[(0,t.createElement)(Ud,{key:"1"},(0,t.createElement)(xd,null,(0,t.createElement)(Cd,null,(0,t.createElement)(Sd,{label:"Choose a background",value:e.attributes.background,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({background:t})}})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ad,{label:"Add a header",help:"Add a header to this region.",value:e.attributes.header,onChange:t=>e.setAttributes({header:t})})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ld,{label:"Choose how to align the header.",selected:e.attributes.headerLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({headerLocation:t})}})),(0,t.createElement)(Cd,null,(0,t.createElement)(Ad,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})),(0,t.createElement)(Cd,null,(0,t.createElement)(Sd,{label:"Choose the number of clumns to display on desktop.",value:e.attributes.columns,options:[{label:"Auto",value:"auto"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"5",value:"5"},{label:"6",value:"6"}],onChange:t=>{e.setAttributes({columns:t})}})),(0,t.createElement)(Cd,null,(0,t.createElement)(Nd,{label:"Add divider between columns?",checked:e.attributes.divider,onChange:()=>{e.setAttributes({divider:!e.attributes.divider})}}))),a,(0,t.createElement)(xd,null,(0,t.createElement)(Bd,{className:"remove-image-button add-quote",onClick:(()=>{let t=[...e.attributes.rtb];t.push({hasLead:!1,leadText:"",largeText:"",smallText:"",source:"",ctaText:"",ctaLink:"",external:!1}),e.setAttributes({rtb:t})}).bind(void 0)},wd("Add Another Card")))),(0,t.createElement)("div",{key:"2",className:"purdue-block-rtb-cards-editor"},1===e.attributes.rtb.length&&""===e.attributes.rtb[0].largeText?(0,t.createElement)("p",{style:{textAlign:"center"}},"Add items using sidebar."):"",(0,t.createElement)(Hd,null,(0,t.createElement)("div",{class:`purdue-rtb-card-container\n has-${e.attributes.background}-background section is-medium`},(0,t.createElement)("div",{class:"container"},e.attributes.header?(0,t.createElement)("h2",null,e.attributes.header):"",e.attributes.rtb.length>0?(0,t.createElement)("div",{class:"columns"+(e.attributes.divider?" has-divider":"")},e.attributes.rtb.map((a=>(0,t.createElement)("div",{class:`column${"2"===e.attributes.columns?" is-half-desktop is-half-tablet is-full-mobile":""}\n ${"3"===e.attributes.columns?" is-one-third-desktop is-half-tablet is-full-mobile":""}\n ${"4"===e.attributes.columns?" is-one-quarter-desktop is-half-tablet is-full-mobile":""}\n ${"5"===e.attributes.columns?" is-one-fifth-desktop is-half-tablet is-full-mobile":""}\n ${"6"===e.attributes.columns?" is-one-sixth-desktop is-half-tablet is-full-mobile":""}\n `},(0,t.createElement)("div",{class:"pu-proofpoint"+(a.hasLead?" pu-proofpoint__has-lead":"")},(0,t.createElement)("div",{class:"container"},a.leadText&&a.hasLead?(0,t.createElement)("span",{class:"lead-text pu-proofpoint__lead"},a.leadText):"",a.largeText?(0,t.createElement)("span",{class:"large-text pu-proofpoint__highlighted"},a.largeText):"",a.smallText?(0,t.createElement)("span",{class:"small-text pu-proofpoint__content"},a.smallText):"",a.source?(0,t.createElement)("span",{class:"source pu-proofpoint__source"},a.source):"",a.ctaLink?(0,t.createElement)("div",{class:"pu-proofpoint__button purdue-blocks__button purdue-blocks__button--gold-light"},(0,t.createElement)("span",null,a.ctaText)):"")))))):""))))]}});var Od=a(16941),Dd=a(41609),Vd=a.n(Dd);const{Fragment:Gd}=wp.element,{MediaUpload:Fd}=wp.blockEditor,{PanelRow:Zd,Button:qd,TextControl:zd,TextareaControl:jd,CheckboxControl:Wd}=wp.components,{useState:Yd}=wp.element;var Xd=e=>{let{onSave:a,initialState:l={header:"",media:{url:"",alt:""},subtext:"",buttonLabel:"",buttonLink:"",newtab:!1}}=e;const[r,n]=Yd(l.header),[s,o]=Yd(l.media),[i,c]=Yd(l.subtext),[u,d]=Yd(l.buttonLink),[m,b]=Yd(l.buttonLabel),[p,h]=Yd(l.newtab),[g,v]=Yd(!1);let E="Add Image";return Vd()(s.url)||(E="Replace Image"),(0,t.createElement)(Gd,null,g&&(0,t.createElement)("p",{style:{color:"#ff5454",fontWeight:"bold"}},"Please add a header before saving."),(0,t.createElement)(Zd,null,(0,t.createElement)(zd,{label:"Header",onChange:e=>{g&&v(!1),n(e)},value:r})),!Vd()(s.url)&&(0,t.createElement)(Zd,null,(0,t.createElement)("img",{src:s.url})),(0,t.createElement)(Zd,null,(0,t.createElement)(Fd,{onSelect:e=>{o({url:e.url,alt:e.alt})},allowedTypes:["image"],render:e=>{let{open:a}=e;return(0,t.createElement)(qd,{isSecondary:!0,onClick:a},E)}})),(0,t.createElement)(Zd,null,(0,t.createElement)(zd,{label:"Button Label",onChange:e=>{b(e)},value:m})),(0,t.createElement)(Zd,null,(0,t.createElement)(zd,{label:"Button URL",type:"url",onChange:e=>{d(e)},value:u})),(0,t.createElement)(Zd,null,(0,t.createElement)(Wd,{label:"Open link in new tab?",checked:p,onChange:()=>{h(!p)}})),(0,t.createElement)(Zd,null,(0,t.createElement)(qd,{isPrimary:!0,onClick:()=>{r.length<1?v(!0):a({header:r,media:s,subtext:i,buttonLink:u,buttonLabel:m,newtab:p})}},"Save")))};const{__:Kd}=wp.i18n,{registerBlockType:Qd}=wp.blocks,{PanelBody:Jd,PanelRow:em,CheckboxControl:tm,TextareaControl:am,TextControl:lm,RadioControl:rm,SelectControl:nm,Button:sm,Disabled:om,Placeholder:im}=wp.components,{InspectorControls:cm,MediaUploadCheck:um,MediaUpload:dm,useBlockProps:mm,RichText:bm}=wp.blockEditor,{useState:pm,Fragment:hm}=wp.element,{isEmpty:gm}=_;Qd("purdue-blocks/purdue-vertical-slider",{title:Kd("Purdue Vertical Slider"),description:Kd("Create a vertical slider. Can only have one on each page. Please edit the subtext through the the page editor after the slide is added."),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],edit:e=>{const{className:a,setAttributes:l}=e,{background:r,tabs:n,id:s}=e.attributes,[o,i]=pm(!1);return[(0,t.createElement)(cm,{key:"1"},(0,t.createElement)(Jd,null,(0,t.createElement)(em,null,(0,t.createElement)(nm,{label:"Choose a background",value:e.attributes.background,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:t=>{e.setAttributes({background:t})}})),(0,t.createElement)(em,null,(0,t.createElement)(lm,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})}))),(0,t.createElement)(Jd,{title:Kd("Slides")},(0,t.createElement)(em,null,(0,t.createElement)(Od.ReactSortable,{list:n,setList:e=>{const t=[],a=[];n.map((e=>t.push(e.header))),e.map((e=>a.push(e.header))),_.isEqual(t,a)||l({tabs:e})},className:"sortable-posts"},n.map(((e,a)=>(0,t.createElement)(Jd,{initialOpen:!1,key:e.header,title:e.header},(0,t.createElement)(Xd,{initialState:e,onSave:e=>{((e,t)=>{const a=[...n];a[e]=t,l({tabs:a})})(a,e)}}),(0,t.createElement)(sm,{style:{marginTop:"5px"},isSecondary:!0,onClick:()=>{(e=>{const t=n.filter((t=>t.header!==e));l({tabs:t})})(e.header)}},"Remove Item")))))),(o||0===n.length)&&(0,t.createElement)(hm,null,(0,t.createElement)(Xd,{onSave:e=>{i(!1),l({tabs:[...n,e]})}})),(0,t.createElement)("hr",null),(0,t.createElement)(em,null,(0,t.createElement)(sm,{isPrimary:!0,onClick:()=>{i(!0)}},"Add New Slide")))),(0,t.createElement)("div",{key:"2",className:"purdue-block-slider-editor"},gm(n)?(0,t.createElement)(im,null,Kd("Add slides using the sidebar. Please edit the subtext through the the editor after the slide is added.")):(0,t.createElement)("div",{className:"purdue-slider-vertical has-white-background section is-medium"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"vertical-slides-container"},n.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"vertical-slide"+(0===a?" active":"")},(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column image-column"},(0,t.createElement)("div",{className:"image background-image",style:{backgroundImage:`url(${e.media.url})`},"aria-label":e.media.alt})),(0,t.createElement)("div",{className:"column content"},(0,t.createElement)("div",{className:"content-wrap"},(0,t.createElement)("h2",{className:"title"},e.header),(0,t.createElement)(bm,{tagname:"p",value:e.subtext,className:"subtext",onChange:e=>((e,t)=>{const a=[...n];a[t].subtext=e,l({tabs:a})})(e,a),placeholder:"Subtext...",keepPlaceholderOnFocus:!0}),""!==e.buttonLink?(0,t.createElement)("div",{className:"purdue-blocks__button purdue-blocks__button--gold-light"},e.buttonLabel):""))))))),(0,t.createElement)("div",{className:"slider-bullets"},n.map(((e,a)=>(0,t.createElement)("button",{className:"slider-bullet"+(0===a?" active":""),"data-controls":`${a}`,"aria-label":`slide ${a+1}`,onClick:(e,t)=>{e.target.parentElement.querySelectorAll(".slider-bullet").forEach(((e,t)=>{e.classList.remove("active")})),e.target.classList.add("active");let a=e.target.parentElement.previousSibling.querySelectorAll(".vertical-slide");a.forEach(((e,t)=>{e.style.visibility="hidden",e.style.opacity=0})),a[e.target.dataset.controls].style.visibility="inherit",a[e.target.dataset.controls].style.opacity="1"}})))))))]}});const{__:vm}=wp.i18n,{registerBlockType:Em}=wp.blocks,{PanelBody:fm,PanelRow:km,CheckboxControl:ym,TextareaControl:wm,SelectControl:_m,TextControl:xm,RadioControl:Cm,Button:Nm,Disabled:Tm}=wp.components,{RichText:Am,InspectorControls:Lm,MediaUploadCheck:Sm,MediaUpload:Bm,InnerBlocks:Hm,useBlockProps:Um}=wp.blockEditor,{select:Im}=wp.data,Pm=[["core/paragraph",{placeholder:"Optional subtext"}]];Em("purdue-blocks/profile-hero",{title:vm("Profile Hero"),icon:(0,t.createElement)("svg",{id:"Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 87.5"},(0,t.createElement)("defs",null),(0,t.createElement)("g",{id:"Window-maximize",class:"cls-1"},(0,t.createElement)("g",{class:"cls-1"},(0,t.createElement)("path",{class:"color-9c9795",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)"})))),category:"purdue-blocks",keywords:[],attributes:{storyTitle:{type:"string",source:"html",selector:".story-title"},imgUrl:{type:"string",default:""},altText:{type:"string",default:""},position:{type:"string",default:"left"}},supports:{className:!1,anchor:!0},description:vm("Adds a hero with a profile image."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(Lm,null,(0,t.createElement)(fm,null,(0,t.createElement)(km,null,(0,t.createElement)(Cm,{label:"Image Position",selected:e.attributes.position,options:[{label:"Left",value:"left"},{label:"Right",value:"right"}],onChange:t=>{e.setAttributes({position:t})}})),(0,t.createElement)(km,null,(0,t.createElement)(wm,{label:"Hero Image Alt Text",value:e.attributes.altText,onChange:t=>e.setAttributes({altText:t})})))),(0,t.createElement)("div",{className:"pu-profile-hero pu-profile-hero-editor"+("right"===e.attributes.position?" pu-profile-hero--right":"")},(0,t.createElement)("div",{className:"section is-large"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column is-two-fifths-desktop is-full-mobile"},(0,t.createElement)(Sm,null,(0,t.createElement)(Bm,{onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return(0,t.createElement)("div",{className:"background-image image is-1by1",role:"img",style:{backgroundImage:`url(${e.attributes.imgUrl})`},"aria-label":e.attributes.altText},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{className:"remove-image-button",onClick:r},""!==e.attributes.imgUrl?"Select a new image":"Select an image"),""!==e.attributes.imgUrl?(0,t.createElement)("button",{className:"remove-image-button",onClick:a},"Remove image"):""))}}))),(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"pu-profile-hero__content"},(0,t.createElement)(Am,{tagName:"h1",value:e.attributes.storyTitle,className:"story-title",onChange:t=>{e.setAttributes({storyTitle:t})},placeholder:"Add header",keepPlaceholderOnFocus:!0}),(0,t.createElement)(Hm,{template:Pm,templateLock:!1})))))))]},save:e=>{const a=Um.save();return(0,t.createElement)("div",x({},a,{className:"pu-profile-hero "+("right"===e.attributes.position?" pu-profile-hero--right":"")}),(0,t.createElement)("div",{className:"section is-large"},(0,t.createElement)("div",{className:"container"},(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column is-two-fifths-desktop is-full-mobile"},(0,t.createElement)("div",{role:e.attributes.altText?"img":"",className:"background-image image is-1by1","aria-label":e.attributes.altText,style:{backgroundImage:`url(${e.attributes.imgUrl})`}})),(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"pu-profile-hero__content"},e.attributes.storyTitle?(0,t.createElement)(Am.Content,{tagName:"h1",value:e.attributes.storyTitle,className:"story-title"}):"",(0,t.createElement)(Hm.Content,null)))))))}});const{Fragment:Mm}=wp.element,{MediaUpload:$m}=wp.blockEditor,{PanelRow:Rm,Button:Om,TextControl:Dm,TextareaControl:Vm,CheckboxControl:Gm}=wp.components,{useState:Fm}=wp.element;var Zm=e=>{let{onSave:a,initialState:l={title:"",media:{url:"",alt:""},subtext:"",link:"",newtab:!1}}=e;const[r,n]=Fm(l.title),[s,o]=Fm(l.media),[i,c]=Fm(l.subtext),[u,d]=Fm(l.link),[m,b]=Fm(l.newtab),[p,h]=Fm(!1);let g="Add Image";return Vd()(s.url)||(g="Replace Image"),(0,t.createElement)(Mm,null,p&&(0,t.createElement)("p",{style:{color:"#ff5454",fontWeight:"bold"}},"Please add a title before saving."),(0,t.createElement)(Rm,null,(0,t.createElement)(Dm,{label:"Title",onChange:e=>{p&&h(!1),n(e)},value:r})),!Vd()(s.url)&&(0,t.createElement)(Rm,null,(0,t.createElement)("img",{src:s.url})),(0,t.createElement)(Rm,null,(0,t.createElement)($m,{onSelect:e=>{o({url:e.url,alt:e.alt})},allowedTypes:["image"],render:e=>{let{open:a}=e;return(0,t.createElement)(Om,{isSecondary:!0,onClick:a},g)}})),(0,t.createElement)(Rm,null,(0,t.createElement)(Vm,{label:"Subtext",onChange:e=>{c(e)},value:i})),(0,t.createElement)(Rm,null,(0,t.createElement)(Dm,{label:"Button URL",type:"url",onChange:e=>{d(e)},value:u})),(0,t.createElement)(Rm,null,(0,t.createElement)(Gm,{label:"Open link in new tab?",checked:m,onChange:()=>{b(!m)}})),(0,t.createElement)(Rm,null,(0,t.createElement)(Om,{isPrimary:!0,onClick:()=>{r.length<1?h(!0):a({title:r,media:s,subtext:i,link:u,newtab:m})}},"Save")))};window.wp["icons/buildTypes"];const{__:qm}=wp.i18n,{registerBlockType:zm}=wp.blocks,{PanelBody:jm,PanelRow:Wm,CheckboxControl:Ym,TextareaControl:Xm,TextControl:Km,RadioControl:Qm,SelectControl:Jm,Button:eb,Disabled:tb,Placeholder:ab}=wp.components,{InspectorControls:lb,MediaUploadCheck:rb,MediaUpload:nb,useBlockProps:sb}=wp.blockEditor,{useState:ob,Fragment:ib}=wp.element,{isEmpty:cb}=_;zm("purdue-blocks/link-cards",{title:qm("Purdue Link Cards"),description:qm("Create a grid of cards with links."),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],edit:e=>{const{className:a,setAttributes:l}=e,{header:r,headerLocation:n,background:s,tabs:o,id:i,columns:c}=e.attributes,[u,d]=ob(!1);return[(0,t.createElement)(lb,{key:"1"},(0,t.createElement)(jm,null,(0,t.createElement)(Wm,null,(0,t.createElement)(Jm,{label:"Choose a background",value:s,options:[{label:"White",value:"white"},{label:"Black",value:"black"},{label:"Gray",value:"gray"}],onChange:e=>{l({background:e})}})),(0,t.createElement)(Wm,null,(0,t.createElement)(Km,{label:"Add a header",help:"Add a header to this region.",value:r,onChange:e=>l({header:e})})),(0,t.createElement)(Wm,null,(0,t.createElement)(Qm,{label:"Choose how to align the header.",selected:n,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:e=>{l({headerLocation:e})}})),(0,t.createElement)(Wm,null,(0,t.createElement)(Km,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:i,onChange:e=>l({id:e})})),(0,t.createElement)(Wm,null,(0,t.createElement)(Jm,{label:"Number of Columns",value:c,options:[{value:"3",label:"Three Columns"},{value:"4",label:"Four Columns"}],onChange:e=>{l({columns:e})}}))),(0,t.createElement)(jm,{title:qm("Cards")},(0,t.createElement)(Wm,null,(0,t.createElement)(Od.ReactSortable,{list:o,setList:e=>{const t=[],a=[];o.map((e=>t.push(e.title))),e.map((e=>a.push(e.title))),_.isEqual(t,a)||l({tabs:e})},className:"sortable-posts"},o.map(((e,a)=>(0,t.createElement)(jm,{initialOpen:!1,key:e.title,title:e.title},(0,t.createElement)(Zm,{initialState:e,onSave:e=>{((e,t)=>{const a=[...o];a[e]=t,l({tabs:a})})(a,e)}}),(0,t.createElement)(eb,{style:{marginTop:"5px"},isSecondary:!0,onClick:()=>{(e=>{const t=o.filter((t=>t.title!==e));l({tabs:t})})(e.title)}},"Remove Item")))))),(u||0===o.length)&&(0,t.createElement)(ib,null,(0,t.createElement)(Zm,{onSave:e=>{d(!1),l({tabs:[...o,e]})}})),(0,t.createElement)("hr",null),(0,t.createElement)(Wm,null,(0,t.createElement)(eb,{isPrimary:!0,onClick:()=>{d(!0)}},"Add New Card")))),(0,t.createElement)("div",{key:"2",className:"purdue-block-slider-editor"},cb(o)?(0,t.createElement)(ab,null,qm("Add cards using the sidebar.")):(0,t.createElement)(tb,null,(0,t.createElement)("div",{className:`purdue-link-cards has-${s}-background section is-medium`},(0,t.createElement)("div",{className:"container"},r?(0,t.createElement)("h2",{className:`section-header align-${n}`},r):"",(0,t.createElement)("div",{className:"columns is-multiline"},o.map((e=>(0,t.createElement)("div",{className:"column is-half-tablet is-full-mobile"+("4"==c?" is-one-quarter-desktop":" is-one-third-desktop")},(0,t.createElement)("div",{className:"card media link-card"},(0,t.createElement)("div",{className:"image is-16by9 background-image",style:{backgroundImage:`url(${e.media.url})`}}),(0,t.createElement)("div",{classNmae:"media-content"},(0,t.createElement)("p",{className:"title is-4"},e.title),e.subtext?(0,t.createElement)("p",{className:"vertical-subtext"},e.subtext):""))))))))))]}});const{__:ub}=wp.i18n,{registerBlockType:db}=wp.blocks,{PanelBody:mb,PanelRow:bb,CheckboxControl:pb,TextareaControl:hb,TextControl:gb,RadioControl:vb,SelectControl:Eb,Button:fb,Disabled:kb}=wp.components,{InspectorControls:yb,MediaUploadCheck:wb,MediaUpload:_b,useBlockProps:xb,RichText:Cb}=wp.blockEditor;db("purdue-blocks/image-gallery",{title:ub("Image Gallery"),description:ub("Create an image gallery."),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"})),category:"purdue-blocks",keywords:[],edit:e=>[(0,t.createElement)(yb,{key:"1"},(0,t.createElement)(mb,null,(0,t.createElement)(bb,null,(0,t.createElement)(vb,{label:"Choose how to align the header.",selected:e.attributes.headerLocation,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({headerLocation:t})}})),(0,t.createElement)(bb,null,(0,t.createElement)(vb,{label:"Choose how to align the content.",selected:e.attributes.contentAlign,options:[{label:"Left",value:"left"},{label:"Center",value:"center"}],onChange:t=>{e.setAttributes({contentAlign:t})}})),(0,t.createElement)(bb,null,(0,t.createElement)(Eb,{label:"Number of Columns",value:e.attributes.columns,options:[{value:"3",label:"Three Columns"},{value:"4",label:"Four Columns"}],onChange:t=>{e.setAttributes({columns:t})}})),(0,t.createElement)(bb,null,(0,t.createElement)(pb,{label:"Remove space at the bottom?",checked:!e.attributes.hasBottomPadding,onChange:()=>{e.setAttributes({hasBottomPadding:!e.attributes.hasBottomPadding})}})),(0,t.createElement)(bb,null,(0,t.createElement)(gb,{label:"HTML Anchor",help:"Enter a word without spaces to make a unique web address just for this block, called an “anchor.” It must be unique from any other anchors on the page. Then, you’ll be able to link directly to this section of your page.",value:e.attributes.id,onChange:t=>e.setAttributes({id:t})})))),(0,t.createElement)("div",{key:"2",className:"purdue-image-gallery purdue-image-gallery-editor section is-medium"+(e.attributes.hasBottomPadding?"":" no-bottom-padding")},(0,t.createElement)("div",{class:"container"},(0,t.createElement)(Cb,{tagName:"h2",value:e.attributes.header,className:`purdue-image-gallery__header align-${e.attributes.headerLocation}`,onChange:t=>{e.setAttributes({header:t})},placeholder:"Add header (optional)",keepPlaceholderOnFocus:!0}),(0,t.createElement)(Cb,{tagName:"p",value:e.attributes.content,className:`purdue-image-gallery__content align-${e.attributes.contentAlign}`,onChange:t=>{e.setAttributes({content:t})},placeholder:"Add Text (optional)",keepPlaceholderOnFocus:!0}),(0,t.createElement)(wb,null,(0,t.createElement)(_b,{addToGallery:!0,multiple:!0,gallery:!0,onSelect:t=>{e.setAttributes({imgs:t})},render:a=>{let{open:l}=a;return(0,t.createElement)("div",{class:"image-slider-editor"},(0,t.createElement)("div",{class:"buttons-container"},(0,t.createElement)("button",{onClick:l},0===e.attributes.imgs.length?"Select images":"Select new images")),e.attributes.imgs.length>0?(0,t.createElement)("div",{className:"columns is-multiline"},e.attributes.imgs.map(((a,l)=>(0,t.createElement)("div",{className:`column${"4"===e.attributes.columns?" is-one-quarter-widescreen":" is-one-third-widescreen"} is-half-tablet is-full-mobile is-one-third-desktop`},(0,t.createElement)("div",{className:"image-gallery-open"+(a.caption?"":" image-no-caption"),"data-toggle":a.id},(0,t.createElement)("div",{className:"image is-square",role:"img",style:{backgroundImage:`url(${a.url})`},"aria-label":a.alt}),a.caption?(0,t.createElement)("button",{className:"image-modal-button","aria-label":"More information"},(0,t.createElement)("i",{class:"fas fa-plus","aria-hidden":"true"})):""),a.caption?(0,t.createElement)("div",{className:"image-modal-content","data-modal":a.id},(0,t.createElement)("div",{className:"image-modal-close"},(0,t.createElement)("p",null,a.caption)),(0,t.createElement)("button",{className:"image-modal-button","aria-label":"close"},(0,t.createElement)("i",{class:"fas fa-minus","aria-hidden":"true"}))):"")))):"")}}))))]});const{__:Nb}=wp.i18n,{registerBlockType:Tb}=wp.blocks,{PanelBody:Ab,PanelRow:Lb,RangeControl:Sb,CheckboxControl:Bb,TextControl:Hb}=wp.components,{InnerBlocks:Ub,InspectorControls:Ib,RichText:Pb,useBlockProps:Mb}=wp.blockEditor;Tb("purdue-blocks/video-embed",{title:Nb("Video Embed"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"far","data-icon":"ellipsis-h",className:"svg-inline--fa fa-ellipsis-h fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"})),category:"purdue-blocks",keywords:[],attributes:{urlText:{type:"string",default:""}},supports:{className:!1,anchor:!0},description:Nb("Add this block and paste the YouTube video link to embed it."),edit:e=>{const a=e.attributes.urlText.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/),l=!(!a||11!=a[7].length)&&a[7];return[(0,t.createElement)(Ib,null,(0,t.createElement)(Ab,null,(0,t.createElement)(Lb,null,(0,t.createElement)(Hb,{className:"purdue_video_url",placeholder:"YouTube URL",value:e.attributes.urlText,onChange:t=>e.setAttributes({urlText:t})})))),(0,t.createElement)("div",{className:"purdue_video"},(0,t.createElement)("iframe",{title:"",src:`https://www.youtube.com/embed/${l}`,frameborder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",rel:"0",allowfullscreen:!0}))]},save:e=>{const a=Mb.save(),l=e.attributes.urlText.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/),r=!(!l||11!=l[7].length)&&l[7];return(0,t.createElement)("div",x({},a,{className:"purdue_video"}),(0,t.createElement)("iframe",{id:"player",type:"text/html",src:`https://www.youtube.com/embed/${r}?modestbranding=1&rel=0&theme=light&controls=0&enablejsapi=1`,frameborder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",rel:"0",allowfullscreen:!0}),(0,t.createElement)("div",{className:"purdue_video_controls"},(0,t.createElement)("div",{className:"purdue_video_controls_pause"},(0,t.createElement)("div",{className:"purdue_video_controls_pause_share"},(0,t.createElement)("button",{className:"purdue_video_controls_pause_share_share"},(0,t.createElement)("i",{className:"fas fa-share video-embed__share"})," Share"),(0,t.createElement)("button",{id:"play",className:"purdue_video_controls_pause_share_play"},(0,t.createElement)("span",{className:"purdue_video_controls_pause_share_play_border"},(0,t.createElement)("i",{className:"fas fa-play"}),(0,t.createElement)("i",{class:"fas fa-pause hidden"})))),(0,t.createElement)("div",{className:"purdue_video_controls_pause_button"})),(0,t.createElement)("div",{className:"purdue_video_controls_black"},(0,t.createElement)("div",{className:"purdue_video_controls_black_elapsed"}),(0,t.createElement)("div",{className:"purdue_video_controls_black_timeline"},(0,t.createElement)("span",{className:"time_elapsed"})),(0,t.createElement)("div",{className:"purdue_video_controls_black_total"}),(0,t.createElement)("div",{className:"purdue_video_controls_black_volume"},(0,t.createElement)("i",{class:"fas fa-volume-up"}),(0,t.createElement)("i",{class:"fas fa-volume-mute hidden"})),(0,t.createElement)("div",{className:"purdue_video_controls_black_fullscreen"},(0,t.createElement)("i",{class:"fas fa-expand"})))),(0,t.createElement)("div",{class:"modal"},(0,t.createElement)("div",{class:"modal-background"}),(0,t.createElement)("div",{class:"modal-content"},(0,t.createElement)("div",{class:"top_article_data"},(0,t.createElement)("div",{class:"top_article_data_share"},(0,t.createElement)("a",{id:"share_text",class:"top_article_data_share_text ",target:"_blank","aria-label":`Share link https://youtu.be/${r}`,href:`https://youtu.be/${r}`,title:"Share link",rel:"noopener noreferrer"},`https://youtu.be/${r}`),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://www.facebook.com/sharer/sharer.php?u=https://youtu.be/${r}`,title:"Share on Facebook",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-facebook-f"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://www.linkedin.com/sharing/share-offsite/?url=https://youtu.be/${r}`,title:"Share on Linkedin",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-linkedin-in"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://twitter.com/intent/tweet?text=https://youtu.be/${r}`,title:"Share on Twitter",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-twitter"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`mailto:?subject=&body=https://youtu.be/${r}`,title:"{{ Drupal.t('Share via Email') }}",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fas fa-envelope"}))))),(0,t.createElement)("button",{class:"modal-close is-large","aria-label":"close"})))}});const{__:$b}=wp.i18n,{registerBlockType:Rb}=wp.blocks,{Placeholder:Ob,Button:Db,FormFileUpload:Vb,SelectControl:Gb,IconButton:Fb,PanelBody:Zb,PanelRow:qb,Toolbar:zb,BaseControl:jb,TextControl:Wb}=wp.components,{InnerBlocks:Yb,InspectorControls:Xb,RichText:Kb,useBlockProps:Qb}=wp.blockEditor,{Component:Jb,Fragment:ep}=wp.element;Rb("purdue-blocks/icon-group",{title:$b("Icon Group"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"photo-video",className:"svg-inline--fa fa-photo-video fa-w-20 fa-7x",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M144 343.78a48 48 0 1 0 48 48 48 48 0 0 0-48-48zM101.74 213a37 37 0 0 0 52.36 0l78.56-78.44A79.06 79.06 0 0 0 227 17.49c-28.08-23.13-69.54-22.82-99-.86-29.45-22-71-22.3-99.05.89a79.11 79.11 0 0 0-5.77 117.08zM59.42 54.53A29.54 29.54 0 0 1 78.35 48 35.08 35.08 0 0 1 103 58.32l25 24.89 24.93-24.89c12.25-12.15 31.43-13.83 43.58-3.82a31.09 31.09 0 0 1 2.31 46.15l-70.85 70.71-70.87-70.69a31.13 31.13 0 0 1 2.32-46.14zm337.93 305.24l32.27-69.89a24 24 0 1 0-43.54-20.12l-63.7 138h109.27l-36.92 68.58A24 24 0 1 0 437 499.05l75-139.28zm-141.44-72h-27.42l-7.09-14.17a27.36 27.36 0 0 0-25.64-17.76H92.08a27.39 27.39 0 0 0-25.65 17.76l-7 14.21H32a32 32 0 0 0-32 32V480a32 32 0 0 0 32 32h223.91a32 32 0 0 0 32-32V319.79a32 32 0 0 0-32-31.98zm-16 176.23H48V335.79h41.22l13.21-26.73 2.57-5.26h77.83l2.69 5.4 13.24 26.59h41.13zm112-256V68.24L463.83 51v78.58a84 84 0 0 0-16-1.69c-35.34 0-64 21.47-64 48s28.64 48 64 48 64-21.48 64-48V32c0-17.9-13.54-32-29.64-32a28.08 28.08 0 0 0-4.26.33L329.39 23.17c-14.63 2.25-25.5 15.74-25.5 31.66V161.6a83.25 83.25 0 0 0-16-1.7c-35.33 0-64 21.55-64 48.13s28.64 48.13 64 48.13 63.98-21.55 63.98-48.16z",class:""})),category:"purdue-blocks",keywords:[],attributes:{iconGroup:{type:"array",default:[]}},supports:{className:!1,anchor:!0},description:$b("Add a group of icons to be displayed inline."),edit:e=>{let a,l;return 0===e.attributes.iconGroup.length&&e.setAttributes({iconGroup:[{icon:"",iconUrl:""}]}),e.attributes.iconGroup.length&&(a=e.attributes.iconGroup.map(((a,l)=>(0,t.createElement)(ep,{key:l},(0,t.createElement)(Wb,{className:"icon-text",placeholder:"Paste Fontawesome HTML code",value:a.icon,onChange:t=>((t,a)=>{const l=[...e.attributes.iconGroup];l[a].icon=t,e.setAttributes({iconGroup:l})})(t,l)}),(0,t.createElement)(Wb,{className:"icon-url",placeholder:"Link",value:a.iconUrl,onChange:t=>((t,a)=>{const l=[...e.attributes.iconGroup];l[a].iconUrl=t,e.setAttributes({iconGroup:l})})(t,l)}),(0,t.createElement)(Db,{className:"bulma-blocks-editor-site-hero__button is-danger",onClick:()=>(t=>{const a=[...e.attributes.iconGroup];a.splice(t,1),e.setAttributes({iconGroup:a})})(l)},"Remove Icon"),(0,t.createElement)("hr",null)))),l=e.attributes.iconGroup.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"icon-item"},(0,t.createElement)("div",{className:"icon-item-icon-placeholder"},(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:e.icon}})))))),[(0,t.createElement)(Xb,{key:"1"},(0,t.createElement)(Zb,{title:$b("Icons")},a,(0,t.createElement)(Db,{isDefault:!0,onClick:(()=>{const t=[...e.attributes.iconGroup];t.push({icon:"",iconUrl:""}),e.setAttributes({iconGroup:t})}).bind(void 0)},$b("Add Icon")),(0,t.createElement)("hr",null))),(0,t.createElement)("div",{key:"2",className:"icon-group"},l)]},save:e=>{const a=Qb.save(),l=e.attributes.iconGroup.map(((e,a)=>(0,t.createElement)("div",{key:a,className:"icon-item"},(0,t.createElement)("a",{href:e.iconUrl,target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("div",{className:"icon-item-icon-placeholder"},(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:e.icon}}))))));return(0,t.createElement)("div",x({},a,{className:"icon-group"}),l)}});const{__:tp}=wp.i18n,{registerBlockType:ap}=wp.blocks,{withSelect:lp,withDispatch:rp}=wp.data,{PanelBody:np,PanelRow:sp,RangeControl:op,CheckboxControl:ip,TextControl:cp,TextareaControl:up,Button:dp}=wp.components,{useState:mp,Component:bp,Fragment:pp}=wp.element,{InnerBlocks:hp,InspectorControls:gp,RichText:vp,MediaUploadCheck:Ep,MediaUpload:fp,useBlockProps:kp}=wp.blockEditor,yp=lp((e=>{const{getMedia:t,getPostType:a}=e("core"),{getCurrentPostId:l,getEditedPostAttribute:r}=e("core/editor"),n=r("featured_media");return{media:n?t(n):null,currentPostId:l(),postType:a(r("type")),featuredImageId:n,isDisabled:e("core/edit-post").isFeatureActive("disableEditorsKitDragAndDropFeaturedTools")}})).currentPostId;ap("purdue-blocks/podcast",{title:tp("Podcast"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"ellipsis-h",className:"svg-inline--fa fa-podcast fa-w-14 fa-7x",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M267.429 488.563C262.286 507.573 242.858 512 224 512c-18.857 0-38.286-4.427-43.428-23.437C172.927 460.134 160 388.898 160 355.75c0-35.156 31.142-43.75 64-43.75s64 8.594 64 43.75c0 32.949-12.871 104.179-20.571 132.813zM156.867 288.554c-18.693-18.308-29.958-44.173-28.784-72.599 2.054-49.724 42.395-89.956 92.124-91.881C274.862 121.958 320 165.807 320 220c0 26.827-11.064 51.116-28.866 68.552-2.675 2.62-2.401 6.986.628 9.187 9.312 6.765 16.46 15.343 21.234 25.363 1.741 3.654 6.497 4.66 9.449 1.891 28.826-27.043 46.553-65.783 45.511-108.565-1.855-76.206-63.595-138.208-139.793-140.369C146.869 73.753 80 139.215 80 220c0 41.361 17.532 78.7 45.55 104.989 2.953 2.771 7.711 1.77 9.453-1.887 4.774-10.021 11.923-18.598 21.235-25.363 3.029-2.2 3.304-6.566.629-9.185zM224 0C100.204 0 0 100.185 0 224c0 89.992 52.602 165.647 125.739 201.408 4.333 2.118 9.267-1.544 8.535-6.31-2.382-15.512-4.342-30.946-5.406-44.339-.146-1.836-1.149-3.486-2.678-4.512-47.4-31.806-78.564-86.016-78.187-147.347.592-96.237 79.29-174.648 175.529-174.899C320.793 47.747 400 126.797 400 224c0 61.932-32.158 116.49-80.65 147.867-.999 14.037-3.069 30.588-5.624 47.23-.732 4.767 4.203 8.429 8.535 6.31C395.227 389.727 448 314.187 448 224 448 100.205 347.815 0 224 0zm0 160c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64z"})),category:"purdue-blocks",keywords:[],attributes:{isChecked:{type:"boolean",default:!1},urlText:{type:"string",default:""},internalFile:{type:"string",default:""},coverImage:{type:"string",default:""},altText:{type:"string",default:""},podcastName:{type:"string",default:""},shortDescription:{type:"string",default:""},episodeNumber:{type:"string",default:""},episodeTitle:{type:"string",default:""},fullDescription:{type:"string",default:""},listenOnUrls:{type:"array",default:[]}},supports:{className:!1,anchor:!0},description:tp("Add this block and add a Podcast episode."),edit:e=>{const[a,l]=mp(!1);let r,n;return e.attributes.listenOnUrls.length&&(r=e.attributes.listenOnUrls.map(((a,l)=>(0,t.createElement)(pp,{key:l},(0,t.createElement)(cp,{className:"purdue_video_carousel_url",placeholder:"Channel Name",value:e.attributes.listenOnUrls[l].chennelname,onChange:t=>((t,a)=>{const l=[...e.attributes.listenOnUrls];l[a].chennelname=t,e.setAttributes({listenOnUrls:l})})(t,l)}),(0,t.createElement)(cp,{className:"video_carrousel_description",placeholder:"Channel URL",value:e.attributes.listenOnUrls[l].chennelUrl,onChange:t=>((t,a)=>{const l=[...e.attributes.listenOnUrls];l[a].chennelUrl=t,e.setAttributes({listenOnUrls:l})})(t,l)}),(0,t.createElement)(dp,{className:"bulma-blocks-editor-site-hero__button is-danger",onClick:()=>(t=>{const a=[...e.attributes.listenOnUrls];a.splice(t,1),e.setAttributes({listenOnUrls:a})})(l)},"Remove Chennel"),(0,t.createElement)("hr",null)))),n=e.attributes.listenOnUrls.map(((e,a)=>(0,t.createElement)("a",{key:a,className:"item",href:e.chennelUrl,target:"_blank"},e.chennelname)))),[(0,t.createElement)(gp,null,(0,t.createElement)(np,{title:tp("Listen On Chennels")},r,(0,t.createElement)(dp,{isDefault:!0,onClick:(()=>{const t=[...e.attributes.listenOnUrls];t.push({chennelname:"",chennelUrl:""}),e.setAttributes({listenOnUrls:t})}).bind(void 0)},tp("Add Chennel")),(0,t.createElement)("hr",null)),(0,t.createElement)(np,null,(0,t.createElement)(sp,null,(0,t.createElement)(cp,{label:"Espisode Number",value:e.attributes.episodeNumber,onChange:t=>e.setAttributes({episodeNumber:t}),type:"number"})),(0,t.createElement)(sp,null,(0,t.createElement)(Ep,null,(0,t.createElement)("label",null,tp("Cover Image"),(0,t.createElement)(fp,{allowedTypes:["image"],onSelect:t=>{e.setAttributes({coverImage:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:a=>{let{open:l}=a;return""!==e.attributes.coverImage?(0,t.createElement)("div",{className:"bulma-blocks-editor-home-card__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.coverImage})),(0,t.createElement)(dp,{className:"bulma-blocks-editor-home-card__button",onClick:l},"Update Image")):(0,t.createElement)("div",{className:"bulma-blocks-editor-home-card__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-home-card__description"},"Pick an image from the media library."),(0,t.createElement)(dp,{className:"bulma-blocks-editor-home-card__button",onClick:l},"Open Media Library"))}})))),(0,t.createElement)(sp,null,(0,t.createElement)(ip,{label:"Podcast Source",help:"Is the Podcast episode loading from an external source?",checked:e.attributes.isChecked,onChange:t=>{e.setAttributes({isChecked:t})}})),e.attributes.isChecked?(0,t.createElement)(sp,null,(0,t.createElement)(cp,{label:"Podcast URL",value:e.attributes.urlText,onChange:t=>e.setAttributes({urlText:t})})):(0,t.createElement)(sp,null,(0,t.createElement)(Ep,null,(0,t.createElement)("label",null,tp("Podcast File"),(0,t.createElement)(fp,{allowedTypes:["audio"],onSelect:t=>{e.setAttributes({internalFile:t.url})},render:a=>{let{open:l}=a;return""!==e.attributes.internalFile?(0,t.createElement)("div",{className:"bulma-blocks-editor-home-card__preview"},(0,t.createElement)(cp,{value:e.attributes.internalFile,disabled:!0}),(0,t.createElement)(dp,{className:"bulma-blocks-editor-home-card__button",onClick:l},"Update File")):(0,t.createElement)("div",{className:"bulma-blocks-editor-home-card__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-home-card__description"},"Pick a file from the library."),(0,t.createElement)(dp,{className:"bulma-blocks-editor-home-card__button",onClick:l},"Open Media Library"))}})))))),(0,t.createElement)("div",{className:"purdue_podcast"},(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"purdue_podcast_podcast_name"},(0,t.createElement)(vp,{tagName:"h2",label:"Podcast Name",value:e.attributes.podcastName,onChange:t=>e.setAttributes({podcastName:t}),placeholder:tp("Podcast Name")})))),(0,t.createElement)("div",{className:"columns purdue_podcast_desc"},(0,t.createElement)("div",{className:"column is-one-quarter"},(0,t.createElement)("img",{className:"purdue_podcast_episode_cover_image",src:e.attributes.coverImage,alt:e.attributes.altText})),(0,t.createElement)("div",{className:"column is-three-quarters"},(0,t.createElement)("div",{className:"purdue_podcast_episode_short_desc"},(0,t.createElement)(vp,{tagName:"div",multiline:"p",label:"Short Description",value:e.attributes.shortDescription,onChange:t=>e.setAttributes({shortDescription:t}),placeholder:tp("Short Description")})),(0,t.createElement)("div",{className:"purdue_podcast_episode_links"},(0,t.createElement)("strong",null,tp("Listen on: "))," ",n))),(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"purdue_podcast_episode_player"},(0,t.createElement)("div",{className:"purdue_podcast_controls"},(0,t.createElement)("div",{className:"purdue_podcast_controls_pause"},(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_playing"},"NOW PLAYING",(0,t.createElement)("button",{id:"play",className:"purdue_podcast_controls_pause_share_play"},(0,t.createElement)("span",{className:"purdue_podcast_controls_pause_share_play_border"},(0,t.createElement)("i",{className:"fas fa-play"}),(0,t.createElement)("i",{class:"fas fa-pause hidden"})))),(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_button"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black"},(0,t.createElement)("div",{className:"purdue_podcast_controls_black_elapsed"},"00:00:00"),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_timeline"},(0,t.createElement)("span",{className:"time_elapsed"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_total"},"00:00:00"),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_volume"},(0,t.createElement)("i",{class:"fas fa-volume-up"}),(0,t.createElement)("i",{class:"fas fa-volume-mute hidden"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_speed"},(0,t.createElement)("button",{class:"pcast-speed"},"1x")),a?(0,t.createElement)("audio",{src:e.attributes.urlText}):(0,t.createElement)("audio",{src:e.attributes.internalFile}))),(0,t.createElement)("div",{class:"modal"},(0,t.createElement)("div",{class:"modal-background"}),(0,t.createElement)("div",{class:"modal-content"},(0,t.createElement)("div",{class:"top_article_data"},(0,t.createElement)("div",{class:"top_article_data_share"},(0,t.createElement)("a",{id:"share_text",class:"top_article_data_share_text ",target:"_blank","aria-label":`Share link https://youtu.be/${yp}`,href:`https://youtu.be/${yp}`,title:"Share link"},`https://youtu.be/${yp}`),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://www.facebook.com/sharer/sharer.php?u=https://youtu.be/${yp}`,title:"Share on Facebook",target:"_blank"},(0,t.createElement)("i",{class:"fab fa-facebook-f"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://www.linkedin.com/sharing/share-offsite/?url=https://youtu.be/${yp}`,title:"Share on Linkedin",target:"_blank"},(0,t.createElement)("i",{class:"fab fa-linkedin-in"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`https://twitter.com/intent/tweet?text=https://youtu.be/${yp}`,title:"Share on Twitter",target:"_blank"},(0,t.createElement)("i",{class:"fab fa-twitter"})),(0,t.createElement)("a",{class:"top_article_data_share_button",href:`mailto:?subject=&body=https://youtu.be/${yp}`,title:"{{ Drupal.t('Share via Email') }}",target:"_blank"},(0,t.createElement)("i",{class:"fas fa-envelope"}))))),(0,t.createElement)("button",{class:"modal-close is-large","aria-label":"close"}))),(0,t.createElement)("div",{className:"purdue_podcast_episode_box"},(0,t.createElement)("div",{className:"purdue_podcast_episode_number"},tp("Espisode # "),e.attributes.episodeNumber),(0,t.createElement)("div",{className:"purdue_podcast_episode_title"},(0,t.createElement)(vp,{tagName:"h3",value:e.attributes.episodeTitle,onChange:t=>e.setAttributes({episodeTitle:t}),placeholder:tp("Episode Name")})),(0,t.createElement)("div",{className:"purdue_podcast_episode_date"}),(0,t.createElement)("div",{className:"purdue_podcast_full_desc"},(0,t.createElement)(vp,{tagName:"div",multiline:"p",label:"Full Description",value:e.attributes.fullDescription,onChange:t=>e.setAttributes({fullDescription:t}),placeholder:tp("Full Description")})),(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_share"},(0,t.createElement)("button",{className:"purdue_podcast_controls_pause_share_share"},(0,t.createElement)("i",{className:"fas fa-share"})," Share"))))))]},save:e=>{const a=kp.save(),l=e.attributes.listenOnUrls.map(((e,a)=>(0,t.createElement)("a",{key:a,className:"item",href:e.chennelUrl,target:"_blank",rel:"noopener noreferrer"},e.chennelname)));return(0,t.createElement)("div",x({},a,{className:"purdue_podcast"}),(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"purdue_podcast_podcast_name"},(0,t.createElement)(vp.Content,{tagName:"h2",value:e.attributes.podcastName})))),(0,t.createElement)("div",{className:"columns purdue_podcast_desc"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("img",{className:"purdue_podcast_episode_cover_image",src:e.attributes.coverImage,alt:e.attributes.altText}),(0,t.createElement)("div",{className:"purdue_podcast_episode_short_desc"},(0,t.createElement)(vp.Content,{tagName:"div",multiline:"p",value:e.attributes.shortDescription})),(0,t.createElement)("div",{className:"purdue_podcast_episode_links"},(0,t.createElement)("strong",null,tp("Listen on: "))," ",l))),(0,t.createElement)("div",{className:"columns"},(0,t.createElement)("div",{className:"column"},(0,t.createElement)("div",{className:"purdue_podcast_episode_player"},(0,t.createElement)("div",{className:"purdue_podcast_controls"},(0,t.createElement)("div",{className:"purdue_podcast_controls_pause"},(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_playing"},"NOW PLAYING",(0,t.createElement)("button",{id:"play",className:"purdue_podcast_controls_pause_share_play"},(0,t.createElement)("span",{className:"purdue_podcast_controls_pause_share_play_border"},(0,t.createElement)("i",{className:"fas fa-play"}),(0,t.createElement)("i",{class:"fas fa-pause hidden"})))),(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_button"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black"},(0,t.createElement)("div",{className:"purdue_podcast_controls_black_elapsed"},"00:00:00"),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_timeline"},(0,t.createElement)("span",{className:"time_elapsed"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_total"},"00:00:00"),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_volume"},(0,t.createElement)("i",{class:"fas fa-volume-up podcast-volume"}),(0,t.createElement)("i",{class:"fas fa-volume-mute hidden"})),(0,t.createElement)("div",{className:"purdue_podcast_controls_black_speed"},(0,t.createElement)("button",{class:"pcast-speed"},"1x")),e.attributes.isChecked?(0,t.createElement)("audio",{src:e.attributes.urlText}):(0,t.createElement)("audio",{src:e.attributes.internalFile}))),(0,t.createElement)("div",{className:"purdue_podcast_episode_box"},(0,t.createElement)("div",{className:"purdue_podcast_episode_number"},tp("Espisode # "),e.attributes.episodeNumber),(0,t.createElement)("div",{className:"purdue_podcast_episode_title"},(0,t.createElement)(vp.Content,{tagName:"h3",value:e.attributes.episodeTitle})),(0,t.createElement)("div",{className:"purdue_podcast_episode_date"}),(0,t.createElement)("div",{className:"purdue_podcast_full_desc"},(0,t.createElement)(vp.Content,{tagName:"div",multiline:"p",value:e.attributes.fullDescription})),(0,t.createElement)("div",{className:"purdue_podcast_controls_pause_share"},(0,t.createElement)("button",{className:"purdue_podcast_controls_pause_share_share"},(0,t.createElement)("i",{className:"fas fa-share share-icon"})," Share"),(0,t.createElement)("div",{class:"podcast-modal"},(0,t.createElement)("button",{class:"modal-close podcast-modal-close is-large","aria-label":"close"}),(0,t.createElement)("div",{class:"modal-content"},(0,t.createElement)("div",{class:"top_article_data_share"},(0,t.createElement)("span",{id:"share_text",class:"top_article_data_share_text "},"Share"),(0,t.createElement)("a",{class:"top_article_data_share_button facebook_share_button",href:"",title:"Share on Facebook",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-facebook-f"})),(0,t.createElement)("a",{class:"top_article_data_share_button instagram_share_button",href:"",title:"Share on Linkedin",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-linkedin-in"})),(0,t.createElement)("a",{class:"top_article_data_share_button twitter_share_button",href:"",title:"Share on Twitter",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fab fa-twitter"})),(0,t.createElement)("a",{class:"top_article_data_share_button email_share_button",href:"",title:"{{ Drupal.t('Share via Email') }}",target:"_blank",rel:"noopener noreferrer"},(0,t.createElement)("i",{class:"fas fa-envelope"})))))))))))}});const{__:_p}=wp.i18n,{registerBlockType:xp}=wp.blocks,{PanelBody:Cp,PanelRow:Np,CheckboxControl:Tp,TextareaControl:Ap,TextControl:Lp,Button:Sp}=wp.components,{InspectorControls:Bp,MediaUploadCheck:Hp,MediaUpload:Up,useBlockProps:Ip}=wp.blockEditor;xp("purdue-blocks/ad-banner",{title:_p("Banner"),icon:(0,t.createElement)("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"ad",className:"svg-inline--fa fa-ad fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},(0,t.createElement)("path",{fill:"#8E6F3E",d:"M157.52 272h36.96L176 218.78 157.52 272zM352 256c-13.23 0-24 10.77-24 24s10.77 24 24 24 24-10.77 24-24-10.77-24-24-24zM464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM250.58 352h-16.94c-6.81 0-12.88-4.32-15.12-10.75L211.15 320h-70.29l-7.38 21.25A16 16 0 0 1 118.36 352h-16.94c-11.01 0-18.73-10.85-15.12-21.25L140 176.12A23.995 23.995 0 0 1 162.67 160h26.66A23.99 23.99 0 0 1 212 176.13l53.69 154.62c3.61 10.4-4.11 21.25-15.11 21.25zM424 336c0 8.84-7.16 16-16 16h-16c-4.85 0-9.04-2.27-11.98-5.68-8.62 3.66-18.09 5.68-28.02 5.68-39.7 0-72-32.3-72-72s32.3-72 72-72c8.46 0 16.46 1.73 24 4.42V176c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v160z"})),category:"purdue-blocks",keywords:[],attributes:{heading:{type:"string",default:""},link:{type:"string",default:""},imgUrl:{type:"string",default:""},external:{type:"boolean",default:!1}},supports:{className:!1,anchor:!0},description:_p("Create an ad banner."),edit:e=>{const a=()=>{e.setAttributes({imgUrl:""})};return[(0,t.createElement)(Bp,null),(0,t.createElement)("div",{className:"blocks-editor-banner"},(0,t.createElement)("div",{className:"content"},(0,t.createElement)(Lp,{label:"Block Heading",value:e.attributes.heading,onChange:t=>e.setAttributes({heading:t})}),(0,t.createElement)("span",null,"Choose an image."),(0,t.createElement)(Hp,null,(0,t.createElement)(Up,{allowedTypes:["image"],onSelect:t=>{e.setAttributes({imgUrl:t.url,altText:""!==e.attributes.altText?e.attributes.altText:t.alt})},render:l=>{let{open:r}=l;return""!==e.attributes.imgUrl?(0,t.createElement)("div",{className:"bulma-blocks-editor-link-card__preview"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{alt:e.attributes.altText,src:e.attributes.imgUrl})),(0,t.createElement)(Sp,{className:"bulma-blocks-editor-link-card__button",onClick:r},"Select a New Image"),(0,t.createElement)(Sp,{className:"bulma-blocks-editor-link-card__button",onClick:a},"Remove image")):(0,t.createElement)("div",{className:"bulma-blocks-editor-link-card__container"},(0,t.createElement)("p",{className:"bulma-blocks-editor-link-card__description"},"Pick an image from the media library."),(0,t.createElement)(Sp,{className:"bulma-blocks-editor-link-card__button",onClick:r},"Open Media Library"))}})),(0,t.createElement)("hr",null),(0,t.createElement)(Tp,{label:"Open link in new tab?",checked:e.attributes.external,onChange:()=>e.setAttributes({external:!e.attributes.external})})),(0,t.createElement)("div",{className:"content"},(0,t.createElement)("span",null,"Add the link."),(0,t.createElement)("div",{className:"field"},(0,t.createElement)("div",{className:"control"},(0,t.createElement)("input",{value:""!==e.attributes.link?e.attributes.link:"",className:"input",type:"text",placeholder:"Paste permalink or url...",onChange:t=>{e.setAttributes({link:t.target.value})}})))))]},save:e=>{const a=Ip.save();return(0,t.createElement)("div",x({},a,{className:"banner ad-banner"}),(0,t.createElement)("h2",null,(0,t.createElement)("span",null,e.attributes.heading)),(0,t.createElement)("a",{href:e.attributes.link,className:"banner__ad",target:e.attributes.external?"_blank":"_self",rel:"noopener noreferrer"},(0,t.createElement)("figure",{className:"image"},(0,t.createElement)("img",{src:e.attributes.imgUrl,alt:e.attributes.altText}))))}})}()}(); \ No newline at end of file diff --git a/build/editor.0b667f902d3c4dec1bab.asset.php b/build/editor.f67b1671ab8d8ba0dc61.asset.php similarity index 100% rename from build/editor.0b667f902d3c4dec1bab.asset.php rename to build/editor.f67b1671ab8d8ba0dc61.asset.php diff --git a/build/editor.0b667f902d3c4dec1bab.css b/build/editor.f67b1671ab8d8ba0dc61.css similarity index 100% rename from build/editor.0b667f902d3c4dec1bab.css rename to build/editor.f67b1671ab8d8ba0dc61.css diff --git a/build/frontend.0b667f902d3c4dec1bab.asset.php b/build/frontend.f67b1671ab8d8ba0dc61.asset.php similarity index 100% rename from build/frontend.0b667f902d3c4dec1bab.asset.php rename to build/frontend.f67b1671ab8d8ba0dc61.asset.php diff --git a/build/frontend.0b667f902d3c4dec1bab.js b/build/frontend.f67b1671ab8d8ba0dc61.js similarity index 100% rename from build/frontend.0b667f902d3c4dec1bab.js rename to build/frontend.f67b1671ab8d8ba0dc61.js diff --git a/build/style.0b667f902d3c4dec1bab.asset.php b/build/style.f67b1671ab8d8ba0dc61.asset.php similarity index 100% rename from build/style.0b667f902d3c4dec1bab.asset.php rename to build/style.f67b1671ab8d8ba0dc61.asset.php diff --git a/build/style.0b667f902d3c4dec1bab.css b/build/style.f67b1671ab8d8ba0dc61.css similarity index 100% rename from build/style.0b667f902d3c4dec1bab.css rename to build/style.f67b1671ab8d8ba0dc61.css diff --git a/src/image-gallery/block.js b/src/image-gallery/block.js index 1319c9f..5fec4d0 100644 --- a/src/image-gallery/block.js +++ b/src/image-gallery/block.js @@ -182,7 +182,7 @@ registerBlockType( 'purdue-blocks/image-gallery', { {props.attributes.imgs.length>0?
{props.attributes.imgs.map((img, index)=>{ - return
+ return
0){ $output.='
'; - $column_class[] = 'column is-half-tablet is-full-mobile'; + $column_class[] = 'column is-half-tablet is-full-mobile is-one-third-desktop'; if(isset( $attributes['columns'] ) && $attributes['columns'] =="4" ){ - $column_class[] = 'is-one-quarter-desktop'; + $column_class[] = 'is-one-quarter-widescreen'; }else{ - $column_class[] = 'is-one-third-desktop'; + $column_class[] = 'is-one-third-widescreen'; } foreach ( $attributes['imgs'] as $img ) { $output.='
';