Current File : /pages/54/47/d0016649/home/htdocs/ob_maxi/wp-content/plugins/pretty-link/js/build/editor.js |
!function(){var t={78:function(t,e,n){"use strict";n(257)},706:function(t,e,n){"use strict";function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},o.apply(this,arguments)}n.d(e,{Z:function(){return C}});var i=n(307),r=n(184),s=n.n(r),l=n(736),a=n(609),c=n(630),u=window.wp.dom,p=n(483),d=n(629),f=n(175),h=(n(989),n(257)),g=(n(493),n(819));function m(t){if(!t)return!1;const e=t.trim();if(!e)return!1;if(/^\S+:/.test(e)){const t=(0,p.getProtocol)(e);if(!(0,p.isValidProtocol)(t))return!1;if((0,g.startsWith)(t,"http")&&!/^https?:\/\/[^\/\s]/i.test(e))return!1;const n=(0,p.getAuthority)(e);if(!(0,p.isValidAuthority)(n))return!1;const o=(0,p.getPath)(e);if(o&&!(0,p.isValidPath)(o))return!1;const i=(0,p.getQueryString)(e);if(i&&!(0,p.isValidQueryString)(i))return!1;const r=(0,p.getFragment)(e);if(r&&!(0,p.isValidFragment)(r))return!1}return!((0,g.startsWith)(e,"#")&&!(0,p.isValidFragment)(e))}function v(t){let{url:e,opensInNewWindow:n,text:o,noFollow:i,isSponsored:r}=t;const s={type:"core/link",attributes:{url:e}};if(s.attributes.rel="",i&&(s.attributes.rel+="nofollow noindex "),r&&(s.attributes.rel+="sponsored "),n){
// translators: accessibility label for external links, where the argument is the link text
const t=(0,l.sprintf)((0,l.__)("%s (opens in a new tab)"),o);s.attributes.target="_blank",s.attributes.rel+="noreferrer noopener",s.attributes["aria-label"]=t}return""===s.attributes.rel&&delete s.attributes.rel,s}const w=t=>t.stopPropagation(),{useAnchor:b}=wp.richText;function y(t,e){return t.addingLink||e.editLink}const k=t=>{let{value:e,onChangeInputValue:n,onKeyDown:o,submitLink:r,autocompleteRef:s}=t;return(0,i.createElement)("form",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:w,onKeyDown:o,onSubmit:r},(0,i.createElement)(h.Z,{value:e,onChange:n,autocompleteRef:s,autoFocus:!1}),(0,i.createElement)(a.Button,{icon:"editor-break",label:(0,l.__)("Insert Pretty Link"),type:"submit"}))},S=t=>{let{url:e}=t;const n=(0,p.prependHTTP)(e),o=s()("editor-format-toolbar__link-container-value block-editor-format-toolbar__link-container-value",{"has-invalid-link":!m(n)});return e?(0,i.createElement)(a.ExternalLink,{className:o,href:e},(0,p.filterURLForDisplay)((0,p.safeDecodeURI)(e))):(0,i.createElement)("span",{className:o})},L=t=>{let{isActive:e,addingLink:n,value:r,contentRef:s,...l}=t;const a=(0,i.useMemo)((()=>{const t=window.getSelection(),e=t.rangeCount>0?t.getRangeAt(0):null;if(!e)return;if(n)return(0,u.getRectangleFromRange)(e);let o=e.startContainer;for(o=o.nextElementSibling||o;o.nodeType!==window.Node.ELEMENT_NODE;)o=o.parentNode;const i=o.closest("a");return i?i.getBoundingClientRect():void 0}),[e,n,r.start,r.end]);if(!a&&!b)return null;let c;return c=b?{anchor:b({editableContentElement:s.current,value:r,settings:{tagName:"a"}})}:{anchorRect:a},(0,i.createElement)(f.URLPopover,o({},c,l))},E=t=>{let{url:e,editLink:n}=t;return(0,i.createElement)("div",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:w},(0,i.createElement)(S,{url:e}),(0,i.createElement)(a.Button,{icon:"edit",label:(0,l.__)("Edit"),onClick:n}))};class _ extends i.Component{constructor(){super(...arguments),this.editLink=this.editLink.bind(this),this.submitLink=this.submitLink.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onChangeInputValue=this.onChangeInputValue.bind(this),this.setNoFollow=this.setNoFollow.bind(this),this.setIsSponsored=this.setIsSponsored.bind(this),this.setLinkTarget=this.setLinkTarget.bind(this),this.onClickOutside=this.onClickOutside.bind(this),this.resetState=this.resetState.bind(this),this.autocompleteRef=(0,i.createRef)(),this.state={noFollow:!1,opensInNewWindow:!1,isSponsored:!1,inputValue:"",newLinkUrl:"",newLinkSlug:"",creatingLink:!1,createdLink:!1,createdLinkError:!1}}static getDerivedStateFromProps(t,e){const{activeAttributes:{url:n,target:o,isSponsored:i}}=t,r="_blank"===o;if(!y(t,e)){if(n!==e.inputValue)return{inputValue:n};if(r!==e.opensInNewWindow)return{opensInNewWindow:r}}return null}onKeyDown(t){[c.LEFT,c.DOWN,c.RIGHT,c.UP,c.BACKSPACE,c.ENTER].indexOf(t.keyCode)>-1&&t.stopPropagation()}onChangeInputValue(t){this.setState({inputValue:t})}setLinkTarget(t){const{activeAttributes:{url:e=""},value:n,onChange:o}=this.props;if(this.setState({opensInNewWindow:t}),!y(this.props,this.state)){const i=(0,d.getTextContent)((0,d.slice)(n));o((0,d.applyFormat)(n,v({url:e,opensInNewWindow:t,text:i})))}}setNoFollow(t){const{activeAttributes:{url:e=""},value:n,onChange:o}=this.props;if(this.setState({noFollow:t}),!y(this.props,this.state)){const i=(0,d.getTextContent)((0,d.slice)(n));o((0,d.applyFormat)(n,v({url:e,opensInNewWindow:opensInNewWindow,text:i,noFollow:t,isSponsored:isSponsored})))}}setIsSponsored(t){const{activeAttributes:{url:e=""},value:n,onChange:o}=this.props;if(this.setState({isSponsored:t}),!y(this.props,this.state)){const i=(0,d.getTextContent)((0,d.slice)(n));o((0,d.applyFormat)(n,v({url:e,opensInNewWindow:opensInNewWindow,text:i,noFollow:noFollow,isSponsored:t})))}}editLink(t){this.setState({editLink:!0}),t.preventDefault()}submitLink(t){const{isActive:e,value:n,onChange:o,speak:i}=this.props,{inputValue:r,opensInNewWindow:s,noFollow:a,isSponsored:c}=this.state,u=(0,p.prependHTTP)(r),f=v({url:u,opensInNewWindow:s,text:(0,d.getTextContent)((0,d.slice)(n)),noFollow:a,isSponsored:c});if(t.preventDefault(),(0,d.isCollapsed)(n)&&!e){const t=(0,d.applyFormat)((0,d.create)({text:u}),f,0,u.length);o((0,d.insert)(n,t))}else o((0,d.applyFormat)(n,f));this.resetState(),m(u)?i(e?(0,l.__)("Link edited."):(0,l.__)("Link inserted."),"assertive"):i((0,l.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")}onClickOutside(t){const e=this.autocompleteRef.current;e&&e.contains(t.target)||this.resetState()}resetState(){this.props.stopAddingLink(),this.setState({editLink:!1})}render(){const{isActive:t,activeAttributes:{url:e},addingLink:n,value:o,contentRef:r}=this.props;if(!t&&!n)return null;const{inputValue:s,noFollow:c,opensInNewWindow:u,isSponsored:p,newLinkUrl:d,newLinkSlug:f,creatingLink:h,createdLink:g,createdLinkError:m}=this.state,v=y(this.props,this.state);return(0,i.createElement)(L,{className:"pretty-link-inserter",value:o,isActive:t,addingLink:n,onClickOutside:this.onClickOutside,onClose:this.resetState,focusOnMount:!!v&&"firstElement",contentRef:r,renderSettings:()=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",null,(0,i.createElement)(a.ToggleControl,{label:(0,l.__)("Open in New Tab"),checked:u,onChange:this.setLinkTarget}),(0,i.createElement)(a.ToggleControl,{label:(0,l.__)("Nofollow"),checked:c,onChange:this.setNoFollow}),(0,i.createElement)(a.ToggleControl,{label:(0,l.__)("Sponsored Link"),checked:p,onChange:this.setIsSponsored})),(0,i.createElement)("div",{className:"pretty-link-inserter-form-container"},g&&(0,i.createElement)(a.Notice,{status:"success",onRemove:()=>this.setState({createdLink:!1})},(0,i.createElement)("p",null,(0,l.__)("Pretty Link created successfully.","memberpress"))),m&&(0,i.createElement)(a.Notice,{status:"error",onRemove:()=>this.setState({createdLink:!1,createdLinkError:!1})},(0,i.createElement)("p",null,(0,l.__)("Pretty Link could not be created. Please try a slug that is not already used.","memberpress"))),(0,i.createElement)("strong",null,(0,l.__)("New Pretty Link","pretty-link")),(0,i.createElement)("form",{onSubmit:t=>{var e,n;t.preventDefault(),this.setState({creatingLink:!0,createdLinkError:!1}),(e=d,n=f,new Promise(((t,o)=>{jQuery.post(ajaxurl,{action:"prli_create_pretty_link",target:e,slug:n,redirect:"",nofollow:1,tracking:1,sponsored:0},((e,n,i)=>{"true"===e?t(e):o(e)})).fail((t=>{o(t)}))}))).then((t=>{this.setState({createdLink:!0,creatingLink:!1,inputValue:plEditor.homeUrl+f,newLinkUrl:"",newLinkSlug:""})})).catch((t=>{this.setState({createdLink:!1,creatingLink:!1,createdLinkError:!0})}))}},(0,i.createElement)("p",null,(0,i.createElement)(a.TextControl,{placeholder:"URL",className:"pretty-link-new-link-url",value:d,onChange:t=>{this.setState({newLinkUrl:t})}})),(0,i.createElement)("p",null,(0,i.createElement)(a.TextControl,{placeholder:"Slug",className:"pretty-link-new-link-slug",value:f,onChange:t=>{this.setState({newLinkSlug:t})}})),(0,i.createElement)("p",null,(0,i.createElement)("button",{className:"pretty-link-submit-new-link components-button is-button is-primary",onClick:()=>{console.log("Creating new Pretty Link...")}},(0,l.__)("Create New Pretty Link","pretty-link")),h&&(0,i.createElement)(a.Spinner,null)))))},v?(0,i.createElement)(k,{value:s,onChangeInputValue:this.onChangeInputValue,onKeyDown:this.onKeyDown,submitLink:this.submitLink,autocompleteRef:this.autocompleteRef}):(0,i.createElement)(E,{url:e,editLink:this.editLink}))}}var C=(0,a.withSpokenMessages)(_)},257:function(t,e,n){"use strict";n.d(e,{Z:function(){return y}});var o=n(307),i=n(819),r=n(184),s=n.n(r),l=n(979),a=n.n(l),c=n(736),u=n(630),p=n(609),d=window.wp.compose,f=window.wp.data,h=n(989),g=n.n(h),m=n(483),v=window.wp.htmlEntities;const w=t=>t.stopPropagation();class b extends o.Component{constructor(t){let{autocompleteRef:e}=t;super(...arguments),this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.autocompleteRef=e||(0,o.createRef)(),this.inputRef=(0,o.createRef)(),this.updateSuggestions=(0,i.throttle)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.state={suggestions:[],showSuggestions:!1,selectedSuggestion:null}}componentDidUpdate(){const{showSuggestions:t,selectedSuggestion:e}=this.state;t&&null!==e&&!this.scrollingIntoView&&(this.scrollingIntoView=!0,a()(this.suggestionNodes[e],this.autocompleteRef.current,{onlyScrollIfNeeded:!0}),this.props.setTimeout((()=>{this.scrollingIntoView=!1}),100))}componentWillUnmount(){delete this.suggestionsRequest}bindSuggestionNode(t){return e=>{this.suggestionNodes[t]=e}}updateSuggestions(t){if(t.length<2||/^https?:/.test(t))return void this.setState({showSuggestions:!1,selectedSuggestion:null,loading:!1});this.setState({showSuggestions:!0,selectedSuggestion:null,loading:!0});const e=(async t=>{const e=await g()({url:(0,m.addQueryArgs)(ajaxurl,{action:"prli_search_for_links",term:t})});return(0,i.map)(e,(t=>({url:t.pretty_url,title:(0,v.decodeEntities)(t.value)+" ("+(0,v.decodeEntities)(t.slug)+")"||0,prettypay_link:1===t.prettypay_link})))})(t);e.then((t=>{this.suggestionsRequest===e&&(this.setState({suggestions:t,loading:!1}),t.length?this.props.debouncedSpeak((0,c.sprintf)((0,c._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,c.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===e&&this.setState({loading:!1})})),this.suggestionsRequest=e}onChange(t){const e=t.target.value;this.props.onChange(e),this.updateSuggestions(e)}onKeyDown(t){const{showSuggestions:e,selectedSuggestion:n,suggestions:o,loading:i}=this.state;if(!e||!o.length||i){switch(t.keyCode){case u.UP:0!==t.target.selectionStart&&(t.stopPropagation(),t.preventDefault(),t.target.setSelectionRange(0,0));break;case u.DOWN:this.props.value.length!==t.target.selectionStart&&(t.stopPropagation(),t.preventDefault(),t.target.setSelectionRange(this.props.value.length,this.props.value.length))}return}const r=this.state.suggestions[this.state.selectedSuggestion];switch(t.keyCode){case u.UP:{t.stopPropagation(),t.preventDefault();const e=n?n-1:o.length-1;this.setState({selectedSuggestion:e});break}case u.DOWN:{t.stopPropagation(),t.preventDefault();const e=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:e});break}case u.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(r),this.props.speak((0,c.__)("Link selected.")));break;case u.ENTER:null!==this.state.selectedSuggestion&&(t.stopPropagation(),this.selectLink(r))}}selectLink(t){this.props.onChange(t.url,t),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(t){this.selectLink(t),this.inputRef.current.focus()}render(){const{value:t="",autoFocus:e=!0,instanceId:n,className:i}=this.props,{showSuggestions:r,suggestions:l,selectedSuggestion:a,loading:u}=this.state,d=`block-editor-url-input-suggestions-${n}`,f=`block-editor-url-input-suggestion-${n}`;return(0,o.createElement)("div",{className:s()("editor-url-input block-editor-url-input",i)},(0,o.createElement)("input",{autoFocus:e,type:"text","aria-label":(0,c.__)("URL"),required:!0,value:t,onChange:this.onChange,onInput:w,placeholder:(0,c.__)("Search Pretty Links and PrettyPay™ Links"),onKeyDown:this.onKeyDown,role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":d,"aria-activedescendant":null!==a?`${f}-${a}`:void 0,ref:this.inputRef}),u&&(0,o.createElement)(p.Spinner,null),r&&!!l.length&&(0,o.createElement)(p.Popover,{position:"bottom",noArrow:!0,focusOnMount:!1},(0,o.createElement)("div",{className:"editor-url-input__suggestions block-editor-url-input__suggestions prli-input__suggestions",id:d,ref:this.autocompleteRef,role:"listbox"},l.map(((t,e)=>(0,o.createElement)("button",{key:t.id,role:"option",tabIndex:"-1",id:`${f}-${e}`,ref:this.bindSuggestionNode(e),className:s()("editor-url-input__suggestion block-editor-url-input__suggestion",{"is-selected":e===a}),onClick:()=>this.handleOnClick(t),"aria-selected":e===a},t.title,t.prettypay_link&&(0,o.createElement)("span",null,(0,o.createElement)("span",null,(0,c.__)("PrettyPay™")))))))))}}var y=(0,d.compose)(d.withSafeTimeout,p.withSpokenMessages,d.withInstanceId,(0,f.withSelect)((t=>{const{getSettings:e}=t("core/block-editor");return{fetchLinkSuggestions:e().fetchLinkSuggestions}})))(b)},772:function(t,e,n){"use strict";var o=n(307),i=n(736),r=n(609),s=n(629),l=n(483),a=n(175),c=n(706);const u="pretty-link/pretty-link",p=(0,i.__)("Pretty Link"),d=()=>(0,o.createElement)(r.Icon,{icon:(0,o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},(0,o.createElement)("path",{d:"M6.844 6.809A59.24 59.24 0 0 0 3 7.371c-2.988.602-3.625.953-2.273 1.25.297.063.93.242 1.402.391l.863.277.824-.145c1.844-.316 3.328-.445 5.484-.473l2.227-.027.289-.242c.16-.137.406-.273.543-.309.223-.059 2.938.188 3.453.313.172.039.246-.031.445-.426l.242-.52c0-.062-.816-.219-2.297-.437-1.055-.16-1.863-.203-4.125-.223-1.547-.016-3.004-.012-3.234.008m1.313 2.527c-1.496.078-3.152.25-3.258.34-.062.055-.117.145-.113.203s.555.375 1.234.707l1.23.602 2.398.02 2.727.094.328.074-.582-.625c-.359-.387-.625-.766-.695-1-.102-.336-.145-.375-.41-.375a55.49 55.49 0 0 1-1.273-.035l-1.586-.004m.727 2.621c-.039.039-.07.105-.07.145s.465.43 1.035.875l1.035.805 1.129.102 1.156.07c.016-.016.18-.332.363-.699l.336-.668-.219-.203c-.145-.137-.426-.238-.816-.297-.801-.121-3.859-.223-3.949-.129",fill:"rgb(10.980392%,78.823529%,95.294118%)"}),(0,o.createElement)("path",{d:"M18.141 6.039c-.121.121-.547.871-.941 1.664l-.746 1.465c-.023.027-2.824-.297-3.535-.41-.289-.047-.391-.016-.586.184-.445.441-.359.602 1.105 2.102l1.348 1.379-.969 1.969-.973 2.133c0 .25.344.539.645.539.176 0 .887-.363 2.027-1.035l1.77-1.008c.02.043 1.402 1.516 2.246 2.395.793.824.996.91 1.379.602.277-.227.27-.395-.176-2.875l-.355-1.969 1.684-1 1.762-1.125c.137-.215.09-.633-.09-.812-.141-.141-.547-.219-2.039-.391l-1.906-.246c-.02-.016-.172-.801-.34-1.738-.254-1.441-.336-1.734-.512-1.879-.285-.227-.527-.211-.797.059",fill:"rgb(98.823529%,72.54902%,1.960784%)"}))}),f={name:u,title:p,tagName:"a",className:"pretty-link",attributes:{url:"href",target:"target"},edit:(0,r.withSpokenMessages)(class extends o.Component{constructor(){super(...arguments),this.addLink=this.addLink.bind(this),this.stopAddingLink=this.stopAddingLink.bind(this),this.onRemoveFormat=this.onRemoveFormat.bind(this),this.state={addingLink:!1}}addLink(){const{value:t,onChange:e}=this.props,n=(0,s.getTextContent)((0,s.slice)(t));n&&(0,l.isURL)(n)?e((0,s.applyFormat)(t,{type:u,attributes:{url:n}})):this.setState({addingLink:!0})}stopAddingLink(){this.setState({addingLink:!1})}onRemoveFormat(){const{value:t,onChange:e,speak:n}=this.props;e((0,s.removeFormat)(t,u)),n((0,i.__)("Link removed."),"assertive")}render(){const{isActive:t,activeAttributes:e,value:n,onChange:s,contentRef:l}=this.props;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(a.RichTextShortcut,{type:"primary",character:"p",onUse:this.addLink}),(0,o.createElement)(a.RichTextShortcut,{type:"primaryShift",character:"p",onUse:this.onRemoveFormat}),t&&(0,o.createElement)(a.BlockControls,null,(0,o.createElement)(r.ToolbarGroup,null,(0,o.createElement)(r.ToolbarButton,{icon:d,title:(0,i.__)("Unlink"),onClick:this.onRemoveFormat,isActive:t}))),!t&&(0,o.createElement)(a.BlockControls,null,(0,o.createElement)(r.ToolbarGroup,null,(0,o.createElement)(r.ToolbarButton,{icon:d,title:p,onClick:this.addLink,isActive:t}))),(0,o.createElement)(c.Z,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:t,activeAttributes:e,value:n,onChange:s,contentRef:l}))}})};[f].forEach((t=>{let{name:e,...n}=t;return(0,s.registerFormatType)(e,n)}))},184:function(t,e){var n;!function(){"use strict";var o={}.hasOwnProperty;function i(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var r=typeof n;if("string"===r||"number"===r)t.push(n);else if(Array.isArray(n)){if(n.length){var s=i.apply(null,n);s&&t.push(s)}}else if("object"===r){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){t.push(n.toString());continue}for(var l in n)o.call(n,l)&&n[l]&&t.push(l)}}}return t.join(" ")}t.exports?(i.default=i,t.exports=i):void 0===(n=function(){return i}.apply(e,[]))||(t.exports=n)}()},10:function(t,e,n){"use strict";var o=n(657);t.exports=function(t,e,n){n=n||{},9===e.nodeType&&(e=o.getWindow(e));var i=n.allowHorizontalScroll,r=n.onlyScrollIfNeeded,s=n.alignWithTop,l=n.alignWithLeft,a=n.offsetTop||0,c=n.offsetLeft||0,u=n.offsetBottom||0,p=n.offsetRight||0;i=void 0===i||i;var d=o.isWindow(e),f=o.offset(t),h=o.outerHeight(t),g=o.outerWidth(t),m=void 0,v=void 0,w=void 0,b=void 0,y=void 0,k=void 0,S=void 0,L=void 0,E=void 0,_=void 0;d?(S=e,_=o.height(S),E=o.width(S),L={left:o.scrollLeft(S),top:o.scrollTop(S)},y={left:f.left-L.left-c,top:f.top-L.top-a},k={left:f.left+g-(L.left+E)+p,top:f.top+h-(L.top+_)+u},b=L):(m=o.offset(e),v=e.clientHeight,w=e.clientWidth,b={left:e.scrollLeft,top:e.scrollTop},y={left:f.left-(m.left+(parseFloat(o.css(e,"borderLeftWidth"))||0))-c,top:f.top-(m.top+(parseFloat(o.css(e,"borderTopWidth"))||0))-a},k={left:f.left+g-(m.left+w+(parseFloat(o.css(e,"borderRightWidth"))||0))+p,top:f.top+h-(m.top+v+(parseFloat(o.css(e,"borderBottomWidth"))||0))+u}),y.top<0||k.top>0?!0===s?o.scrollTop(e,b.top+y.top):!1===s?o.scrollTop(e,b.top+k.top):y.top<0?o.scrollTop(e,b.top+y.top):o.scrollTop(e,b.top+k.top):r||((s=void 0===s||!!s)?o.scrollTop(e,b.top+y.top):o.scrollTop(e,b.top+k.top)),i&&(y.left<0||k.left>0?!0===l?o.scrollLeft(e,b.left+y.left):!1===l?o.scrollLeft(e,b.left+k.left):y.left<0?o.scrollLeft(e,b.left+y.left):o.scrollLeft(e,b.left+k.left):r||((l=void 0===l||!!l)?o.scrollLeft(e,b.left+y.left):o.scrollLeft(e,b.left+k.left)))}},979:function(t,e,n){"use strict";t.exports=n(10)},657:function(t){"use strict";var e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function o(t,e){var n=t["page"+(e?"Y":"X")+"Offset"],o="scroll"+(e?"Top":"Left");if("number"!=typeof n){var i=t.document;"number"!=typeof(n=i.documentElement[o])&&(n=i.body[o])}return n}function i(t){return o(t)}function r(t){return o(t,!0)}function s(t){var e=function(t){var e,n=void 0,o=void 0,i=t.ownerDocument,r=i.body,s=i&&i.documentElement;return n=(e=t.getBoundingClientRect()).left,o=e.top,{left:n-=s.clientLeft||r.clientLeft||0,top:o-=s.clientTop||r.clientTop||0}}(t),n=t.ownerDocument,o=n.defaultView||n.parentWindow;return e.left+=i(o),e.top+=r(o),e}var l=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),a=/^(top|right|bottom|left)$/,c="currentStyle",u="runtimeStyle",p="left",d=void 0;function f(t,e){for(var n=0;n<t.length;n++)e(t[n])}function h(t){return"border-box"===d(t,"boxSizing")}"undefined"!=typeof window&&(d=window.getComputedStyle?function(t,e,n){var o="",i=t.ownerDocument,r=n||i.defaultView.getComputedStyle(t,null);return r&&(o=r.getPropertyValue(e)||r[e]),o}:function(t,e){var n=t[c]&&t[c][e];if(l.test(n)&&!a.test(e)){var o=t.style,i=o[p],r=t[u][p];t[u][p]=t[c][p],o[p]="fontSize"===e?"1em":n||0,n=o.pixelLeft+"px",o[p]=i,t[u][p]=r}return""===n?"auto":n});var g=["margin","border","padding"],m=-1,v=2,w=1;function b(t,e,n){var o=0,i=void 0,r=void 0,s=void 0;for(r=0;r<e.length;r++)if(i=e[r])for(s=0;s<n.length;s++){var l;l="border"===i?i+n[s]+"Width":i+n[s],o+=parseFloat(d(t,l))||0}return o}function y(t){return null!=t&&t==t.window}var k={};function S(t,e,n){if(y(t))return"width"===e?k.viewportWidth(t):k.viewportHeight(t);if(9===t.nodeType)return"width"===e?k.docWidth(t):k.docHeight(t);var o="width"===e?["Left","Right"]:["Top","Bottom"],i="width"===e?t.offsetWidth:t.offsetHeight,r=(d(t),h(t)),s=0;(null==i||i<=0)&&(i=void 0,(null==(s=d(t,e))||Number(s)<0)&&(s=t.style[e]||0),s=parseFloat(s)||0),void 0===n&&(n=r?w:m);var l=void 0!==i||r,a=i||s;if(n===m)return l?a-b(t,["border","padding"],o):s;if(l){var c=n===v?-b(t,["border"],o):b(t,["margin"],o);return a+(n===w?0:c)}return s+b(t,g.slice(n),o)}f(["Width","Height"],(function(t){k["doc"+t]=function(e){var n=e.document;return Math.max(n.documentElement["scroll"+t],n.body["scroll"+t],k["viewport"+t](n))},k["viewport"+t]=function(e){var n="client"+t,o=e.document,i=o.body,r=o.documentElement[n];return"CSS1Compat"===o.compatMode&&r||i&&i[n]||r}}));var L={position:"absolute",visibility:"hidden",display:"block"};function E(t){var e=void 0,n=arguments;return 0!==t.offsetWidth?e=S.apply(void 0,n):function(t,o,i){var r={},s=t.style,l=void 0;for(l in o)o.hasOwnProperty(l)&&(r[l]=s[l],s[l]=o[l]);for(l in function(){e=S.apply(void 0,n)}.call(t),o)o.hasOwnProperty(l)&&(s[l]=r[l])}(t,L),e}function _(t,e,o){var i=o;if("object"!==(void 0===e?"undefined":n(e)))return void 0!==i?("number"==typeof i&&(i+="px"),void(t.style[e]=i)):d(t,e);for(var r in e)e.hasOwnProperty(r)&&_(t,r,e[r])}f(["width","height"],(function(t){var e=t.charAt(0).toUpperCase()+t.slice(1);k["outer"+e]=function(e,n){return e&&E(e,t,n?0:w)};var n="width"===t?["Left","Right"]:["Top","Bottom"];k[t]=function(e,o){return void 0===o?e&&E(e,t,m):e?(d(e),h(e)&&(o+=b(e,["padding","border"],n)),_(e,t,o)):void 0}})),t.exports=e({getWindow:function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow},offset:function(t,e){if(void 0===e)return s(t);!function(t,e){"static"===_(t,"position")&&(t.style.position="relative");var n=s(t),o={},i=void 0,r=void 0;for(r in e)e.hasOwnProperty(r)&&(i=parseFloat(_(t,r))||0,o[r]=i+e[r]-n[r]);_(t,o)}(t,e)},isWindow:y,each:f,css:_,clone:function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);if(t.overflow)for(var n in t)t.hasOwnProperty(n)&&(e.overflow[n]=t.overflow[n]);return e},scrollLeft:function(t,e){if(y(t)){if(void 0===e)return i(t);window.scrollTo(e,r(t))}else{if(void 0===e)return t.scrollLeft;t.scrollLeft=e}},scrollTop:function(t,e){if(y(t)){if(void 0===e)return r(t);window.scrollTo(i(t),e)}else{if(void 0===e)return t.scrollTop;t.scrollTop=e}},viewportWidth:0,viewportHeight:0},k)},798:function(t){t.exports=".pretty-link-inserter .block-editor-url-popover__settings{display:block}.pretty-link-inserter .pretty-link-inserter-form-container{margin-top:30px}.prli-input__suggestions>button{display:flex;align-items:center;justify-content:space-between}.prli-input__suggestions>button>span{display:flex;flex-shrink:0}.prli-input__suggestions>button>span>span{color:#fff;background-color:#0074a2;padding:4px;border-radius:4px;font-size:11px}"},493:function(t,e,n){var o=n(798);"string"==typeof o&&(o=[[t.id,o,""]]);n(723)(o,{hmr:!0,transform:void 0,insertInto:void 0}),o.locals&&(t.exports=o.locals)},723:function(t,e,n){var o,i,r={},s=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=o.apply(this,arguments)),i}),l=function(t,e){return e?e.querySelector(t):document.querySelector(t)},a=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var o=l.call(this,t,n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}}(),c=null,u=0,p=[],d=n(947);function f(t,e){for(var n=0;n<t.length;n++){var o=t[n],i=r[o.id];if(i){i.refs++;for(var s=0;s<i.parts.length;s++)i.parts[s](o.parts[s]);for(;s<o.parts.length;s++)i.parts.push(b(o.parts[s],e))}else{var l=[];for(s=0;s<o.parts.length;s++)l.push(b(o.parts[s],e));r[o.id]={id:o.id,refs:1,parts:l}}}}function h(t,e){for(var n=[],o={},i=0;i<t.length;i++){var r=t[i],s=e.base?r[0]+e.base:r[0],l={css:r[1],media:r[2],sourceMap:r[3]};o[s]?o[s].parts.push(l):n.push(o[s]={id:s,parts:[l]})}return n}function g(t,e){var n=a(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=p[p.length-1];if("top"===t.insertAt)o?o.nextSibling?n.insertBefore(e,o.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),p.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=a(t.insertAt.before,n);n.insertBefore(e,i)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=p.indexOf(t);e>=0&&p.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=n.nc;o&&(t.attrs.nonce=o)}return w(e,t.attrs),g(t,e),e}function w(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function b(t,e){var n,o,i,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var s=u++;n=c||(c=v(e)),o=S.bind(null,n,s,!1),i=S.bind(null,n,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",w(e,t.attrs),g(t,e),e}(e),o=E.bind(null,n,e),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(e),o=L.bind(null,n),i=function(){m(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return f(n,e),function(t){for(var o=[],i=0;i<n.length;i++){var s=n[i];(l=r[s.id]).refs--,o.push(l)}for(t&&f(h(t,e),e),i=0;i<o.length;i++){var l;if(0===(l=o[i]).refs){for(var a=0;a<l.parts.length;a++)l.parts[a]();delete r[l.id]}}}};var y,k=(y=[],function(t,e){return y[t]=e,y.filter(Boolean).join("\n")});function S(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=k(e,i);else{var r=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function L(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function E(t,e,n){var o=n.css,i=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||r)&&(o=d(o)),i&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var s=new Blob([o],{type:"text/css"}),l=t.href;t.href=URL.createObjectURL(s),l&&URL.revokeObjectURL(l)}},947:function(t){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var i,r=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(i=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:o+r.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},819:function(t){"use strict";t.exports=window.lodash},989:function(t){"use strict";t.exports=window.wp.apiFetch},175:function(t){"use strict";t.exports=window.wp.blockEditor},609:function(t){"use strict";t.exports=window.wp.components},307:function(t){"use strict";t.exports=window.wp.element},736:function(t){"use strict";t.exports=window.wp.i18n},630:function(t){"use strict";t.exports=window.wp.keycodes},629:function(t){"use strict";t.exports=window.wp.richText},483:function(t){"use strict";t.exports=window.wp.url}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={id:o,exports:{}};return t[o](r,r.exports,n),r.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.nc=void 0,n(78),n(706),n(257),n(772)}();