Sindbad~EG File Manager

Current Path : /var/www/html/portal.sumar.com.py/wp-content/plugins/popup-maker/dist/packages/
Upload File :
Current File : /var/www/html/portal.sumar.com.py/wp-content/plugins/popup-maker/dist/packages/components.js

(()=>{var e={942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=r(e,s(n)))}return e}function s(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=r(t,n));return t}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{CallToActionSelectControl:()=>w,ConfirmDialogue:()=>k,ControlledTabPanel:()=>y,DeviceToggle:()=>N,EntitySelectControl:()=>E,FieldPanel:()=>$,FieldRow:()=>B,FreeFormEditControl:()=>O,FullScreenPanel:()=>H,ListTable:()=>K,PopupSelectControl:()=>J,RadioButtonControl:()=>Q,SearchableMulticheckControl:()=>ee,SmartTokenControl:()=>j,SortDirection:()=>U,TextHighlight:()=>ne,URLControl:()=>re,useControlledState:()=>Z});const e=window.wp.data,t=window.wp.element,a=window.wp.compose,s=window.wp.htmlEntities,r=window.popupMaker.i18n,l=window.popupMaker.coreData;function i(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=i(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}const c=function(){for(var e,t,n=0,o="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=i(e))&&(o&&(o+=" "),o+=t);return o},h=window.wp.components,u=((0,t.forwardRef)(({icon:e,size:n=24,...o},a)=>(0,t.cloneElement)(e,{width:n,height:n,...o,ref:a})),window.wp.primitives),d=window.ReactJSXRuntime,p=(u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,(0,d.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(u.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})})),S=(u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,(0,d.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(u.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})})),m=(u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Circle,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,(0,d.jsx)(u.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(u.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})})),g=(u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,(0,d.jsx)(u.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(u.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})})),P=(u.SVG,u.Path,u.SVG,u.Path,(0,d.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(u.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})})),V=(u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Path,u.Circle,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.G,u.Path,u.Path,u.SVG,u.G,u.Path,u.Path,u.SVG,u.G,u.Path,u.Path,u.SVG,u.G,u.Path,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,(0,d.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(u.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})})),G=(u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,(0,d.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(u.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})})),x=(u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,(0,d.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(u.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})})),v=(u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,(0,d.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(u.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})})),f=(u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.Path,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.Path,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.Path,u.SVG,u.Path,u.Path,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,u.SVG,u.Path,window.popupMaker.utils),b={container:"component-smart-token-control",popover:"component-smart-token-control__suggestions-popover",inputContainer:"component-smart-token-control__input",tokens:"component-smart-token-control__tokens",token:"component-smart-token-control__token",tokenLabel:"component-smart-token-control__token-label",tokenRemove:"component-smart-token-control__token-remove",textInput:"component-smart-token-control__text-input",toggleSuggestions:"component-smart-token-control__toggle",suggestions:"component-smart-token-control__suggestions",suggestion:"component-smart-token-control__suggestion"},_=({id:e,value:n,onChange:o,label:s,placeholder:l=(0,r.__)("Enter a value","popup-maker"),className:i,inputStyles:u={},popoverStyles:p={},tokenOnComma:S=!1,classes:m=b,renderToken:g=e=>(0,d.jsx)(d.Fragment,{children:"string"==typeof e?e:e.item}),renderSuggestion:V=e=>(0,d.jsx)(d.Fragment,{children:e}),onInputChange:G=f.noop,saveTransform:x=e=>e,closeOnSelect:v=!1,hideLabelFromVision:j=!1,extraKeyboardShortcuts:w={},multiple:k=!1,suggestions:C,extraOptions:y=[],messages:N={searchTokens:(0,r.__)("Search","popup-maker"),noSuggestions:(0,r.__)("No suggestions","popup-maker"),removeToken:(0,r.__)("Remove token","popup-maker")}},R)=>{const E={...b,...m},$=(0,a.useInstanceId)(_),B=(0,t.useRef)(null),I=(0,t.useRef)(null),F=(0,t.useRef)(null),[L,T]=(0,t.useState)({inputText:"",isFocused:!1,selectedSuggestion:-1,popoverOpen:!1,refocus:!1}),{inputText:M,isFocused:O,selectedSuggestion:D,popoverOpen:A}=L;function H(e){return"object"==typeof e?e.value:e}function Z(e){return n.some(t=>H(e)===H(t))}function U(e){!function(e){const t=[...new Set(e.map(x).filter(Boolean).filter(e=>!Z(e)))];t.length>0&&o([...n,...t])}([e]),T({...L,inputText:"",selectedSuggestion:-1,popoverOpen:!v&&A})}const q=C.length,z=D>q?0:D;(0,t.useEffect)(()=>{setTimeout(()=>{F.current&&F.current.scrollIntoView()},25)},[D,A]),(0,t.useEffect)(()=>{L.refocus&&(T({...L,refocus:!1}),I.current?.focus())},[L,L.refocus]);const K={up:e=>{e.preventDefault(),T({...L,popoverOpen:0===M.length&&!A||A,selectedSuggestion:(0,f.clamp)(z-1>=0?z-1:q,0,q)})},down:e=>{e.preventDefault(),T({...L,popoverOpen:0===M.length&&!A||A,selectedSuggestion:(0,f.clamp)(z+1<=q?z+1:0,0,q)})},"alt+down":()=>T({...L,popoverOpen:!0}),enter:()=>{if(-1===D)return T({...L,popoverOpen:!1});J(W[z])},escape:e=>{e.preventDefault(),e.stopPropagation(),T({...L,selectedSuggestion:-1,popoverOpen:!1})},",":e=>{S&&(e.preventDefault(),0!==M.length&&U(M))},...w},W=[...C,...y.map(e=>e.label)],J=e=>{const t=y.find(t=>t.label===e);if(t)return t.onSelect?.(),void U(t.value.toString());U(e)},X=A&&I.current&&(W.length>0||y.length>0);return(0,d.jsx)(h.KeyboardShortcuts,{shortcuts:K,children:(0,d.jsxs)("div",{id:e?`${e}-wrapper`:`component-smart-token-control-${$}-wrapper`,className:c([E.container,O&&"is-focused",i]),ref:e=>{B.current=e,R&&"object"==typeof R&&(R.current=e)},onBlur:e=>{e.relatedTarget&&e.relatedTarget.closest(`.${E.popover}`)||T({...L,isFocused:!1,popoverOpen:!1,selectedSuggestion:-1})},children:[(0,d.jsx)(h.BaseControl,{id:e||`component-smart-token-control-${$}`,label:s,hideLabelFromVision:j,__nextHasNoMarginBottom:!0,children:(0,d.jsxs)("div",{className:c([E.inputContainer,!k&&n.length>0&&"input-disabled"]),children:[n.length>0&&(0,d.jsx)("div",{className:E.tokens,children:n.map(e=>(0,d.jsxs)("div",{className:E.token,children:[(0,d.jsx)("div",{className:E.tokenLabel,children:g(e)}),(0,d.jsx)(h.Button,{className:E.tokenRemove,label:N.removeToken,icon:P,onClick:()=>function(e){T({...L,refocus:!0}),o(n.filter(t=>H(t)!==H(e)))}(e)})]},H(e)))}),(0,d.jsx)("input",{id:e||`component-smart-token-control-${$}`,type:"text",className:c([E.textInput]),style:null!=u?u:{},placeholder:l,disabled:!k&&n.length>0,ref:I,value:null!=M?M:"",onChange:e=>{return t=e.target.value,T({...L,inputText:t,selectedSuggestion:-1,popoverOpen:t.length>=1||y.length>0&&0===t.length}),void G(t);var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":e?`${e}-listbox`:`${$}-listbox`,"aria-activedescendant":`sug-${z}`,onFocus:()=>{T({...L,isFocused:!0,popoverOpen:M.length>=1||y.length>0&&(0===C.length||0===M.length)})},onClick:()=>{!A&&(C.length>0||y.length>0)&&T({...L,popoverOpen:!0})},onBlur:e=>{const t=e.relatedTarget;t&&t.closest(`.${E.popover}`)||T({...L,isFocused:!1,popoverOpen:!1,selectedSuggestion:-1})}})]})}),X&&(0,d.jsx)(h.Popover,{focusOnMount:!1,onClose:()=>{T({...L,popoverOpen:!1,selectedSuggestion:-1})},position:"bottom right",anchor:I.current,className:E.popover,style:null!=p?p:{},children:(0,d.jsx)("div",{className:E.suggestions,style:{width:I.current?.clientWidth},children:W.length?W.map((e,t)=>(0,d.jsx)("div",{id:`sug-${t}`,className:c([E.suggestion,t===z&&"is-currently-highlighted",Z(e)&&"is-selected"]),ref:t===z?F:void 0,onFocus:()=>{(e=>{T({...L,selectedSuggestion:e})})(t)},onMouseDown:e=>{e.preventDefault(),J(W[t])},role:"option",tabIndex:t,"aria-selected":t===z,children:V(e)},t)):(0,d.jsx)("div",{children:N.noSuggestions})})})]})})},j=(0,t.forwardRef)(_),w=({id:n,label:o,value:i,onChange:c,placeholder:h,multiple:u=!1,...p})=>{const[S,m]=(0,t.useState)(""),g=(0,a.useDebounce)(e=>{m(e)},300),{suggestions:P=[],isLoading:V=!1}=(0,e.useSelect)(e=>({suggestions:e(l.callToActionStore).getCallToActions()||[],isLoading:e(l.callToActionStore).isResolving("getCallToActions")}),[]),G=e=>P&&P.find(t=>t.id.toString()===e.toString()),x=(0,t.useMemo)(()=>P.filter(e=>e.title.rendered.toLowerCase().includes(S.toLowerCase())),[P,S]),v=i?(Array.isArray(i)?i:[i]).map(e=>e.toString()):[],f=e=>"object"==typeof e?e.value:e;return(0,d.jsx)("div",{className:"pum-object-search-field",children:(0,d.jsx)(j,{id:n,label:o||(0,r.sprintf)(
// translators: %s: entity type.
// translators: %s: entity type.
(0,r.__)("%s(s)","popup-maker"),"Call to Action"),multiple:u,placeholder:h||(0,r.sprintf)(
// translators: %s: entity type.
// translators: %s: entity type.
(0,r.__)("Select %s(s)","popup-maker"),"call to action"),...p,tokenOnComma:!0,value:v,onInputChange:g,onChange:e=>{const t=(u&&!Array.isArray(e)?[e]:e).map(e=>{const t=f(e);if("string"==typeof t&&!t.match(/^\d+$/))return t;const n=parseInt(t,10);return isNaN(n)?null:n}).filter(e=>null!==e);c(u?t:t[0])},renderToken:e=>{var t;const n=G(f(e));return n?(0,s.decodeEntities)(null!==(t=n.title.rendered)&&void 0!==t?t:n.title.raw||n.title.rendered):f(e)},renderSuggestion:e=>{var t;const n=G(e);return n?(0,d.jsx)(d.Fragment,{children:(0,s.decodeEntities)(null!==(t=n.title.rendered)&&void 0!==t?t:n.title.raw||n.title.rendered)}):e},suggestions:x.length?x.map(e=>e.id.toString()).filter(e=>e):[],messages:V?{noSuggestions:(0,r.__)("Searching…","popup-maker")}:void 0})})},k=({message:e,callback:n,onClose:o,isDestructive:a=!1,children:s})=>{const l=(0,t.useRef)(null),i=(0,t.useRef)(null);return(0,t.useEffect)(()=>(l.current?.ownerDocument&&(i.current=l.current.ownerDocument.activeElement),l.current?.focus(),()=>{i.current&&"focus"in i.current&&i.current.focus()}),[n,o]),(e&&e.length||s)&&n?(0,d.jsxs)(h.Modal,{title:(0,r.__)("Confirm Action","popup-maker"),onRequestClose:o,focusOnMount:!1,children:[s||(0,d.jsx)("p",{children:e}),(0,d.jsxs)(h.Flex,{justify:"right",children:[(0,d.jsx)(h.Button,{text:(0,r.__)("Cancel","popup-maker"),onClick:o}),(0,d.jsx)(h.Button,{variant:"primary",text:(0,r.__)("Confirm","popup-maker"),isDestructive:a,ref:l,onClick:()=>{n(),o()}})]})]}):null},C=({tabId:e,onClick:t,children:n,selected:o,...a})=>(0,d.jsx)(h.Button,{role:"tab",tabIndex:o?void 0:-1,"aria-selected":o,id:e,onClick:t,...a,children:n}),y=(0,a.withInstanceId)(({instanceId:e,orientation:t="horizontal",activeClass:n="is-active",tabsClass:o="tabs",tabClass:a="tab",className:s,tabs:r,selected:l,onSelect:i,children:u})=>{var p;const S=r.find(e=>l===e.name)||r[0],m=`${e}-${null!==(p=S?.name)&&void 0!==p?p:"none"}`;return(0,d.jsxs)("div",{className:c(s,"pum-"+t+"-tabs"),children:[(0,d.jsx)(h.NavigableMenu,{role:"tablist",orientation:t,onNavigate:(e,t)=>{t.click()},className:c([o,"components-tab-panel__tabs"]),children:r.map(t=>{var o,s;return(0,d.jsx)(C,{className:c(a,"components-tab-panel__tabs-item","components-tab-panel__tab",t.className,{[n]:t.name===S.name}),tabId:`${e}-${t.name}`,"aria-controls":`${e}-${t.name}-view`,selected:t.name===S.name,onClick:()=>{return e=t.name,void i?.(e);var e},href:null!==(o=t?.href)&&void 0!==o?o:void 0,target:null!==(s=t?.target)&&void 0!==s?s:void 0,children:t.title},t.name)})}),S&&(0,d.jsx)("div",{"aria-labelledby":m,role:"tabpanel",id:`${m}-view`,className:"components-tab-panel__tab-content",tabIndex:0,children:u&&u(S)},m)]})}),N=({label:e,icon:t,isVisible:n,onChange:o=f.noop})=>{const a=n?/* translators: 1. Device type. */ /* translators: 1. Device type. */
(0,r._x)("Show on %1$s","Device toggle option","popup-maker"):/* translators: 1. Device type. */ /* translators: 1. Device type. */
(0,r._x)("Hide on %1$s","Device toggle option","popup-maker"),s=n?"visibility":"hidden",l=()=>o(!n);return(0,d.jsxs)("div",{className:c(["pum__component-device-toggle",n&&"is-checked"]),children:[(0,d.jsxs)("h3",{className:"pum__component-device-toggle__label",children:[(0,d.jsx)(h.Icon,{icon:t}),e]}),(0,d.jsxs)("div",{className:"pum__component-device-toggle__control",children:[(0,d.jsx)(h.Tooltip,{text:(0,r.sprintf)(a,e),children:(0,d.jsx)("span",{children:(0,d.jsx)(h.Icon,{className:"pum__component-device-toggle__control-icon",onClick:l,icon:s})})}),(0,d.jsx)(h.Tooltip,{text:(0,r.sprintf)(a,e),children:(0,d.jsx)("span",{children:(0,d.jsx)(h.ToggleControl,{className:"pum__component-device-toggle__control-input",checked:n,onChange:l,hideLabelFromVision:!0,"aria-label":a,label:(0,r.sprintf)(/* translators: 1. Device type. */ /* translators: 1. Device type. */
(0,r._x)("Show on %1$s","Device toggle option","popup-maker"),e),__nextHasNoMarginBottom:!0})})})]})]})},R=window.wp.coreData,E=({id:n,label:o,value:l,onChange:i,placeholder:c,entityKind:h="postType",entityType:u="post",multiple:p=!1,forceRefresh:S=!1,...m})=>{const[g,P]=(0,t.useState)(""),V=(0,a.useDebounce)(e=>{P(e)},300),{prefill:G=[]}=(0,e.useSelect)(e=>({prefill:l?e(R.store).getEntityRecords(h,u,{context:"view",include:l,per_page:-1}):[]}),[l,h,u,S]),{suggestions:x=[],isSearching:v=!1}=(0,e.useSelect)(e=>({suggestions:e(R.store).getEntityRecords(h,u,{context:"view",search:g,per_page:-1}),isSearching:e("core/data").isResolving("core","getEntityRecords",[h,u,{context:"view",search:g,per_page:-1}])}),[h,u,g,S]),f=e=>x&&x.find(t=>t.id.toString()===e.toString())||G&&G.find(t=>t.id.toString()===e.toString()),b=l?(Array.isArray(l)?l:[l]).map(e=>e.toString()):[],_=e=>"object"==typeof e?e.value:e;return(0,d.jsx)("div",{className:"pum-object-search-field",children:(0,d.jsx)(j,{id:n,label:o||(0,r.sprintf)(
// translators: %s: entity type.
// translators: %s: entity type.
(0,r.__)("%s(s)","popup-maker"),u.replace(/_/g," ").charAt(0).toUpperCase()+u.replace(/_/g," ").slice(1)),multiple:p,placeholder:c||(0,r.sprintf)(
// translators: %s: entity type.
// translators: %s: entity type.
(0,r.__)("Select %s(s)","popup-maker"),u.replace(/_/g," ").toLowerCase()),...m,tokenOnComma:!0,value:b,onInputChange:V,onChange:e=>{const t=e.map(e=>{const t=_(e);if("string"==typeof t&&!t.match(/^\d+$/))return t;const n=parseInt(t,10);return isNaN(n)?null:n}).filter(e=>null!==e);i(p?t:t[0])},renderToken:e=>{var t;const n=f(_(e));return n?"postType"===h?(0,s.decodeEntities)(null!==(t=n.title.rendered)&&void 0!==t?t:n.title.raw):n.name:_(e)},renderSuggestion:e=>{var t;const n=f(e);return n?(0,d.jsx)(d.Fragment,{children:"postType"===h?(0,s.decodeEntities)(null!==(t=n.title.rendered)&&void 0!==t?t:n.title.raw):n.name}):e},suggestions:x?x.map(e=>{var t;return null!==(t=e?.id.toString())&&void 0!==t&&t}):[],messages:v?{noSuggestions:(0,r.__)("Searching…","popup-maker")}:void 0})})},$=({title:e,className:t,children:n})=>(0,d.jsx)(h.Panel,{header:e,className:c(["components-field-panel",t]),children:(0,d.jsx)(h.PanelBody,{opened:!0,children:n})}),B=({id:e,label:t,description:n,className:o,children:a})=>(0,d.jsxs)("div",{className:c(["components-field-row",o]),children:[(0,d.jsxs)("div",{className:"components-base-control",children:[(0,d.jsx)("label",{htmlFor:e,className:"components-truncate components-text components-input-control__label",children:t}),(0,d.jsx)("p",{className:"components-base-control__help",children:n})]}),(0,d.jsx)("div",{className:"components-base-control__field",children:a})]}),I=window.wp.keycodes,{wp:F,tinymce:L,wpEditorL10n:T={tinymce:{baseURL:"",suffix:"",settings:{}}}}=window,M=e=>{const n=(0,a.useInstanceId)(M),{label:o,value:s,onChange:l=f.noop,className:i,minHeight:u=100}=e,p=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{if(!p.current)return;const e=L.get(`editor-${n}`),t=e?.getContent();t!==s&&e.setContent(s||"")},[s,n]),(0,t.useEffect)(()=>{const{baseURL:e,suffix:t}=T.tinymce;function o(e){let t;s&&e.on("loadContent",()=>e.setContent(s)),e.on("blur",()=>{t=e.selection.getBookmark(2,!0);const n=document.querySelector(".interface-interface-skeleton__content"),o=n?.scrollTop;return l(e.getContent()),e.once("focus",()=>{t&&(e.selection.moveToBookmark(t),n&&n?.scrollTop!==o&&(n.scrollTop=o||0))}),!1}),e.on("mousedown touchstart",()=>{t=null});const n=(0,a.debounce)(()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,l(t))},250);e.on("Paste Change input Undo Redo",n),e.on("remove",n.cancel),e.on("keydown",e=>{I.isKeyboardEvent.primary(e,"z")&&e.stopPropagation();const{altKey:t}=e;t&&e.keyCode===I.F10&&e.stopPropagation()}),e.on("init",()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())})}function r(){const{settings:e}=T.tinymce;F.oldEditor.initialize(`editor-${n}`,{tinymce:{...e,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${n}`,setup:o}})}function i(){"complete"===document.readyState&&r()}return p.current=!0,L.EditorManager.overrideDefaults({base_url:e,suffix:t}),"complete"===document.readyState?r():document.addEventListener("readystatechange",i),()=>{document.removeEventListener("readystatechange",i),F.oldEditor.remove(`editor-${n}`)}},[]),(0,d.jsxs)(h.BaseControl,{id:`freeform-edit-control-${n}`,label:o,className:c(["component-freeform-edit-control",i]),__nextHasNoMarginBottom:!0,children:[(0,d.jsx)("div",{id:`toolbar-${n}`,className:"block-library-classic__toolbar",onClick:function(){const e=L.get(`editor-${n}`);e&&e.focus()},onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},"data-placeholder":(0,r.__)("Click here to edit this text.","popup-maker")},"toolbar"),(0,d.jsx)("div",{id:`editor-${n}`,style:{minHeight:u},className:"wp-block-freeform block-library-rich-text__tinymce"},"editor")]})},O=M;var D=n(942),A=n.n(D);const H=e=>{const{className:n,children:o}=e,[a,s]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const e=document.querySelector("html");a?e?.classList.add("disable-scroll"):e?.classList.remove("disable-scroll")},[a]),(0,d.jsxs)("div",{className:A()("fullscreen-panel",n,{"is-full-screen":a}),children:[(0,d.jsx)("button",{onClick:()=>{s(!a)},className:A()("maximize-fullscreen-panel","dashicons",a?"dashicons dashicons-no-alt":"dashicons-editor-expand")}),o]})};function Z(e,n,o){const[a,s]=(0,t.useState)(null!=e?e:n),r=(0,t.useRef)(void 0!==e),l=r.current,i=void 0!==e,c=(0,t.useRef)(a);l!==i&&console.warn(`WARN: A component changed from ${l?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}.`),r.current=i;const h=(0,t.useCallback)((e,...t)=>{const n=(e,...t)=>{o&&(Object.is(c.current,e)||o(e,...t)),i||(c.current=e)};"function"==typeof e?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),s((o,...a)=>{const s=e(i?c.current:o,...a);return n(s,...t),i?o:s})):(i||s(e),n(e,...t))},[i,o]);return i?c.current=e:e=a,[e,h]}let U=function(e){return e.ASC="ASC",e.DESC="DESC",e}({});const q=window.React,z=({heading:e=!1,children:t,...n})=>e?(0,d.jsx)("th",{...n,children:t}):(0,d.jsx)("td",{...n,children:t}),K=({items:e,columns:n,sortableColumns:o=[],idCol:a="id",rowClasses:s=e=>[`item-${e.id}`],renderCell:l=(e,t)=>t[e],noItemsText:i=(0,r.__)("No items found.","popup-maker"),showBulkSelect:u=!0,className:m,selectedItems:g=[],onSelectItems:P=()=>{},onSort:V,initialSort:G})=>{var x;const v={[a]:null!==(x=n[a])&&void 0!==x?x:"",...n},f=Object.keys(v).length,[b,_]=Z(g,[],P);(0,t.useEffect)(()=>{P(b)},[b,P]);const j=({header:t=!1})=>(0,d.jsx)(d.Fragment,{children:Object.entries(v).map(([n,s])=>{var r;const l=u&&n===a,i=G?.orderby===n,m=!l&&o.indexOf(n)>=0,g={key:n,heading:!l,id:t&&!l?n:void 0,scope:l?void 0:"col",className:c([`column-${n}`,...!l&&m?["sortable",null!==(r=G?.order)&&void 0!==r?r:U.ASC]:[],l&&"check-column"])},P=()=>(0,d.jsx)(d.Fragment,{children:"function"==typeof s?s():(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{children:s}),i&&(0,d.jsx)(h.Icon,{icon:G?.order===U.ASC?S:p,size:16})]})});return(0,q.createElement)(z,{...g,key:n},l&&(0,d.jsx)(h.CheckboxControl,{onChange:t=>_(t?e.map(e=>e.id):[]),checked:b.length>0&&b.length===e.length,indeterminate:b.length>0&&b.length<e.length,__nextHasNoMarginBottom:!0}),!l&&m&&(0,d.jsx)(h.Button,{variant:"link",onClick:()=>{if(V){let e;e=G?.orderby===n&&G.order===U.ASC?U.DESC:U.ASC,V(n,e)}},children:(0,d.jsx)(P,{})}),!l&&!m&&(0,d.jsx)(P,{}))})});return(0,d.jsxs)("table",{className:c([m,"component-list-table","list-table",0===e.length&&"no-items"]),children:[(0,d.jsx)("thead",{children:(0,d.jsx)("tr",{children:(0,d.jsx)(j,{header:!0})})}),(0,d.jsx)("tbody",{children:e.length?e.map((e,t)=>(0,d.jsx)("tr",{className:c(s(e)),children:Object.entries(v).map(([n])=>{const o=n===a;return(0,d.jsx)(z,{heading:o,className:c([`column-${n}`,u&&o&&"check-column"]),scope:o?"row":void 0,children:o?(0,d.jsx)(h.CheckboxControl,{onChange:t=>{const n=t?[...b,e.id]:b.filter(t=>t!==e.id);_(n)},checked:b.indexOf(e.id)>=0,__nextHasNoMarginBottom:!0}):l(n,e,t)},n)})},e.id)):(0,d.jsx)("tr",{children:(0,d.jsx)("td",{colSpan:f,children:i})})}),(0,d.jsx)("tfoot",{children:(0,d.jsx)("tr",{children:(0,d.jsx)(j,{})})})]})},{popups:W}=window.popupMakerComponents,J=({onChange:e,value:t,label:n=(0,r.__)("Select Popup","popup-maker"),emptyValueLabel:o=(0,r.__)("Choose a popup","popup-maker"),hideLabelFromVision:a=!1,multiple:s=!1,required:l=!1,options:i=[{value:"",label:o},...W.map(({ID:e,post_title:t})=>({value:`${e}`,label:t}))],...u})=>(0,d.jsx)(h.SelectControl,{label:n,hideLabelFromVision:a,className:c("pum-component-popup-select-control",s&&"pum-popup-select-control--multiple"),options:i,required:l,...s?{multiple:!0,value:t,onChange:e}:{value:t,onChange:e},...u,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),X=({id:e,label:t,value:n,onChange:o,className:s,options:r=[],orientation:l="horizontal",equalWidth:i=!1,spacing:u,hideLabelFromVision:p=!1})=>{const S=(0,a.useInstanceId)(X);return(0,d.jsx)(h.BaseControl,{id:e||`radio-button-control-${S}`,label:t,className:c("components-radio-button-control",l,i&&"equal-width",s),hideLabelFromVision:p,__nextHasNoMarginBottom:!0,children:(0,d.jsx)("div",{className:"options",style:u?{gap:`${u}px`}:void 0,children:r.map(({label:e,value:t})=>(0,d.jsx)(h.Button,{variant:t===n?"primary":"secondary",onClick:()=>o(t),children:e},t))})})},Q=X,Y=({label:e="",placeholder:n="",searchIcon:o,value:s=[],options:l=[],onChange:i=()=>{},className:u=""})=>{const p=(0,a.useInstanceId)(Y),[S,P]=(0,t.useState)(""),[V,G]=(0,t.useState)("ASC"),x=e=>-1!==s.indexOf(e),v=e=>i(x(e)?[...s.filter(t=>t!==e)]:[...s,e]),f=l.filter(({label:e,value:t,keywords:n})=>e.includes(S)||"string"==typeof t&&t.includes(S)||n&&n.includes(S)),b=f.sort((e,t)=>"ASC"===V?e.label>t.label?1:-1:t.label>e.label?1:-1);return(0,d.jsxs)(h.BaseControl,{id:`searchable-multicheck-control-${p}`,label:e,className:c(["component-searchable-multicheck-control",u]),__nextHasNoMarginBottom:!0,children:[(0,d.jsxs)("div",{className:"select-actions",children:[(0,d.jsx)(h.Button,{variant:"link",text:(0,r.__)("Select All","popup-maker"),onClick:()=>{const e=f.map(({value:e})=>e),t=[...s,...e];i([...new Set(t)])}}),(0,d.jsx)(h.Button,{variant:"link",text:(0,r.__)("Deselect All","popup-maker"),onClick:()=>{const e=f.map(({value:e})=>e),t=[...s.filter(t=>-1===e.indexOf(t))];i([...new Set(t)])}})]}),(0,d.jsxs)("div",{className:c([o?"icon-input":null]),children:[(0,d.jsx)("input",{type:"text",className:"components-text-control__input",placeholder:n,value:S,onChange:e=>P(e.target.value)}),o&&(0,d.jsx)(h.Icon,{icon:o})]}),(0,d.jsxs)("table",{children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"label-column",children:(0,d.jsx)(h.Button,{text:(0,r.__)("Name","popup-maker"),onClick:()=>G("DESC"===V?"ASC":"DESC"),icon:"DESC"===V?g:m,iconPosition:"right"})}),(0,d.jsx)("td",{className:"cb-column"})]})}),(0,d.jsx)("tbody",{children:b.map(({label:e,value:t})=>(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:(0,d.jsx)("span",{role:"button",tabIndex:-1,onClick:()=>v(t),onKeyDown:()=>{},children:e})}),(0,d.jsx)("th",{className:"cb-column",children:(0,d.jsx)(h.CheckboxControl,{checked:x(t),onChange:()=>v(t),__nextHasNoMarginBottom:!0})})]},t.toString()))})]})]})},ee=Y,te=window.lodash,ne=e=>{const{text:n="",highlight:o=""}=e,a=(Array.isArray(o)?o:[o]).map(e=>e.trim()).filter(e=>!!e).map(e=>(0,te.escapeRegExp)(e));if(!a.length)return(0,d.jsx)(d.Fragment,{children:n});const s=new RegExp(`(${a.join("|")})`,"gi");return(0,t.createInterpolateElement)(n.replace(s,"<mark>$&</mark>"),{mark:(0,d.jsx)("mark",{})})},oe=(0,t.forwardRef)(({icon:e,title:t,info:n,type:o,className:a,isSelected:s,onFocus:r=f.noop,onSelect:l=f.noop,...i},u)=>(0,d.jsxs)(h.Button,{type:"button",className:c(["suggestion",s&&"is-selected",a]),ref:u,onClick:l,onFocus:r,onMouseOver:r,"aria-selected":s,role:"option",tabIndex:-1,...i,children:[e&&(0,d.jsx)(h.Icon,{icon:e,className:"suggestion-item-icon"}),(0,d.jsxs)("span",{className:"suggestion-item-header",children:[(0,d.jsx)("span",{className:"suggestion-item-title",children:t}),n&&(0,d.jsx)("span",{"aria-hidden":"true",className:"suggestion-item-info",children:n})]}),o&&(0,d.jsx)("span",{className:"suggestion-item-type",children:o})]})),ae={id:-1,title:"",url:"",type:(0,r.__)("URL","popup-maker")},se=({id:n,label:o,value:s,onChange:i=()=>{},className:u=""},p)=>{var S,m;const g=(0,a.useInstanceId)(se),P=(0,t.useRef)(null),f=(0,t.useRef)(null),b=(0,t.useRef)(null),_=(0,t.useRef)(null),j=(0,t.useRef)(null),w=(0,t.useRef)([]);(0,t.useImperativeHandle)(p,()=>b.current,[b]);const k="string"==typeof s?{...ae,url:s}:null!=s?s:ae,C={value:k,query:null!==(S=k.url)&&void 0!==S?S:"",isEditing:!1,isFocused:!1,selected:-1,showSuggestions:!1},[y,N]=(0,t.useState)(C),{value:R,query:E,isFocused:$,isEditing:B,selected:I,showSuggestions:F}=y,L=n||`url-input-control-${g}`,T=`url-input-control-suggestions-${g}`,M=`url-input-${g}-sug-`,{unfilteredSuggestions:O,isFetchingSuggestions:D}=(0,e.useSelect)(e=>({unfilteredSuggestions:e(l.urlSearchStore).getSuggestions(),isFetchingSuggestions:e(l.urlSearchStore).isResolving("updateSuggestions")}),[]),{updateSuggestions:A}=(0,e.useDispatch)(l.urlSearchStore),H=(0,te.debounce)(A,200,{leading:!0}),Z=e=>N({...y,selected:e}),U=e=>{const t={...y,value:{...R,...e},query:"",isEditing:!1,isFocused:!0,selected:-1,showSuggestions:!1};N(t)};(0,t.useEffect)(()=>{k.url!==R.url&&i(R)},[R,k.url,i]),(0,t.useEffect)(()=>{$&&(B?b.current?.focus():j.current?.focus())},[B,$]);const q=(0,t.useMemo)(()=>O.filter((e,t)=>{const n=O.findIndex(t=>e.id===t.id);return n===t}),[O]).slice(0,10),z=q.length,K=I>z?0:I,W={up:()=>N({...y,showSuggestions:0===E.length&&!F||F,selected:(0,te.clamp)(K-1>=0?K-1:z,0,z)}),down:()=>{N({...y,showSuggestions:0===E.length&&!F||F,selected:(0,te.clamp)(K+1<=z?K+1:0,0,z)})},"alt+down":()=>N({...y,showSuggestions:!0}),enter:e=>{e.preventDefault(),F&&K>-1&&K!==z?U(q[K]):R.url===E?N({...y,isEditing:!1,query:"",showSuggestions:!1,selected:-1}):U({title:(0,r.__)("Custom URL","popup-maker"),type:"URL",url:E})},escape:e=>{e.preventDefault(),e.stopPropagation(),N({...y,selected:-1,showSuggestions:!1})}};return(0,d.jsx)(h.BaseControl,{id:L,label:o,className:c(["components-url-control",$&&"is-focused",u]),__nextHasNoMarginBottom:!0,children:(0,d.jsx)("div",{ref:P,onFocus:()=>{N({...y,isFocused:!0,showSuggestions:E.length>=1})},onBlur:e=>{if(!P.current?.contains(e.relatedTarget)&&!_.current?.contains(e.relatedTarget)){const e={...y,selected:-1,isFocused:!1,showSuggestions:!1};B&&(e.isEditing=!1,e.value=I>-1?q[I]:{title:(0,r.__)("Custom URL","popup-maker"),type:"URL",url:E}),N(e)}},children:!B&&k.url.length>0?(0,d.jsxs)("div",{className:"chosen-suggestion",children:[(0,d.jsx)(h.Icon,{icon:G,className:"suggestion-item-icon"}),(0,d.jsxs)("span",{className:"suggestion-item-header",children:[(0,d.jsx)("span",{className:"suggestion-item-title",children:(0,d.jsx)(d.Fragment,{children:null!==(m=R?.title)&&void 0!==m?m:R?.url})}),(0,d.jsx)("span",{"aria-hidden":"true",className:"suggestion-item-info",children:R.url})]}),(0,d.jsx)(h.Button,{"aria-label":(0,r.__)("Edit","popup-maker"),icon:V,onClick:()=>{N({...y,isEditing:!0,isFocused:!0,query:k.url})},ref:j})]}):(0,d.jsx)(h.KeyboardShortcuts,{shortcuts:W,children:(0,d.jsxs)("div",{className:c(["url-control-wrapper"]),ref:f,children:[(0,d.jsxs)("div",{className:"url-control",children:[(0,d.jsx)(h.Icon,{icon:v,className:"url-control__input-icon"}),(0,d.jsx)("input",{id:L,className:"url-control__input",ref:b,type:"text",role:"combobox",placeholder:(0,r.__)("Search or type url","popup-maker"),value:E,onChange:e=>{return t=e.target.value,N({...y,query:t,showSuggestions:t.length>=1}),void H(t.trim(),{type:["post","term"]});var t},autoComplete:"off","aria-autocomplete":"list","aria-controls":T,"aria-expanded":F,"aria-activedescendant":K>=0?`${M}-${K}`:void 0,"aria-label":o?void 0:(0,r.__)("URL","popup-maker")}),(0,d.jsxs)("div",{className:"url-control__actions",children:[D&&(0,d.jsx)(h.Spinner,{}),(0,d.jsx)(h.Button,{icon:x,iconSize:30,onClick:()=>U({title:(0,r.__)("Custom URL","popup-maker"),type:"URL",url:E})})]})]}),F&&q.length>0&&(0,d.jsx)(h.Popover,{ref:_,focusOnMount:!1,onClose:()=>Z(-1),position:"bottom right",anchor:f.current,className:"suggestions-popover",children:(0,d.jsxs)("div",{className:"suggestions",id:T,role:"listbox",children:[q.map((e,t)=>(0,d.jsx)(oe,{id:`${M}-${t}`,title:e.title,info:e.url,type:e.type,isSelected:t===K,onSelect:()=>U(e),onFocus:()=>Z(t),ref:e=>{w.current[t]=e}},e.id)),E.length>0&&(0,d.jsx)(oe,{id:`${M}-${z}`,icon:G,title:E,info:(0,r.__)("Press ENTER to add this link","popup-maker"),type:(0,r.__)("URL","popup-maker"),className:"is-url",isSelected:z===K,onSelect:()=>U({title:(0,r.__)("Custom URL","popup-maker"),type:"URL",url:E}),onFocus:()=>{Z(z)},ref:e=>{w.current[z]=e}},"use-current-input-text")]})})]})})})})},re=(0,t.forwardRef)(se)})(),(window.popupMaker=window.popupMaker||{}).components=o})();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists