SEOPress - Version 5.0.2

Version Description

  • NEW Allow user to drag and drop the beacon
  • INFO Allow users with edit_posts capability to use the universal SEO metabox in frontend
  • FIX Fatal error: Uncaught TypeError: method_exists() in some cases
Download this release

Release Info

Developer rainbowgeek
Plugin Icon 128x128 SEOPress
Version 5.0.2
Comparing to
See all releases

Code changes from version 5.0.1 to 5.0.2

public/metaboxe.js CHANGED
@@ -18379,12 +18379,24 @@ var styled_components_browser_esm = __webpack_require__(4);
18379
 
18380
  // CONCATENATED MODULE: ./app/react/ui/Beacon/index.js
18381
 
18382
- var SCBeaconButton = styled_components_browser_esm["b" /* default */].div.withConfig({
18383
  componentId: "sc-oa9y3j-0"
18384
- })(["&&&{appearance:none;align-items:center;display:flex;justify-content:center;align-items:center;margin:0px;line-height:60px;outline:none;padding:0px;position:relative;user-select:none;z-index:999;background-color:#4e21e7;border:none;color:white;cursor:pointer;transition:background-color 200ms linear 0s,transform 200ms linear 0s;-webkit-tap-highlight-color:transparent;padding:0px 10px;&:hover{cursor:pointer;background-color:rgb(78 33 231 / 80%);}svg{width:24px;height:24px;color:#fff;}}"]);
18385
  var SCBeacon = styled_components_browser_esm["b" /* default */].div.withConfig({
18386
  componentId: "sc-oa9y3j-1"
18387
- })(["&&&{width:60px;appearance:none;align-items:center;border-radius:200px;bottom:40px;display:flex;justify-content:center;margin:0px;line-height:60px;outline:none;padding:0px;position:fixed;user-select:none;z-index:9999;background-color:#4e21e7;border:none;color:white;cursor:pointer;min-width:60px;transition:background-color 200ms linear 0s,transform 200ms linear 0s;-webkit-tap-highlight-color:transparent;height:60px;left:180px;&:hover{cursor:pointer;background-color:rgb(78 33 231 / 80%);}&:focus{box-shadow:0 0 0 2px var(--primaryColor);outline:2px solid var(--primaryColor);}img{width:38px;height:38px;}}body:not(.wp-admin) &&&{left:20px;bottom:20px;}body.is-fullscreen-mode.block-editor-page &&&{left:20px;}body.block-editor-page.folded:not(.is-fullscreen-mode) &&&{left:60px;}@media screen and (max-width:782px){body.block-editor-page &&&{left:10px !important;bottom:10px;}}"]);
 
 
 
 
 
 
 
 
 
 
 
 
18388
  /* harmony default export */ var ui_Beacon = (SCBeacon);
18389
  // EXTERNAL MODULE: ./node_modules/lodash/isNil.js
18390
  var isNil = __webpack_require__(5);
@@ -18592,37 +18604,289 @@ var MetaboxContext_MetaboxContextProvider = function MetaboxContextProvider(_ref
18592
  }
18593
  }, children);
18594
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18595
  // CONCATENATED MODULE: ./app/react/components/Beacon/index.js
18596
 
18597
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18598
 
18599
 
18600
 
18601
 
 
 
 
 
 
 
 
 
18602
  var Beacon_Beacon = function Beacon() {
 
 
18603
  var _useContext = Object(react["useContext"])(MetaboxContext),
18604
  actions = _useContext.actions;
18605
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18606
  var onClick = function onClick(e) {
18607
  e.preventDefault();
 
 
 
 
 
18608
  actions.setOpenBar(function (openBar) {
18609
  return !openBar;
18610
  });
18611
  };
18612
 
18613
- return /*#__PURE__*/react_default.a.createElement(ui_Beacon, {
18614
- onClick: onClick,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18615
  onKeyUp: function onKeyUp(e) {
18616
  if (e.keyCode === 13) {
18617
  onClick(e);
18618
  }
18619
  },
 
 
 
18620
  role: "button",
18621
  tabIndex: "0"
 
 
 
18622
  }, /*#__PURE__*/react_default.a.createElement("img", {
18623
  src: get_default()(SEOPRESS_DATA, "BEACON_SVG", getAssetsLink("/img/beacon.svg")),
18624
  alt: ""
18625
- }));
 
 
 
18626
  };
18627
 
18628
  /* harmony default export */ var components_Beacon = (Beacon_Beacon);
@@ -18696,7 +18960,7 @@ var NotificationContext_NotificationContextProvider = function NotificationConte
18696
 
18697
  var SCComponents = styled_components_browser_esm["b" /* default */].div.withConfig({
18698
  componentId: "sc-4mm9ym-0"
18699
- })(["&&&{position:fixed;right:0;bottom:40px;padding-left:16px;padding-right:16px;animation-name:sp-fade-in-out;animation-duration:5s;animation-iteration-count:1;animation-fill-mode:forwards;visibility:hidden;z-index:1;.sp-components-snackbar__content{display:flex;align-items:center;justify-content:space-between;line-height:1.4;}.sp-components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#32373c;border-radius:4px;box-shadow:0 2px 4px rgba(0,0,0,0.3);color:#fff;padding:16px 24px;cursor:pointer;}.sp-components-snackbar .dashicons{color:#fff;}}"]);
18700
 
18701
  var Snackbar_SCSnackbar = function SCSnackbar(_ref) {
18702
  var children = _ref.children;
@@ -20306,11 +20570,11 @@ var getCurrentPostId_getCurrentPostId = function getCurrentPostId() {
20306
  }
20307
  };
20308
  // CONCATENATED MODULE: ./app/react/hooks/useSWRAbort.js
20309
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
20310
 
20311
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
20312
 
20313
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20314
 
20315
 
20316
 
@@ -20333,7 +20597,7 @@ function useSWRAbort(key, options) {
20333
 
20334
  return fetcherAbort.apply(void 0, args.concat([aborter.current.signal]));
20335
  }, options);
20336
- return _objectSpread(_objectSpread({}, res), {}, {
20337
  abort: abort
20338
  });
20339
  }
@@ -21228,61 +21492,6 @@ var lib_Resizable = /** @class */ (function (_super) {
21228
  }(react["PureComponent"]));
21229
 
21230
 
