/*! ! built on Tuesday, November 16th 2021, 3:05:17 pm */ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=81)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=window.wp.url},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.lodash},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n%s"),t),{mark:Object(p.createElement)("mark",null)})))):null};function U(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function B(e){for(var t=1;t]+>/g,"").trim(),Object(m.isURL)(t)?(window.console.log("Created link:\n\n",t),Object(d.applyFormat)(e,{type:Y,attributes:{url:Object(g.decodeEntities)(t)}})):e)},edit:Object(f.withSpokenMessages)(function(e){a()(n,e);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u()(e);return r=t?(n=u()(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),s()(this,r)}}(n);function n(){var e;return c()(this,n),(e=t.apply(this,arguments)).addLink=e.addLink.bind(l()(e)),e.stopAddingLink=e.stopAddingLink.bind(l()(e)),e.onRemoveFormat=e.onRemoveFormat.bind(l()(e)),e.state={addingLink:!1},e}return i()(n,[{key:"addLink",value:function(){var e,t=(e=this.props).value,n=e.onChange;(e=Object(d.getTextContent)(Object(d.slice)(t)))&&Object(m.isURL)(e)?n(Object(d.applyFormat)(t,{type:Y,attributes:{url:e}})):e&&Object(m.isEmail)(e)?n(Object(d.applyFormat)(t,{type:Y,attributes:{url:"mailto:".concat(e)}})):this.setState({addingLink:!0})}},{key:"stopAddingLink",value:function(){this.setState({addingLink:!1}),this.props.onFocus()}},{key:"onRemoveFormat",value:function(){var e=(n=this.props).value,t=n.onChange,n=n.speak;t(Object(d.removeFormat)(e,Y)),n(Object(b.__)("Link removed.","all-in-one-seo-pack"),"assertive")}},{key:"render",value:function(){var e=(r=this.props).isActive,t=r.activeAttributes,n=r.value,r=r.onChange;return Object(p.createElement)(p.Fragment,null,Object(p.createElement)(O.RichTextShortcut,{type:"primary",character:"k",onUse:this.addLink}),Object(p.createElement)(O.RichTextShortcut,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),e&&Object(p.createElement)(O.RichTextToolbarButton,{name:"link",icon:h,title:Object(b.__)("Unlink","all-in-one-seo-pack"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&Object(p.createElement)(O.RichTextToolbarButton,{name:"link",icon:j,title:Z,onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),(this.state.addingLink||e)&&Object(p.createElement)(X,{key:"aioseop-inline-link-ui",addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:t,value:n,onChange:r}))}}]),n}(p.Component))},te=["name"],ne=(n=wp.richText).registerFormatType,re=n.unregisterFormatType;[ee].forEach((function(e){var t=e.name;e=o()(e,te);t&&(re("core/link"),ne(t,e))}))}]);