/*! This file is auto-generated */ !function(){var e={8294:function(e){ /*! * clipboard.js v2.0.8 * https://clipboardjs.com/ * * Licensed MIT © Zeno Rocha */ var t;t=function(){return function(){var e={134:function(e,t,n){"use strict";n.d(t,{default:function(){return w}});var r=n(279),o=n.n(r),i=n(370),u=n.n(i),c=n(817),s=n.n(c);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var e="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var e=this,t=this.createFakeElement();this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(t),this.selectedText=s()(t),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=s()(this.target),this.copyText()}},{key:"copyText",value:function(){var e;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==a(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}],n&&l(t.prototype,n),r&&l(t,r),e}(),d=f;function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===p(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=u()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new d({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return g("action",e)}},{key:"defaultTarget",value:function(e){var t=g("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return g("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],r=[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],n&&h(t.prototype,n),r&&h(t,r),i}(o()),w=E},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var r=n(828);function o(e,t,n,r,o){var u=i.apply(this,arguments);return e.addEventListener(n,u,o),{destroy:function(){e.removeEventListener(n,u,o)}}}function i(e,t,n,o){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,r,i){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,r,i)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var r=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(r.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},d=1;d<20;++d)s[111+d]="f"+d;for(d=0;d<=9;++d)s[d+96]=d.toString();g.prototype.bind=function(e,t,n){var r=this;return e=e instanceof Array?e:[e],r._bindMultiple.call(r,e,t,n),r},g.prototype.unbind=function(e,t){return this.bind.call(this,e,(function(){}),t)},g.prototype.trigger=function(e,t){var n=this;return n._directMap[e+":"+t]&&n._directMap[e+":"+t]({},e),n},g.prototype.reset=function(){var e=this;return e._callbacks={},e._directMap={},e},g.prototype.stopCallback=function(e,t){if((" "+t.className+" ").indexOf(" mousetrap ")>-1)return!1;if(b(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var n=e.composedPath()[0];n!==e.target&&(t=n)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},g.prototype.handleKey=function(){var e=this;return e._handleKey.apply(e,arguments)},g.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(s[t]=e[t]);c=null},g.init=function(){var e=g(i);for(var t in e)"_"!==t.charAt(0)&&(g[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t))},g.init(),o.Mousetrap=g,e.exports&&(e.exports=g),void 0===(r=function(){return g}.call(t,n,t,e))||(e.exports=r)}function p(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function h(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return s[e.which]?s[e.which]:a[e.which]?a[e.which]:String.fromCharCode(e.which).toLowerCase()}function v(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function m(e,t,n){return n||(n=function(){if(!c)for(var e in c={},s)e>95&&e<112||s.hasOwnProperty(e)&&(c[s[e]]=e);return c}()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function y(e,t){var n,r,o,i=[];for(n=function(e){return"+"===e?["+"]:(e=e.replace(/\+{2}/g,"+plus")).split("+")}(e),o=0;o1?d(e,c,n,r):(u=y(e,r),t._callbacks[u.key]=t._callbacks[u.key]||[],a(u.key,u.modifiers,{type:u.action},o,e,i),t._callbacks[u.key][o?"unshift":"push"]({callback:n,modifiers:u.modifiers,action:u.action,seq:o,level:i,combo:e}))}t._handleKey=function(e,t,n){var r,o=a(e,t,n),i={},f=0,d=!1;for(r=0;r{const o=t(r),i=r.displayName||r.name||"Component";return o.displayName=`${(0,e.upperFirst)((0,e.camelCase)(n))}(${i})`,o}},o=e.flowRight,i=window.wp.element;var u=e=>t((t=>n=>e(n)?(0,i.createElement)(t,n):null),"ifCondition"),c=window.wp.isShallowEqual,s=n.n(c);var a=t((e=>e.prototype instanceof i.Component?class extends e{shouldComponentUpdate(e,t){return!s()(e,this.props)||!s()(t,this.state)}}:class extends i.Component{shouldComponentUpdate(e){return!s()(e,this.props)}render(){return(0,i.createElement)(e,this.props)}}),"pure");function l(){return l=Object.assign||function(e){for(var t=1;t{e.handleEvent(t)}))}};function h(n){return d()("wp.compose.withGlobalEvents",{since:"5.7",alternative:"useEffect"}),t((t=>{class r extends i.Component{constructor(e){super(e),this.handleEvent=this.handleEvent.bind(this),this.handleRef=this.handleRef.bind(this)}componentDidMount(){(0,e.forEach)(n,((e,t)=>{p.add(t,this)}))}componentWillUnmount(){(0,e.forEach)(n,((e,t)=>{p.remove(t,this)}))}handleEvent(e){const t=n[e.type];"function"==typeof this.wrappedRef[t]&&this.wrappedRef[t](e)}handleRef(e){this.wrappedRef=e,this.props.forwardedRef&&this.props.forwardedRef(e)}render(){return(0,i.createElement)(t,l({},this.props.ownProps,{ref:this.handleRef}))}}return(0,i.forwardRef)(((e,t)=>(0,i.createElement)(r,{ownProps:e,forwardedRef:t})))}),"withGlobalEvents")}const v=new WeakMap;function m(e){const t=v.get(e)||0;return v.set(e,t+1),t}function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return(0,i.useMemo)((()=>{if(n)return n;const r=m(e);return t?`${t}-${r}`:r}),[e])}var b=t((e=>t=>{const n=y(e);return(0,i.createElement)(e,l({},t,{instanceId:n}))}),"withInstanceId");var g=t((t=>class extends i.Component{constructor(e){super(e),this.timeouts=[],this.setTimeout=this.setTimeout.bind(this),this.clearTimeout=this.clearTimeout.bind(this)}componentWillUnmount(){this.timeouts.forEach(clearTimeout)}setTimeout(e,t){const n=setTimeout((()=>{e(),this.clearTimeout(n)}),t);return this.timeouts.push(n),n}clearTimeout(t){clearTimeout(t),this.timeouts=(0,e.without)(this.timeouts,t)}render(){const e={...this.props,setTimeout:this.setTimeout,clearTimeout:this.clearTimeout};return(0,i.createElement)(t,e)}}),"withSafeTimeout");function E(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d()("wp.compose.withState",{since:"5.8",alternative:"wp.element.useState"}),t((t=>class extends i.Component{constructor(t){super(t),this.setState=this.setState.bind(this),this.state=e}render(){return(0,i.createElement)(t,l({},this.props,this.state,{setState:this.setState}))}}),"withState")}var w=window.wp.keycodes,k=window.wp.dom;function T(e,t){const n=(0,i.useRef)();return(0,i.useCallback)((t=>{t?n.current=e(t):n.current&&n.current()}),t)}var C=function(){return T((e=>{let t;function n(n){const{keyCode:r,shiftKey:o,target:i}=n;if(r!==w.TAB)return;const u=o?"findPrevious":"findNext",c=k.focus.tabbable[u](i)||null;if(e.contains(c))return;const s=o?"append":"prepend",{ownerDocument:a}=e,l=a.createElement("div");l.tabIndex=-1,e[s](l),l.focus(),t=setTimeout((()=>e.removeChild(l)))}return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n),clearTimeout(t)}}),[])},S=n(8294),L=n.n(S);function x(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4e3;d()("wp.compose.useCopyOnClick",{since:"5.8",alternative:"wp.compose.useCopyToClipboard"});const r=(0,i.useRef)(),[o,u]=(0,i.useState)(!1);return(0,i.useEffect)((()=>{let o;if(e.current)return r.current=new(L())(e.current,{text:()=>"function"==typeof t?t():t}),r.current.on("success",(e=>{let{clearSelection:t,trigger:r}=e;t(),r&&r.focus(),n&&(u(!0),clearTimeout(o),o=setTimeout((()=>u(!1)),n))})),()=>{r.current&&r.current.destroy(),clearTimeout(o)}}),[t,n,u]),o}function D(e){const t=(0,i.useRef)(e);return t.current=e,t}function O(e,t){const n=D(e),r=D(t);return T((e=>{const t=new(L())(e,{text:()=>"function"==typeof n.current?n.current():n.current||""});return t.on("success",(t=>{let{clearSelection:n}=t;n(),e.focus(),r.current&&r.current()})),()=>{t.destroy()}}),[])}function R(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"firstElement";const t=(0,i.useRef)(e);return(0,i.useEffect)((()=>{t.current=e}),[e]),(0,i.useCallback)((e=>{var n,r;if(!e||!1===t.current)return;if(e.contains(null!==(n=null===(r=e.ownerDocument)||void 0===r?void 0:r.activeElement)&&void 0!==n?n:null))return;let o=e;if("firstElement"===t.current){const t=k.focus.tabbable.find(e)[0];t&&(o=t)}o.focus()}),[])}var _=function(e){const t=(0,i.useRef)(null),n=(0,i.useRef)(null),r=(0,i.useRef)(e);return(0,i.useEffect)((()=>{r.current=e}),[e]),(0,i.useCallback)((e=>{if(e){if(t.current=e,n.current)return;n.current=e.ownerDocument.activeElement}else if(n.current){var o,i,u;const e=null===(o=t.current)||void 0===o?void 0:o.contains(null===(i=t.current)||void 0===i?void 0:i.ownerDocument.activeElement);if(null!==(u=t.current)&&void 0!==u&&u.isConnected&&!e)return;var c;if(r.current)r.current();else null===(c=n.current)||void 0===c||c.focus()}}),[])};const M=["button","submit"];function A(t){const n=(0,i.useRef)(t);(0,i.useEffect)((()=>{n.current=t}),[t]);const r=(0,i.useRef)(!1),o=(0,i.useRef)(),u=(0,i.useCallback)((()=>{clearTimeout(o.current)}),[]);(0,i.useEffect)((()=>()=>u()),[]),(0,i.useEffect)((()=>{t||u()}),[t,u]);const c=(0,i.useCallback)((t=>{const{type:n,target:o}=t;(0,e.includes)(["mouseup","touchend"],n)?r.current=!1:function(t){if(!(t instanceof window.HTMLElement))return!1;switch(t.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return(0,e.includes)(M,t.type)}return!1}(o)&&(r.current=!0)}),[]),s=(0,i.useCallback)((e=>{e.persist(),r.current||(o.current=setTimeout((()=>{document.hasFocus()?"function"==typeof n.current&&n.current(e):e.preventDefault()}),0))}),[]);return{onFocus:u,onMouseDown:c,onMouseUp:c,onTouchStart:c,onTouchEnd:c,onBlur:s}}function P(e,t){"function"==typeof e?e(t):e&&e.hasOwnProperty("current")&&(e.current=t)}function I(e){const t=(0,i.useRef)(),n=(0,i.useRef)(!1),r=(0,i.useRef)([]),o=(0,i.useRef)(e);return o.current=e,(0,i.useLayoutEffect)((()=>{!1===n.current&&e.forEach(((e,n)=>{const o=r.current[n];e!==o&&(P(o,null),P(e,t.current))})),r.current=e}),e),(0,i.useLayoutEffect)((()=>{n.current=!1})),(0,i.useCallback)((e=>{P(t,e),n.current=!0;const i=e?o.current:r.current;for(const t of i)P(t,e)}),[])}var N=function(e){const t=(0,i.useRef)();(0,i.useEffect)((()=>{t.current=e}),Object.values(e));const n=C(),r=R(e.focusOnMount),o=_(),u=A((e=>{var n,r;null!==(n=t.current)&&void 0!==n&&n.__unstableOnClose?t.current.__unstableOnClose("focus-outside",e):null!==(r=t.current)&&void 0!==r&&r.onClose&&t.current.onClose()})),c=(0,i.useCallback)((e=>{e&&e.addEventListener("keydown",(e=>{var n;e.keyCode===w.ESCAPE&&!e.defaultPrevented&&null!==(n=t.current)&&void 0!==n&&n.onClose&&(e.preventDefault(),t.current.onClose())}))}),[]);return[I([!1!==e.focusOnMount?n:null,!1!==e.focusOnMount?o:null,!1!==e.focusOnMount?r:null,c]),{...u,tabIndex:"-1"}]};const j=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA"];function F(){const t=(0,i.useRef)(null),n=()=>{t.current&&k.focus.focusable.find(t.current).forEach((t=>{(0,e.includes)(j,t.nodeName)&&t.setAttribute("disabled",""),"A"===t.nodeName&&t.setAttribute("tabindex","-1");const n=t.getAttribute("tabindex");null!==n&&"-1"!==n&&t.removeAttribute("tabindex"),t.hasAttribute("contenteditable")&&t.setAttribute("contenteditable","false")}))},r=(0,i.useCallback)((0,e.debounce)(n,void 0,{leading:!0}),[]);return(0,i.useLayoutEffect)((()=>{let e;return n(),t.current&&(e=new window.MutationObserver(r),e.observe(t.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),r.cancel()}}),[]),t}var U="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function H(e){let{onDragStart:t,onDragMove:n,onDragEnd:r}=e;const[o,u]=(0,i.useState)(!1),c=(0,i.useRef)({onDragStart:t,onDragMove:n,onDragEnd:r});U((()=>{c.current.onDragStart=t,c.current.onDragMove=n,c.current.onDragEnd=r}),[t,n,r]);const s=(0,i.useCallback)((e=>c.current.onDragMove&&c.current.onDragMove(e)),[]),a=(0,i.useCallback)((e=>{c.current.onDragEnd&&c.current.onDragEnd(e),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a),u(!1)}),[]),l=(0,i.useCallback)((e=>{c.current.onDragStart&&c.current.onDragStart(e),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a),u(!0)}),[]);return(0,i.useEffect)((()=>()=>{o&&(document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",a))}),[o]),{startDrag:l,endDrag:a,isDragging:o}}var q=n(7973),z=n.n(q);n(5538);function K(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const{platform:n}=t.navigator;return-1!==n.indexOf("Mac")||(0,e.includes)(["iPad","iPhone"],n)}var V=function(t,n){let{bindGlobal:r=!1,eventName:o="keydown",isDisabled:u=!1,target:c}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=(0,i.useRef)(n);(0,i.useEffect)((()=>{s.current=n}),[n]),(0,i.useEffect)((()=>{if(u)return;const n=new(z())(c&&c.current?c.current:document);return(0,e.castArray)(t).forEach((e=>{const t=e.split("+"),i=new Set(t.filter((e=>e.length>1))),u=i.has("alt"),c=i.has("shift");if(K()&&(1===i.size&&u||2===i.size&&u&&c))throw new Error(`Cannot bind ${e}. Alt and Shift+Alt modifiers are reserved for character input.`);n[r?"bindGlobal":"bind"](e,(function(){return s.current(...arguments)}),o)})),()=>{n.reset()}}),[t,r,o,c,u])};function W(e){const[t,n]=(0,i.useState)((()=>!(!e||"undefined"==typeof window||!window.matchMedia(e).matches)));return(0,i.useEffect)((()=>{if(!e)return;const t=()=>n(window.matchMedia(e).matches);t();const r=window.matchMedia(e);return r.addListener(t),()=>{r.removeListener(t)}}),[e]),!!e&&t}function $(e){const t=(0,i.useRef)();return(0,i.useEffect)((()=>{t.current=e}),[e]),t.current}var G=()=>W("(prefers-reduced-motion: reduce)");const B={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},Z={">=":"min-width","<":"max-width"},Q={">=":(e,t)=>t>=e,"<":(e,t)=>t1&&void 0!==arguments[1]?arguments[1]:">=";const n=(0,i.useContext)(X),r=!n&&`(${Z[t]}: ${B[e]}px)`,o=W(r||void 0);return n?Q[t](B[e],n):o};Y.__experimentalWidthProvider=X.Provider;var J=Y,ee=n(235),te=n.n(ee)(),ne=window.wp.priorityQueue;function re(e,t){const n=[];for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:{step:1};const{step:n=1}=t,[r,o]=(0,i.useState)([]);return(0,i.useEffect)((()=>{let t=re(e,r);t.length{e.length<=i||(o((t=>[...t,...e.slice(i,i+n)])),i+=n,u.add({},c))};return u.add({},c),()=>u.reset()}),[e]),r};var ie=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Change detection";const n=$(e);Object.entries(null!=n?n:[]).forEach((n=>{let[r,o]=n;o!==e[r]&&console.warn(`${t}: ${r} key changed:`,o,e[r])}))},ue=n(9196);function ce(e,t){var n=(0,ue.useState)((function(){return{inputs:t,result:e()}}))[0],r=(0,ue.useRef)(!0),o=(0,ue.useRef)(n),i=r.current||Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n(0,e.debounce)(t,n,r)),[t,n,r]);return(0,i.useEffect)((()=>()=>o.cancel()),[o]),o}function ae(t,n,r){const o=ce((()=>(0,e.throttle)(t,n,r)),[t,n,r]);return(0,i.useEffect)((()=>()=>o.cancel()),[o]),o}function le(e){const t=(0,i.useRef)();return t.current=e,t}function fe(e){let{isDisabled:t,onDrop:n,onDragStart:r,onDragEnter:o,onDragLeave:i,onDragEnd:u,onDragOver:c}=e;const s=le(n),a=le(r),l=le(o),f=le(i),d=le(u),p=le(c);return T((e=>{if(t)return;let n=!1;const{ownerDocument:r}=e;function o(e){n||(n=!0,r.removeEventListener("dragenter",o),r.addEventListener("dragend",v),r.addEventListener("mousemove",v),a.current&&a.current(e))}function i(t){t.preventDefault(),e.contains(t.relatedTarget)||l.current&&l.current(t)}function u(e){!e.defaultPrevented&&p.current&&p.current(e),e.preventDefault()}function c(t){(function(t){const{defaultView:n}=r;if(!(t&&n&&t instanceof n.HTMLElement&&e.contains(t)))return!1;let o=t;do{if(o.dataset.isDropZone)return o===e}while(o=o.parentElement);return!1})(t.relatedTarget)||f.current&&f.current(t)}function h(e){e.defaultPrevented||(e.preventDefault(),e.dataTransfer&&e.dataTransfer.files.length,s.current&&s.current(e),v(e))}function v(e){n&&(n=!1,r.addEventListener("dragenter",o),r.removeEventListener("dragend",v),r.removeEventListener("mousemove",v),d.current&&d.current(e))}return e.dataset.isDropZone="true",e.addEventListener("drop",h),e.addEventListener("dragenter",i),e.addEventListener("dragover",u),e.addEventListener("dragleave",c),r.addEventListener("dragenter",o),()=>{s.current=null,a.current=null,l.current=null,f.current=null,d.current=null,p.current=null,delete e.dataset.isDropZone,e.removeEventListener("drop",h),e.removeEventListener("dragenter",i),e.removeEventListener("dragover",u),e.removeEventListener("dragleave",c),r.removeEventListener("dragend",v),r.removeEventListener("mousemove",v),r.addEventListener("dragenter",o)}}),[t])}function de(){return T((e=>{const{ownerDocument:t}=e;if(!t)return;const{defaultView:n}=t;if(n)return n.addEventListener("blur",r),()=>{n.removeEventListener("blur",r)};function r(){t&&t.activeElement===e&&e.focus()}}),[])}function pe(t,n,r,o){var u,c;const s=null!==(u=null==o?void 0:o.initWindowSize)&&void 0!==u?u:30,a=null===(c=null==o?void 0:o.useWindowing)||void 0===c||c,[l,f]=(0,i.useState)({visibleItems:s,start:0,end:s,itemInView:e=>e>=0&&e<=s});return(0,i.useLayoutEffect)((()=>{var i,u,c,s;if(!a)return;const l=(0,k.getScrollContainer)(t.current),d=e=>{var t;if(!l)return;const i=Math.ceil(l.clientHeight/n),u=e?i:null!==(t=null==o?void 0:o.windowOverscan)&&void 0!==t?t:i,c=Math.floor(l.scrollTop/n),s=Math.max(0,c-u),a=Math.min(r-1,c+i+u);f((e=>{const t={visibleItems:i,start:s,end:a,itemInView:e=>s<=e&&e<=a};return e.start!==t.start||e.end!==t.end||e.visibleItems!==t.visibleItems?t:e}))};d(!0);const p=(0,e.debounce)((()=>{d()}),16);return null==l||l.addEventListener("scroll",p),null==l||null===(i=l.ownerDocument)||void 0===i||null===(u=i.defaultView)||void 0===u||u.addEventListener("resize",p),null==l||null===(c=l.ownerDocument)||void 0===c||null===(s=c.defaultView)||void 0===s||s.addEventListener("resize",p),()=>{var e,t;null==l||l.removeEventListener("scroll",p),null==l||null===(e=l.ownerDocument)||void 0===e||null===(t=e.defaultView)||void 0===t||t.removeEventListener("resize",p)}}),[n,t,r]),(0,i.useLayoutEffect)((()=>{var e,o;if(!a)return;const i=(0,k.getScrollContainer)(t.current),u=e=>{switch(e.keyCode){case w.HOME:return null==i?void 0:i.scrollTo({top:0});case w.END:return null==i?void 0:i.scrollTo({top:r*n});case w.PAGEUP:return null==i?void 0:i.scrollTo({top:i.scrollTop-l.visibleItems*n});case w.PAGEDOWN:return null==i?void 0:i.scrollTo({top:i.scrollTop+l.visibleItems*n})}};return null==i||null===(e=i.ownerDocument)||void 0===e||null===(o=e.defaultView)||void 0===o||o.addEventListener("keydown",u),()=>{var e,t;null==i||null===(e=i.ownerDocument)||void 0===e||null===(t=e.defaultView)||void 0===t||t.removeEventListener("keydown",u)}}),[r,n,t,l.visibleItems]),[l,f]}}(),(window.wp=window.wp||{}).compose=r}();