21231
- // CONCATENATED MODULE: ./app/react/hooks/useLocalStorage.js
21232
- function useLocalStorage_slicedToArray(arr, i) { return useLocalStorage_arrayWithHoles(arr) || useLocalStorage_iterableToArrayLimit(arr, i) || useLocalStorage_unsupportedIterableToArray(arr, i) || useLocalStorage_nonIterableRest(); }
21233
-
21234
- function useLocalStorage_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
21235
-
21236
- function useLocalStorage_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return useLocalStorage_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return useLocalStorage_arrayLikeToArray(o, minLen); }
21237
-
21238
- function useLocalStorage_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
21239
-
21240
- function useLocalStorage_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
21241
-
21242
- function useLocalStorage_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21243
-
21244
-
21245
-
21246
- function useLocalStorage(key, initialValue) {
21247
- // State to store our value
21248
- // Pass initial state function to useState so logic is only executed once
21249
- var _useState = Object(react["useState"])(function () {
21250
- try {
21251
- // Get from local storage by key
21252
- var item = window.localStorage.getItem(key); // Parse stored json or if none return initialValue
21253
-
21254
- // Parse stored json or if none return initialValue
21255
- return item ? JSON.parse(item) : initialValue;
21256
- } catch (error) {
21257
- // If error also return initialValue
21258
- console.log(error);
21259
- return initialValue;
21260
- }
21261
- }),
21262
- _useState2 = useLocalStorage_slicedToArray(_useState, 2),
21263
- storedValue = _useState2[0],
21264
- setStoredValue = _useState2[1]; // Return a wrapped version of useState's setter function that ...
21265
- // ... persists the new value to localStorage.
21266
-
21267
-
21268
- var setValue = function setValue(value) {
21269
- try {
21270
- // Allow value to be a function so we have same API as useState
21271
- var valueToStore = value instanceof Function ? value(storedValue) : value; // Save state
21272
-
21273
- setStoredValue(valueToStore); // Save to local storage
21274
-
21275
- window.localStorage.setItem(key, JSON.stringify(valueToStore));
21276
- } catch (error) {
21277
- // A more advanced implementation would handle the error case
21278
- console.log(error);
21279
- }
21280
- };
21281
-
21282
- return [storedValue, setValue];
21283
- }
21284
-
21285
- /* harmony default export */ var hooks_useLocalStorage = (useLocalStorage);
21286
  // CONCATENATED MODULE: ./app/react/ui/SeoBar/index.js
21287
  function SeoBar_slicedToArray(arr, i) { return SeoBar_arrayWithHoles(arr) || SeoBar_iterableToArrayLimit(arr, i) || SeoBar_unsupportedIterableToArray(arr, i) || SeoBar_nonIterableRest(); }
21288
 
@@ -39150,7 +39359,7 @@ function GlobalStyle_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39150
 
39151
 
39152
  var METABOX_MODULE_NAME = "seopress-js-module-seo-metabox";
39153
- var SCGlobalStyle = Object(styled_components_browser_esm["a" /* createGlobalStyle */])(["body #", "{--primaryColor:#007cba;--paragraphColor:#757575;--fontSize:13px;--fontFamily:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;--color:#757575;--colorP:#3c434a;--colorDark:#1e1e1e;--colorAlert:#a00;--colorWarning:#ffba00;--colorSuccess:#4ab866;--colorLowAlert:#e39f48;--colorPre:#37864b;--colorIcon:#d7dade;--lineHeight:24px;--titleColor:#3c434a;--titleFontSize:20px;--titleFontWeight:normal;--titleMargin:10px 0;--backgroundPrimary:#007cba;--backgroundPrimaryHover:#006ba1;--backgroundSecondaryHover:#f0f0f0;--borderColor:#a7aaad;--borderColorLight:#dcdcde;--borderColorLight40:rgba(220,220,222,0.4);--borderColorCard:#e2e4e7;--borderColorTab:#c3c4c7;--fontWeight:normal;.flex{display:flex;}.inline-flex{display:inline-flex;}.flex-wrap{flex-wrap:wrap;}.items-center{align-items:center;}.justify-content{justify-content:space-evenly;}.mt-0{margin-top:0 !important;}.mt-1{margin-top:0.25rem !important;}.mt-2{margin-top:0.5rem !important;}.mt-3{margin-top:1rem !important;}.mt-4{margin-top:1.5rem !important;}.mt-5{margin-top:3rem !important;}.mt-auto{margin-top:auto !important;}.me-0{margin-right:0 !important;}.me-1{margin-right:0.25rem !important;}.me-2{margin-right:0.5rem !important;}.me-3{margin-right:1rem !important;}.me-4{margin-right:1.5rem !important;}.me-5{margin-right:3rem !important;}.me-auto{margin-right:auto !important;}.mb-0{margin-bottom:0 !important;}.mb-1{margin-bottom:0.25rem !important;}.mb-2{margin-bottom:0.5rem !important;}.mb-3{margin-bottom:1rem !important;}.mb-4{margin-bottom:1.5rem !important;}.mb-5{margin-bottom:3rem !important;}.mb-auto{margin-bottom:auto !important;}.ms-0{margin-left:0 !important;}.ms-1{margin-left:0.25rem !important;}.ms-2{margin-left:0.5rem !important;}.ms-3{margin-left:1rem !important;}.ms-4{margin-left:1.5rem !important;}.ms-5{margin-left:3rem !important;}.ms-auto{margin-left:auto !important;}.w-1\\/2{width:50%;}.w-1\\/5{width:20%;}.w-2\\/5{width:40%;}.w-3\\/5{width:60%;}.w-4\\/5{width:80%;}.w-1\\/4{width:25%;}.w-2\\/4{width:50%;}.w-3\\/4{width:75%;}.w-1\\/12{width:8.3%;}.w-2\\/12{width:16.6%;}.w-3\\/12{width:25%;}.w-4\\/12{width:33%;}.w-5\\/12{width:41.6%;}.w-6\\/12{width:50%;}.w-7\\/12{width:58.3%;}.w-8\\/12{width:66%;}.w-9\\/12{width:75%;}.w-10\\/12{width:83.3%;}.w-11\\/12{width:91.6%;}.w-full{width:100%;}.relative{position:relative;}.absolute{position:absolute;}.form-textarea{font-family:var(--fontFamily);padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;color:var(--colorP);border-radius:2px;border:1px solid var(--color);font-size:var(--fontSize);line-height:normal;appearance:none;background:none;}.form-textarea:focus,.form-textarea:active{border-color:var(--backgroundPrimary);box-shadow:0 0 0 1px var(--backgroundPrimary);outline:2px solid transparent;}@keyframes sp-fade-in-out{0%{opacity:0;bottom:0;visibility:hidden;}25%{opacity:1;bottom:40px;visibility:visible;}75%{opacity:1;visibility:visible;}100%{opacity:0;visibility:hidden;}}@keyframes sp-beacon-toggle{0%{opacity:0;bottom:-20px;visibility:hidden;}100%{opacity:1;bottom:0px;visibility:visible;}}font-size:var(--fontSize);font-family:var(--fontFamily);font-weight:var(--fontWeight);line-height:var(--lineHeight);-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;color:var(--colorP);letter-spacing:inherit;input[type=\"checkbox\"]{font-family:var(--fontFamily);padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:2px;border:1px solid var(--color);font-size:16px;line-height:normal;border:1px solid var(--colorDark);margin-right:12px;transition:none;border-radius:2px;background:#fff;color:var(--colorDark);clear:none;cursor:pointer;display:inline-block;line-height:0;margin:-1px 4px 0 0 !important;outline:0;padding:0 !important;text-align:center;vertical-align:top;width:20px;height:20px;-webkit-appearance:none;appearance:none;transition:0.1s border-color ease-in-out;}input[type=\"checkbox\"]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--primaryColor);outline:2px solid transparent;}input[type=\"checkbox\"]:checked::before{content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e\");background:var(--primaryColor);margin:-1px;width:20px;height:20px;left:0;top:0;}h1,h2,h3,h4,h5,h6{display:block;font-weight:600;}h1:not(*):before,h1:before,h2:before,h3:before,h4:before,h5:before,h6:before,h1:after,h2:after,h3:after,h4:after,h5:after,h6:after{content:none;}p{font-family:var(--fontFamily);font-size:var(--fontSize);font-weight:var(--fontWeight);color:var(--colorP);line-height:1.5;margin:1em 0;}a{color:var(--primaryColor);text-decoration:underline;}ul{list-style:none;padding:0;margin:0;}a:hover{text-decoration:underline;}.description{display:block;font-size:12px;color:var(--color);}.description-alt{padding:1em 0;border-top:1px solid var(--borderColorLight);border-bottom:1px solid var(--borderColorLight);display:flex;}.description-alt svg{vertical-align:middle;align-self:center;fill:#f0b849;flex-shrink:0;margin-right:16px;}.sp-fixed{position:sticky;width:100%;left:0px;bottom:-21px;display:flex;background:#fff;border-top:1px solid var(--borderColorLight);margin-top:20px;padding:15px 0 5px 0;}.resizable{position:relative;}.resizable::after{content:\"\";transition:all 150ms linear;opacity:0;background:var(--backgroundPrimary);position:absolute;top:0;left:0;height:5px;width:100%;}.resizable:hover::after,.resizable:focus::after,.resizable:active::after{opacity:1;}.sp-seo-metabox{position:fixed;left:10%;bottom:0;z-index:9999;background-color:rgb(255,255,255);width:70%;height:400px;box-sizing:border-box;flex-shrink:0;box-shadow:rgb(0 0 0 / 5%) 0px 0px 0px 1px,rgb(0 0 0 / 15%) 0px 5px 30px 0px,rgb(0 0 0 / 5%) 0px 3px 3px 0px;border-radius:4px;border:none;animation-name:sp-beacon-toggle;animation-duration:200ms;animation-iteration-count:1;animation-fill-mode:forwards;max-height:calc(100% - 93px);}.sp-cursor-pointer{cursor:pointer;}@media only screen and (max-width:600px){.sp-seo-metabox{height:auto;overflow-y:auto;}.flex{flex-wrap:wrap;}[class^=\"w-\"]{width:100%;}}}@keyframes anim-loading{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.anim-loading-layout{animation-name:anim-loading-layout;animation-duration:1s;animation-iteration-count:infinite;animation-fill-mode:forwards;}@keyframes anim-loading-layout{0%{opacity:0;}50%{opacity:1;}100%{opacity:0;}}.analysis-score{svg{display:inline-block;height:30px;width:30px;margin:0;border-radius:100%;position:relative;font-weight:600;shape-rendering:geometricprecision;font-size:.5rem;vertical-align:middle;margin-right:15px;circle{stroke-dashoffset:0;transition:stroke-dashoffset 1s linear;stroke:#ccc;stroke-width:2em;}}&.notgood #bar{stroke-dashoffset:565;stroke:var(--colorWarning);}&.good #bar{stroke-dashoffset:0;stroke:var(--colorSuccess);}}.dashicons{vertical-align:middle;}.sp-dashicons-ok,.sp-dashicons-not{color:#fff;background:var(--colorSuccess);border-radius:50px;margin-right:10px;}.sp-dashicons-not{background:var(--colorAlert);}.sp-arrow::after{content:\"\f343\";font-family:\"Dashicons\";position:absolute;right:10px;top:calc(50% - 12px);fontSize:14px;}.sp-seo-metabox .accordion__button[aria-expanded=true] .sp-arrow:after{content:\"\f347\";}.sp-google-preview{margin-left:10px;flex-grow:1;}@media only screen and (max-width:600px){.sp-google-preview{margin-left:0;}}body.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox,body.block-editor-page.folded #seopress-js-module-seo-metabox .sp-seo-metabox,body.is-fullscreen-mode.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox{max-width:100%;width:100% !important;left:0px;box-shadow:none;border-right:1px solid var(--borderColorLight);", "}body.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox{max-width:calc(100% - 160px);left:160px;", "}body.block-editor-page.folded:not(.is-fullscreen-mode) #seopress-js-module-seo-metabox .sp-seo-metabox{left:36px;max-width:calc(100% - 36px);", "}@media only screen and (max-width:1400px){body:not(.wp-admin) #seopress-js-module-seo-metabox .sp-seo-metabox{width:100%;max-width:100%;min-width:100%;left:0;}}@media only screen and (max-width:782px){body.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox,body.block-editor-page.folded #seopress-js-module-seo-metabox .sp-seo-metabox,body.block-editor-page.auto-fold #seopress-js-module-seo-metabox .sp-seo-metabox,body.is-fullscreen-mode.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox,body.block-editor-page.folded:not(.is-fullscreen-mode) #seopress-js-module-seo-metabox .sp-seo-metabox{width:100%;max-width:100%;min-width:100%;left:0;}}"], METABOX_MODULE_NAME, function (_ref) {
39154
  var isSidebarGutenbergOpened = _ref.isSidebarGutenbergOpened;
39155
  return isSidebarGutenbergOpened && "\n max-width: calc(100% - 280px);\n ";
39156
  }, function (_ref2) {
18379
 
18380
  // CONCATENATED MODULE: ./app/react/ui/Beacon/index.js
18381
 
18382
+ var SCBeaconGrab = styled_components_browser_esm["b" /* default */].div.withConfig({
18383
  componentId: "sc-oa9y3j-0"
18384
+ })(["&&&{position:absolute;top:-10px;left:-10px;display:none;align-items:center;justify-content:center;font-size:16px;width:28px;height:28px;border-radius:999px;padding:2px;background-color:var(--primaryColor);border:1px solid #fff;z-index:100010;}"]);
18385
  var SCBeacon = styled_components_browser_esm["b" /* default */].div.withConfig({
18386
  componentId: "sc-oa9y3j-1"
18387
+ })(["&&&{> .seopress-beacon-el{width:60px;height:60px;border-radius:200px;align-items:center;display:flex;justify-content:center;line-height:60px;background-color:#4e21e7;transition:background-color 200ms linear 0s,transform 200ms linear 0s;min-width:60px;&:hover{cursor:pointer;background-color:rgb(78 33 231 / 80%);}}appearance:none;margin:0px;outline:none;padding:0px;position:fixed;user-select:none;z-index:100009;border:none;color:white;cursor:pointer;-webkit-tap-highlight-color:transparent;", " &:hover{.dashicons{display:flex;}}img{width:38px;height:38px;}", "}body:not(.wp-admin) &&&{left:", ";top:", ";}body.wp-admin &&&{bottom:40px;left:180px;}body.wp-admin.block-editor-page.folded:not(.is-fullscreen-mode) &&&{left:60px;}body.wp-admin.is-fullscreen-mode.block-editor-page &&&{left:20px;}@media screen and (max-width:782px){body.wp-admin.block-editor-page &&&{left:10px !important;bottom:10px;}}"], function (_ref) {
18388
+ var isDragging = _ref.isDragging;
18389
+ return !isDragging && "\n &:focus {\n box-shadow: 0 0 0 2px var(--primaryColor);\n outline: 2px solid var(--primaryColor);\n }";
18390
+ }, function (_ref2) {
18391
+ var isDragging = _ref2.isDragging;
18392
+ return isDragging && "\n opacity: 0.8;\n cursor: grabbing !important;\n .dashicons {\n display: flex;\n }\n ";
18393
+ }, function (_ref3) {
18394
+ var x = _ref3.x;
18395
+ return x && "".concat(x, "%");
18396
+ }, function (_ref4) {
18397
+ var y = _ref4.y;
18398
+ return y && "".concat(y, "%");
18399
+ });
18400
  /* harmony default export */ var ui_Beacon = (SCBeacon);
18401
  // EXTERNAL MODULE: ./node_modules/lodash/isNil.js
18402
  var isNil = __webpack_require__(5);
18604
  }
18605
  }, children);
18606
  };
18607
+ // CONCATENATED MODULE: ./app/react/hooks/useLocalStorage.js
18608
+ function useLocalStorage_slicedToArray(arr, i) { return useLocalStorage_arrayWithHoles(arr) || useLocalStorage_iterableToArrayLimit(arr, i) || useLocalStorage_unsupportedIterableToArray(arr, i) || useLocalStorage_nonIterableRest(); }
18609
+
18610
+ function useLocalStorage_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
18611
+
18612
+ function useLocalStorage_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return useLocalStorage_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return useLocalStorage_arrayLikeToArray(o, minLen); }
18613
+
18614
+ function useLocalStorage_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18615
+
18616
+ function useLocalStorage_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18617
+
18618
+ function useLocalStorage_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18619
+
18620
+
18621
+
18622
+ function useLocalStorage(key, initialValue) {
18623
+ // State to store our value
18624
+ // Pass initial state function to useState so logic is only executed once
18625
+ var _useState = Object(react["useState"])(function () {
18626
+ try {
18627
+ // Get from local storage by key
18628
+ var item = window.localStorage.getItem(key); // Parse stored json or if none return initialValue
18629
+
18630
+ // Parse stored json or if none return initialValue
18631
+ return item ? JSON.parse(item) : initialValue;
18632
+ } catch (error) {
18633
+ // If error also return initialValue
18634
+ console.log(error);
18635
+ return initialValue;
18636
+ }
18637
+ }),
18638
+ _useState2 = useLocalStorage_slicedToArray(_useState, 2),
18639
+ storedValue = _useState2[0],
18640
+ setStoredValue = _useState2[1]; // Return a wrapped version of useState's setter function that ...
18641
+ // ... persists the new value to localStorage.
18642
+
18643
+
18644
+ var setValue = function setValue(value) {
18645
+ try {
18646
+ // Allow value to be a function so we have same API as useState
18647
+ var valueToStore = value instanceof Function ? value(storedValue) : value; // Save state
18648
+
18649
+ setStoredValue(valueToStore); // Save to local storage
18650
+
18651
+ window.localStorage.setItem(key, JSON.stringify(valueToStore));
18652
+ } catch (error) {
18653
+ // A more advanced implementation would handle the error case
18654
+ console.log(error);
18655
+ }
18656
+ };
18657
+
18658
+ return [storedValue, setValue];
18659
+ }
18660
+
18661
+ /* harmony default export */ var hooks_useLocalStorage = (useLocalStorage);
18662
+ // CONCATENATED MODULE: ./app/react/hooks/useWindowDimensions.js
18663
+ function useWindowDimensions_slicedToArray(arr, i) { return useWindowDimensions_arrayWithHoles(arr) || useWindowDimensions_iterableToArrayLimit(arr, i) || useWindowDimensions_unsupportedIterableToArray(arr, i) || useWindowDimensions_nonIterableRest(); }
18664
+
18665
+ function useWindowDimensions_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
18666
+
18667
+ function useWindowDimensions_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return useWindowDimensions_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return useWindowDimensions_arrayLikeToArray(o, minLen); }
18668
+
18669
+ function useWindowDimensions_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18670
+
18671
+ function useWindowDimensions_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18672
+
18673
+ function useWindowDimensions_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18674
+
18675
+
18676
+
18677
+ function getWindowDimensions() {
18678
+ var _window = window,
18679
+ width = _window.innerWidth,
18680
+ height = _window.innerHeight;
18681
+ return {
18682
+ width: width,
18683
+ height: height
18684
+ };
18685
+ }
18686
+
18687
+ function useWindowDimensions() {
18688
+ var _useState = Object(react["useState"])(getWindowDimensions()),
18689
+ _useState2 = useWindowDimensions_slicedToArray(_useState, 2),
18690
+ windowDimensions = _useState2[0],
18691
+ setWindowDimensions = _useState2[1];
18692
+
18693
+ Object(react["useEffect"])(function () {
18694
+ function handleResize() {
18695
+ setWindowDimensions(getWindowDimensions());
18696
+ }
18697
+
18698
+ window.addEventListener("resize", handleResize);
18699
+ return function () {
18700
+ return window.removeEventListener("resize", handleResize);
18701
+ };
18702
+ }, []);
18703
+ return windowDimensions;
18704
+ }
18705
  // CONCATENATED MODULE: ./app/react/components/Beacon/index.js
18706
 
18707
 
18708
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
18709
+
18710
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
18711
+
18712
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18713
+
18714
+ function Beacon_slicedToArray(arr, i) { return Beacon_arrayWithHoles(arr) || Beacon_iterableToArrayLimit(arr, i) || Beacon_unsupportedIterableToArray(arr, i) || Beacon_nonIterableRest(); }
18715
+
18716
+ function Beacon_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
18717
+
18718
+ function Beacon_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return Beacon_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Beacon_arrayLikeToArray(o, minLen); }
18719
+
18720
+ function Beacon_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
18721
+
18722
+ function Beacon_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
18723
+
18724
+ function Beacon_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18725
 
18726
 
18727
 
18728
 
18729
+
18730
+
18731
+
18732
+
18733
+ var getPercentPositon = function getPercentPositon(screen, position) {
18734
+ return Number(position * 100 / screen).toFixed(2);
18735
+ };
18736
+
18737
  var Beacon_Beacon = function Beacon() {
18738
+ var isGutenberg = MetaboxContext_useIsGutenberg();
18739
+
18740
  var _useContext = Object(react["useContext"])(MetaboxContext),
18741
  actions = _useContext.actions;
18742
 
18743
+ var _useLocalStorage = hooks_useLocalStorage("seopress_beacon_position", {
18744
+ x: 2,
18745
+ y: 90
18746
+ }),
18747
+ _useLocalStorage2 = Beacon_slicedToArray(_useLocalStorage, 2),
18748
+ value = _useLocalStorage2[0],
18749
+ setValue = _useLocalStorage2[1];
18750
+
18751
+ var _useState = Object(react["useState"])({
18752
+ isDragging: false
18753
+ }),
18754
+ _useState2 = Beacon_slicedToArray(_useState, 2),
18755
+ state = _useState2[0],
18756
+ setState = _useState2[1];
18757
+
18758
  var onClick = function onClick(e) {
18759
  e.preventDefault();
18760
+
18761
+ if (state.isDragging) {
18762
+ return;
18763
+ }
18764
+
18765
  actions.setOpenBar(function (openBar) {
18766
  return !openBar;
18767
  });
18768
  };
18769
 
18770
+ var _useWindowDimensions = useWindowDimensions(),
18771
+ heightWindow = _useWindowDimensions.height,
18772
+ widthWindow = _useWindowDimensions.width;
18773
+
18774
+ var limitWidthRight = widthWindow - 80;
18775
+ var limitWidthLeft = 20;
18776
+ var limitHeightTop = 70;
18777
+ var limitHeightBottom = heightWindow - 80;
18778
+ var position = {
18779
+ x: value.x,
18780
+ y: value.y
18781
+ }; // mouse move
18782
+
18783
+ var handleMouseMove = Object(react["useCallback"])(function (event) {
18784
+ var e = event || window.event;
18785
+ var clientX = e.clientX,
18786
+ clientY = e.clientY;
18787
+
18788
+ if (state.isDragging) {
18789
+ var beacon = document.querySelector("#seopress-beacon-universal-metabox");
18790
+
18791
+ if (clientX <= limitWidthRight && clientX >= limitWidthLeft) {
18792
+ beacon.style.left = "".concat(getPercentPositon(widthWindow, clientX), "%");
18793
+ position = _objectSpread(_objectSpread({}, position), {}, {
18794
+ x: clientX
18795
+ });
18796
+ }
18797
+
18798
+ if (clientY <= limitHeightBottom && clientY >= limitHeightTop) {
18799
+ beacon.style.top = "".concat(getPercentPositon(heightWindow, clientY), "%");
18800
+ position = _objectSpread(_objectSpread({}, position), {}, {
18801
+ y: clientY
18802
+ });
18803
+ }
18804
+ }
18805
+ }, [state.isDragging]); // mouse left click release
18806
+
18807
+ var handleMouseUp = Object(react["useCallback"])(function () {
18808
+ if (state.isDragging) {
18809
+ setState(function (prevState) {
18810
+ return _objectSpread(_objectSpread({}, prevState), {}, {
18811
+ isDragging: false
18812
+ });
18813
+ });
18814
+ setValue({
18815
+ x: getPercentPositon(widthWindow, position.x),
18816
+ y: getPercentPositon(heightWindow, position.y)
18817
+ });
18818
+ }
18819
+ }, [state.isDragging]); // mouse left click hold
18820
+
18821
+ var handleMouseDown = Object(react["useCallback"])(function () {
18822
+ setState(function (prevState) {
18823
+ return _objectSpread(_objectSpread({}, prevState), {}, {
18824
+ isDragging: true
18825
+ });
18826
+ });
18827
+ }, []);
18828
+ Object(react["useEffect"])(function () {
18829
+ window.addEventListener("mousemove", handleMouseMove);
18830
+ window.addEventListener("mouseup", handleMouseUp);
18831
+ return function () {
18832
+ window.removeEventListener("mousemove", handleMouseMove);
18833
+ window.removeEventListener("mouseup", handleMouseUp);
18834
+ return false;
18835
+ };
18836
+ }, [handleMouseMove, handleMouseUp]);
18837
+
18838
+ if (isGutenberg) {
18839
+ return /*#__PURE__*/react_default.a.createElement(ui_Beacon, {
18840
+ id: "seopress-beacon-universal-metabox",
18841
+ onKeyUp: function onKeyUp(e) {
18842
+ if (e.keyCode === 13) {
18843
+ onClick(e);
18844
+ }
18845
+ },
18846
+ role: "button",
18847
+ tabIndex: "0"
18848
+ }, /*#__PURE__*/react_default.a.createElement("div", {
18849
+ className: "seopress-beacon-el",
18850
+ onClick: state.isDragging ? null : onClick
18851
+ }, /*#__PURE__*/react_default.a.createElement("img", {
18852
+ src: get_default()(SEOPRESS_DATA, "BEACON_SVG", getAssetsLink("/img/beacon.svg")),
18853
+ alt: ""
18854
+ })));
18855
+ }
18856
+
18857
+ return /*#__PURE__*/react_default.a.createElement(react_default.a.Fragment, null, /*#__PURE__*/react_default.a.createElement("div", {
18858
+ style: {
18859
+ display: state.isDragging ? "block" : "none",
18860
+ position: "fixed",
18861
+ width: "100%",
18862
+ height: "100%",
18863
+ top: 0,
18864
+ left: 0,
18865
+ backgroundColor: "rgba(255,255,255,0.001)",
18866
+ zIndex: 100000
18867
+ }
18868
+ }), /*#__PURE__*/react_default.a.createElement(ui_Beacon, {
18869
+ id: "seopress-beacon-universal-metabox",
18870
  onKeyUp: function onKeyUp(e) {
18871
  if (e.keyCode === 13) {
18872
  onClick(e);
18873
  }
18874
  },
18875
+ isDragging: state.isDragging,
18876
+ x: value.x,
18877
+ y: value.y,
18878
  role: "button",
18879
  tabIndex: "0"
18880
+ }, /*#__PURE__*/react_default.a.createElement("div", {
18881
+ className: "seopress-beacon-el",
18882
+ onClick: state.isDragging ? null : onClick
18883
  }, /*#__PURE__*/react_default.a.createElement("img", {
18884
  src: get_default()(SEOPRESS_DATA, "BEACON_SVG", getAssetsLink("/img/beacon.svg")),
18885
  alt: ""
18886
+ })), /*#__PURE__*/react_default.a.createElement(SCBeaconGrab, {
18887
+ className: "dashicons dashicons-move",
18888
+ onMouseDown: handleMouseDown
18889
+ })));
18890
  };
18891
 
18892
  /* harmony default export */ var components_Beacon = (Beacon_Beacon);
18960
 
18961
  var SCComponents = styled_components_browser_esm["b" /* default */].div.withConfig({
18962
  componentId: "sc-4mm9ym-0"
18963
+ })(["&&&{position:fixed;right:0;bottom:40px;padding-left:16px;padding-right:16px;animation-name:sp-fade-in-out;animation-duration:5s;animation-iteration-count:1;animation-fill-mode:forwards;visibility:hidden;z-index:10;.sp-components-snackbar__content{display:flex;align-items:center;justify-content:space-between;line-height:1.4;}.sp-components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#32373c;border-radius:4px;box-shadow:0 2px 4px rgba(0,0,0,0.3);color:#fff;padding:16px 24px;cursor:pointer;}.sp-components-snackbar .dashicons{color:#fff;}}"]);
18964
 
18965
  var Snackbar_SCSnackbar = function SCSnackbar(_ref) {
18966
  var children = _ref.children;
20570
  }
20571
  };
20572
  // CONCATENATED MODULE: ./app/react/hooks/useSWRAbort.js
20573
+ function useSWRAbort_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
20574
 
20575
+ function useSWRAbort_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { useSWRAbort_ownKeys(Object(source), true).forEach(function (key) { useSWRAbort_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { useSWRAbort_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
20576
 
20577
+ function useSWRAbort_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
20578
 
20579
 
20580
 
20597
 
20598
  return fetcherAbort.apply(void 0, args.concat([aborter.current.signal]));
20599
  }, options);
20600
+ return useSWRAbort_objectSpread(useSWRAbort_objectSpread({}, res), {}, {
20601
  abort: abort
20602
  });
20603
  }
21492
  }(react["PureComponent"]));
21493
 
21494
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21495
  // CONCATENATED MODULE: ./app/react/ui/SeoBar/index.js
21496
  function SeoBar_slicedToArray(arr, i) { return SeoBar_arrayWithHoles(arr) || SeoBar_iterableToArrayLimit(arr, i) || SeoBar_unsupportedIterableToArray(arr, i) || SeoBar_nonIterableRest(); }
21497
 
39359
 
39360
 
39361
  var METABOX_MODULE_NAME = "seopress-js-module-seo-metabox";
39362
+ var SCGlobalStyle = Object(styled_components_browser_esm["a" /* createGlobalStyle */])(["body #", "{--primaryColor:#007cba;--paragraphColor:#757575;--fontSize:13px;--fontFamily:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif;--color:#757575;--colorP:#3c434a;--colorDark:#1e1e1e;--colorAlert:#a00;--colorWarning:#ffba00;--colorSuccess:#4ab866;--colorLowAlert:#e39f48;--colorPre:#37864b;--colorIcon:#d7dade;--lineHeight:24px;--titleColor:#3c434a;--titleFontSize:20px;--titleFontWeight:normal;--titleMargin:10px 0;--backgroundPrimary:#007cba;--backgroundPrimaryHover:#006ba1;--backgroundSecondaryHover:#f0f0f0;--borderColor:#a7aaad;--borderColorLight:#dcdcde;--borderColorLight40:rgba(220,220,222,0.4);--borderColorCard:#e2e4e7;--borderColorTab:#c3c4c7;--fontWeight:normal;.flex{display:flex;}.inline-flex{display:inline-flex;}.flex-wrap{flex-wrap:wrap;}.items-center{align-items:center;}.justify-content{justify-content:space-evenly;}.mt-0{margin-top:0 !important;}.mt-1{margin-top:0.25rem !important;}.mt-2{margin-top:0.5rem !important;}.mt-3{margin-top:1rem !important;}.mt-4{margin-top:1.5rem !important;}.mt-5{margin-top:3rem !important;}.mt-auto{margin-top:auto !important;}.me-0{margin-right:0 !important;}.me-1{margin-right:0.25rem !important;}.me-2{margin-right:0.5rem !important;}.me-3{margin-right:1rem !important;}.me-4{margin-right:1.5rem !important;}.me-5{margin-right:3rem !important;}.me-auto{margin-right:auto !important;}.mb-0{margin-bottom:0 !important;}.mb-1{margin-bottom:0.25rem !important;}.mb-2{margin-bottom:0.5rem !important;}.mb-3{margin-bottom:1rem !important;}.mb-4{margin-bottom:1.5rem !important;}.mb-5{margin-bottom:3rem !important;}.mb-auto{margin-bottom:auto !important;}.ms-0{margin-left:0 !important;}.ms-1{margin-left:0.25rem !important;}.ms-2{margin-left:0.5rem !important;}.ms-3{margin-left:1rem !important;}.ms-4{margin-left:1.5rem !important;}.ms-5{margin-left:3rem !important;}.ms-auto{margin-left:auto !important;}.w-1\\/2{width:50%;}.w-1\\/5{width:20%;}.w-2\\/5{width:40%;}.w-3\\/5{width:60%;}.w-4\\/5{width:80%;}.w-1\\/4{width:25%;}.w-2\\/4{width:50%;}.w-3\\/4{width:75%;}.w-1\\/12{width:8.3%;}.w-2\\/12{width:16.6%;}.w-3\\/12{width:25%;}.w-4\\/12{width:33%;}.w-5\\/12{width:41.6%;}.w-6\\/12{width:50%;}.w-7\\/12{width:58.3%;}.w-8\\/12{width:66%;}.w-9\\/12{width:75%;}.w-10\\/12{width:83.3%;}.w-11\\/12{width:91.6%;}.w-full{width:100%;}.relative{position:relative;}.absolute{position:absolute;}.form-textarea{font-family:var(--fontFamily);padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;color:var(--colorP);border-radius:2px;border:1px solid var(--color);font-size:var(--fontSize);line-height:normal;appearance:none;background:none;}.form-textarea:focus,.form-textarea:active{border-color:var(--backgroundPrimary);box-shadow:0 0 0 1px var(--backgroundPrimary);outline:2px solid transparent;}@keyframes sp-fade-in-out{0%{opacity:0;bottom:0;visibility:hidden;}25%{opacity:1;bottom:40px;visibility:visible;}75%{opacity:1;visibility:visible;}100%{opacity:0;visibility:hidden;}}@keyframes sp-beacon-toggle{0%{opacity:0;bottom:-20px;visibility:hidden;}100%{opacity:1;bottom:0px;visibility:visible;}}font-size:var(--fontSize);font-family:var(--fontFamily);font-weight:var(--fontWeight);line-height:var(--lineHeight);-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;color:var(--colorP);letter-spacing:inherit;input[type=\"checkbox\"]{font-family:var(--fontFamily);padding:6px 8px;box-shadow:0 0 0 transparent;transition:box-shadow 0.1s linear;border-radius:2px;border:1px solid var(--color);font-size:16px;line-height:normal;border:1px solid var(--colorDark);margin-right:12px;transition:none;border-radius:2px;background:#fff;color:var(--colorDark);clear:none;cursor:pointer;display:inline-block;line-height:0;margin:-1px 4px 0 0 !important;outline:0;padding:0 !important;text-align:center;vertical-align:top;width:20px;height:20px;-webkit-appearance:none;appearance:none;transition:0.1s border-color ease-in-out;}input[type=\"checkbox\"]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--primaryColor);outline:2px solid transparent;}input[type=\"checkbox\"]:checked::before{content:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e\");background:var(--primaryColor);margin:-1px;width:20px;height:20px;left:0;top:0;}h1,h2,h3,h4,h5,h6{display:block;font-weight:600;text-align:left;}h1:not(*):before,h1:before,h2:before,h3:before,h4:before,h5:before,h6:before,h1:after,h2:after,h3:after,h4:after,h5:after,h6:after{content:none;}p{font-family:var(--fontFamily);font-size:var(--fontSize);font-weight:var(--fontWeight);color:var(--colorP);line-height:1.5;margin:1em 0;}a{color:var(--primaryColor);text-decoration:underline;}ul{list-style:none;padding:0;margin:0;}a:hover{text-decoration:underline;}.description{display:block;font-size:12px;color:var(--color);}.description-alt{padding:1em 0;border-top:1px solid var(--borderColorLight);border-bottom:1px solid var(--borderColorLight);display:flex;}.description-alt svg{vertical-align:middle;align-self:center;fill:#f0b849;flex-shrink:0;margin-right:16px;}.sp-fixed{position:sticky;width:100%;left:0px;bottom:-21px;display:flex;background:#fff;border-top:1px solid var(--borderColorLight);margin-top:20px;padding:15px 0 5px 0;}.resizable{position:relative;}.resizable::after{content:\"\";transition:all 150ms linear;opacity:0;background:var(--backgroundPrimary);position:absolute;top:0;left:0;height:5px;width:100%;}.resizable:hover::after,.resizable:focus::after,.resizable:active::after{opacity:1;}.sp-seo-metabox{position:fixed;left:10%;bottom:0;z-index:100100;background-color:rgb(255,255,255);width:70%;height:400px;box-sizing:border-box;flex-shrink:0;box-shadow:rgb(0 0 0 / 5%) 0px 0px 0px 1px,rgb(0 0 0 / 15%) 0px 5px 30px 0px,rgb(0 0 0 / 5%) 0px 3px 3px 0px;border-radius:4px;border:none;animation-name:sp-beacon-toggle;animation-duration:200ms;animation-iteration-count:1;animation-fill-mode:forwards;max-height:calc(100% - 93px);}.sp-cursor-pointer{cursor:pointer;}@media only screen and (max-width:600px){.sp-seo-metabox{height:auto;overflow-y:auto;}.flex{flex-wrap:wrap;}[class^=\"w-\"]{width:100%;}}}@keyframes anim-loading{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.anim-loading-layout{animation-name:anim-loading-layout;animation-duration:1s;animation-iteration-count:infinite;animation-fill-mode:forwards;}@keyframes anim-loading-layout{0%{opacity:0;}50%{opacity:1;}100%{opacity:0;}}.analysis-score{svg{display:inline-block;height:30px;width:30px;margin:0;border-radius:100%;position:relative;font-weight:600;shape-rendering:geometricprecision;font-size:.5rem;vertical-align:middle;margin-right:15px;circle{stroke-dashoffset:0;transition:stroke-dashoffset 1s linear;stroke:#ccc;stroke-width:2em;}}&.notgood #bar{stroke-dashoffset:565;stroke:var(--colorWarning);}&.good #bar{stroke-dashoffset:0;stroke:var(--colorSuccess);}}.dashicons{vertical-align:middle;}.sp-dashicons-ok,.sp-dashicons-not{color:#fff;background:var(--colorSuccess);border-radius:50px;margin-right:10px;}.sp-dashicons-not{background:var(--colorAlert);}.sp-arrow::after{content:\"\f343\";font-family:\"Dashicons\";position:absolute;right:10px;top:calc(50% - 12px);fontSize:14px;}.sp-seo-metabox .accordion__button[aria-expanded=true] .sp-arrow:after{content:\"\f347\";}.sp-google-preview{margin-left:10px;flex-grow:1;}@media only screen and (max-width:600px){.sp-google-preview{margin-left:0;}}body.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox,body.block-editor-page.folded #seopress-js-module-seo-metabox .sp-seo-metabox,body.is-fullscreen-mode.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox{max-width:100%;width:100% !important;left:0px;box-shadow:none;border-right:1px solid var(--borderColorLight);", "}body.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox{max-width:calc(100% - 160px);left:160px;", "}body.block-editor-page.folded:not(.is-fullscreen-mode) #seopress-js-module-seo-metabox .sp-seo-metabox{left:36px;max-width:calc(100% - 36px);", "}@media only screen and (max-width:1400px){body:not(.wp-admin) #seopress-js-module-seo-metabox .sp-seo-metabox{width:100%;max-width:100%;min-width:100%;left:0;}}@media only screen and (max-width:782px){body.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox,body.block-editor-page.folded #seopress-js-module-seo-metabox .sp-seo-metabox,body.block-editor-page.auto-fold #seopress-js-module-seo-metabox .sp-seo-metabox,body.is-fullscreen-mode.block-editor-page #seopress-js-module-seo-metabox .sp-seo-metabox,body.block-editor-page.folded:not(.is-fullscreen-mode) #seopress-js-module-seo-metabox .sp-seo-metabox{width:100%;max-width:100%;min-width:100%;left:0;}}"], METABOX_MODULE_NAME, function (_ref) {
39363
  var isSidebarGutenbergOpened = _ref.isSidebarGutenbergOpened;
39364
  return isSidebarGutenbergOpened && "\n max-width: calc(100% - 280px);\n ";
39365
  }, function (_ref2) {
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: SEO, XML sitemap, meta title, open graph, content analysis, knowledge grap
6
  Requires at least: 4.7+
7
  Tested up to: 5.8
8
  Requires PHP: 5.6
9
- Stable tag: 5.0.1
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -331,6 +331,10 @@ You're theme is probably using a deprecated function to handle the title. <a hre
331
  9. Schemas metabox
332
 
333
  == Changelog ==
 
 
 
 
334
  = 5.0.1 =
335
  * NEW Option to disable the universal SEO metabox from SEO, Advanced, Appearance tab
336
  * INFO Improve a11y
6
  Requires at least: 4.7+
7
  Tested up to: 5.8
8
  Requires PHP: 5.6
9
+ Stable tag: 5.0.2
10
  License: GPLv2 or later
11
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
 
331
  9. Schemas metabox
332
 
333
  == Changelog ==
334
+ = 5.0.2 =
335
+ * NEW Allow user to drag and drop the beacon
336
+ * INFO Allow users with edit_posts capability to use the universal SEO metabox in frontend
337
+ * FIX Fatal error: Uncaught TypeError: method_exists() in some cases
338
  = 5.0.1 =
339
  * NEW Option to disable the universal SEO metabox from SEO, Advanced, Appearance tab
340
  * INFO Improve a11y
seopress.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: SEOPress
4
  Plugin URI: https://www.seopress.org/
5
  Description: One of the best SEO plugins for WordPress.
6
  Author: SEOPress
7
- Version: 5.0.1
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
10
  Text Domain: wp-seopress
@@ -55,7 +55,7 @@ register_deactivation_hook(__FILE__, 'seopress_deactivation');
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
- define('SEOPRESS_VERSION', '5.0.1');
59
  define('SEOPRESS_AUTHOR', 'Benjamin Denis');
60
  define('SEOPRESS_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
61
  define('SEOPRESS_PLUGIN_DIR_URL', plugin_dir_url(__FILE__));
4
  Plugin URI: https://www.seopress.org/
5
  Description: One of the best SEO plugins for WordPress.
6
  Author: SEOPress
7
+ Version: 5.0.2
8
  Author URI: https://www.seopress.org/
9
  License: GPLv2
10
  Text Domain: wp-seopress
55
  ///////////////////////////////////////////////////////////////////////////////////////////////////
56
  //Define
57
  ///////////////////////////////////////////////////////////////////////////////////////////////////
58
+ define('SEOPRESS_VERSION', '5.0.2');
59
  define('SEOPRESS_AUTHOR', 'Benjamin Denis');
60
  define('SEOPRESS_PLUGIN_DIR_PATH', plugin_dir_path(__FILE__));
61
  define('SEOPRESS_PLUGIN_DIR_URL', plugin_dir_url(__FILE__));
src/Actions/Admin/ModuleMetabox.php CHANGED
@@ -20,7 +20,7 @@ class ModuleMetabox implements ExecuteHooks
20
  add_action('admin_enqueue_scripts', [$this, 'enqueue']);
21
  add_action('init', [$this, 'enqueue']);
22
 
23
- if (current_user_can(seopress_capability('manage_options'))) {
24
  add_action('wp_enqueue_scripts', [$this, 'enqueueFrontend']);
25
  }
26
  }
20
  add_action('admin_enqueue_scripts', [$this, 'enqueue']);
21
  add_action('init', [$this, 'enqueue']);
22
 
23
+ if (current_user_can(seopress_capability('edit_posts'))) {
24
  add_action('wp_enqueue_scripts', [$this, 'enqueueFrontend']);
25
  }
26
  }
src/Services/EnqueueModuleMetabox.php CHANGED
@@ -35,11 +35,11 @@ class EnqueueModuleMetabox
35
  if (function_exists('get_current_screen')) {
36
  $currentScreen = \get_current_screen();
37
 
38
- if(method_exists($currentScreen, 'is_block_editor') && $currentScreen->is_block_editor() === false){
39
  $response = false;
40
  }
41
 
42
- if(!seopress_get_service('AdvancedOption')->getAccessUniversalMetaboxGutenberg() && method_exists($currentScreen, 'is_block_editor') && $currentScreen->is_block_editor() !== false){
43
  $response = false;
44
  }
45
  }
35
  if (function_exists('get_current_screen')) {
36
  $currentScreen = \get_current_screen();
37
 
38
+ if($currentScreen && method_exists($currentScreen, 'is_block_editor') && $currentScreen->is_block_editor() === false){
39
  $response = false;
40
  }
41
 
42
+ if($currentScreen && !seopress_get_service('AdvancedOption')->getAccessUniversalMetaboxGutenberg() && method_exists($currentScreen, 'is_block_editor') && $currentScreen->is_block_editor() !== false){
43
  $response = false;
44
  }
45
  }
vendor/composer/InstalledVersions.php CHANGED
@@ -29,7 +29,7 @@ private static $installed = array (
29
  'aliases' =>
30
  array (
31
  ),
32
- 'reference' => '079dfffc347f5d65676c7cf19046d7239d0c63d6',
33
  'name' => 'wp-seopress/wp-seopress',
34
  ),
35
  'versions' =>
@@ -41,7 +41,7 @@ private static $installed = array (
41
  'aliases' =>
42
  array (
43
  ),
44
- 'reference' => '079dfffc347f5d65676c7cf19046d7239d0c63d6',
45
  ),
46
  ),
47
  );
29
  'aliases' =>
30
  array (
31
  ),
32
+ 'reference' => '942fdac370c662410c66f4f5b8f576e6f7e83383',
33
  'name' => 'wp-seopress/wp-seopress',
34
  ),
35
  'versions' =>
41
  'aliases' =>
42
  array (
43
  ),
44
+ 'reference' => '942fdac370c662410c66f4f5b8f576e6f7e83383',
45
  ),
46
  ),
47
  );
vendor/composer/installed.php CHANGED
@@ -6,7 +6,7 @@
6
  'aliases' =>
7
  array (
8
  ),
9
- 'reference' => '079dfffc347f5d65676c7cf19046d7239d0c63d6',
10
  'name' => 'wp-seopress/wp-seopress',
11
  ),
12
  'versions' =>
@@ -18,7 +18,7 @@
18
  'aliases' =>
19
  array (
20
  ),
21
- 'reference' => '079dfffc347f5d65676c7cf19046d7239d0c63d6',
22
  ),
23
  ),
24
  );
6
  'aliases' =>
7
  array (
8
  ),
9
+ 'reference' => '942fdac370c662410c66f4f5b8f576e6f7e83383',
10
  'name' => 'wp-seopress/wp-seopress',
11
  ),
12
  'versions' =>
18
  'aliases' =>
19
  array (
20
  ),
21
+ 'reference' => '942fdac370c662410c66f4f5b8f576e6f7e83383',
22
  ),
23
  ),
24
  );