kollapsminoriteten/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-datastore-use...

14 lines
98 KiB
JavaScript
Raw Normal View History

2023-09-26 10:24:36 +02:00
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[13],{1:function(e,t){e.exports=googlesitekit.i18n},100:function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var n=r(5),i=r.n(n),a=r(6),o=r.n(a),c=r(15),s=r.n(c),u=r(60),l=r(44);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r,n){var a=Object(u.a)(t);return function(){var t=s()(i.a.mark((function t(o,c,s,u){var f,g,p,v,b,y,m,h,O,S;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(f=e.activeModules,g=e.referenceSiteURL,p=e.trackingEnabled,v=e.trackingID,b=e.userIDHash,y=e.userRoles,m=void 0===y?[]:y,h=e.isAuthenticated,O=e.pluginVersion,p){t.next=3;break}return t.abrupt("return");case 3:return r(),S={send_to:v,event_category:o,event_label:s,value:u,dimension1:g,dimension2:m.join(","),dimension3:b,dimension4:O||"",dimension5:Array.from(l.a).join(","),dimension6:f.join(","),dimension7:h?"1":"0"},t.abrupt("return",new Promise((function(e){var t,r,i=setTimeout((function(){n.console.warn('Tracking event "'.concat(c,'" (category "').concat(o,'") took too long to fire.')),e()}),1e3),s=function(){clearTimeout(i),e()};a("event",c,d(d({},S),{},{event_callback:s})),(null===(t=n._gaUserPrefs)||void 0===t||null===(r=t.ioo)||void 0===r?void 0:r.call(t))&&s()})));case 6:case"end":return t.stop()}}),t)})));return function(e,r,n,i){return t.apply(this,arguments)}}()}},120:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i})),r.d(t,"d",(function(){return a})),r.d(t,"c",(function(){return o}));var n="editing-user-role-select-slug-key",i=[],a="dashboardSharingDialogOpen",o="resetSharingDialogOpen"},13:function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a}));var n="core/site",i="primary",a="secondary"},18:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}));var n="core/modules",i="insufficient_module_dependencies"},24:function(e,t,r){"use strict";r.d(t,"l",(function(){return n})),r.d(t,"j",(function(){return i})),r.d(t,"m",(function(){return a})),r.d(t,"k",(function(){return o})),r.d(t,"q",(function(){return c})),r.d(t,"g",(function(){return s})),r.d(t,"p",(function(){return u})),r.d(t,"h",(function(){return l})),r.d(t,"o",(function(){return f})),r.d(t,"i",(function(){return d})),r.d(t,"r",(function(){return g})),r.d(t,"n",(function(){return p})),r.d(t,"b",(function(){return v})),r.d(t,"e",(function(){return b})),r.d(t,"a",(function(){return y})),r.d(t,"d",(function(){return m})),r.d(t,"c",(function(){return h})),r.d(t,"f",(function(){return O}));var n="mainDashboard",i="entityDashboard",a="mainDashboardViewOnly",o="entityDashboardViewOnly",c="userInput",s="activation",u="splash",l="adminBar",f="settings",d="adBlockingRecovery",g="wpDashboard",p="moduleSetup",v="key-metrics",b="traffic",y="content",m="speed",h="monetization",O=[n,i,a,o,c,u,f,p]},29:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"a",(function(){return i}));var n="core/ui",i="activeContextID"},320:function(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((function(e,t,n){return e+t+encodeURIComponent(r[n]||"")}),"")}r.d(t,"a",(function(){return n}))},34:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return h})),r.d(t,"b",(function(){return m}));var n=r(98),i=e._googlesitekitTrackingData||{},a=i.activeModules,o=void 0===a?[]:a,c=i.isSiteKitScreen,s=i.track
/* translators: %s: number of days */
Object(d._n)("Last %s day","Last %s days",e,"google-site-kit"),e)};return{"last-7-days":{slug:"last-7-days",label:e(7),days:7},"last-14-days":{slug:"last-14-days",label:e(14),days:14},"last-28-days":{slug:"last-28-days",label:e(28),days:28},"last-90-days":{slug:"last-90-days",label:e(90),days:90}}}},66:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"d",(function(){return c}));var n=r(94);function i(e){try{return new URL(e).pathname}catch(e){}return null}function a(e,t){try{return new URL(t,e).href}catch(e){}return("string"==typeof e?e:"")+("string"==typeof t?t:"")}function o(e){return"string"!=typeof e?e:e.replace(/^https?:\/\/(www\.)?/i,"").replace(/\/$/,"")}function c(e,t){if(!Object(n.a)(e))return e;if(e.length<=t)return e;var r=new URL(e),i=e.replace(r.origin,"");if(i.length<t)return i;var a=i.length-Math.floor(t)+1;return"…"+i.substr(a)}},7:function(e,t,r){"use strict";r.d(t,"A",(function(){return i.b})),r.d(t,"x",(function(){return a.a})),r.d(t,"B",(function(){return a.b})),r.d(t,"z",(function(){return l})),r.d(t,"h",(function(){return f.a})),r.d(t,"v",(function(){return f.d})),r.d(t,"w",(function(){return f.e})),r.d(t,"s",(function(){return f.c})),r.d(t,"m",(function(){return f.b})),r.d(t,"t",(function(){return v})),r.d(t,"f",(function(){return b})),r.d(t,"b",(function(){return y.b})),r.d(t,"a",(function(){return y.a})),r.d(t,"c",(function(){return y.e})),r.d(t,"k",(function(){return y.g})),r.d(t,"i",(function(){return y.f})),r.d(t,"y",(function(){return y.k})),r.d(t,"j",(function(){return m.b})),r.d(t,"q",(function(){return m.c})),r.d(t,"e",(function(){return m.a})),r.d(t,"o",(function(){return h.b})),r.d(t,"l",(function(){return h.a})),r.d(t,"u",(function(){return h.c})),r.d(t,"r",(function(){return O})),r.d(t,"p",(function(){return S})),r.d(t,"n",(function(){return w})),r.d(t,"d",(function(){return j})),r.d(t,"C",(function(){return E})),r.d(t,"g",(function(){return k}));var n=r(14),i=r(34),a=r(73),o=r(33),c=r.n(o),s=r(90),u=r.n(s),l=function(e){return u()(JSON.stringify(function e(t){var r={};return Object.keys(t).sort().forEach((function(n){var i=t[n];i&&"object"===c()(i)&&!Array.isArray(i)&&(i=e(i)),r[n]=i})),r}(e)))};r(96);var f=r(74);function d(e){return e.replace(new RegExp("\\[([^\\]]+)\\]\\((https?://[^/]+\\.\\w+/?.*?)\\)","gi"),'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')}function g(e){return"<p>".concat(e.replace(/\n{2,}/g,"</p><p>"),"</p>")}function p(e){return e.replace(/\n/gi,"<br>")}function v(e){for(var t=e,r=0,n=[d,g,p];r<n.length;r++){t=(0,n[r])(t)}return t}var b=function(e){return e=parseFloat(e),isNaN(e)||0===e?[0,0,0,0]:[Math.floor(e/60/60),Math.floor(e/60%60),Math.floor(e%60),Math.floor(1e3*e)-1e3*Math.floor(e)]},y=r(64),m=r(97),h=r(66);function O(e){var t=parseFloat(e)||0;return!!Number.isInteger(t)&&t>0}function S(e){if("number"==typeof e)return!0;var t=(e||"").toString();return!!t&&!isNaN(t)}var w=function(e){switch(e){case"minute":return 60;case"hour":return 3600;case"day":return 86400;case"week":return 604800;case"month":return 2592e3;case"year":return 31536e3}};function j(e,t){var r=function(e){return"0"===e||0===e};if(r(e)&&r(t))return 0;if(r(e)||Number.isNaN(e))return null;var n=(t-e)/e;return Number.isNaN(n)||!Number.isFinite(n)?null:n}var E=function(e){try{return JSON.parse(e)&&!!e}catch(e){return!1}},k=function(e){if(!e)return"";var t=e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(t)})).replace(/(\\)/g,"");return Object(n.unescape)(t)}},73:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(33),i=r.n(n),a=r(84),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:a.a.sanitize(e,t)}};function c(e){var t,r="object"===i()(e)?e.toString():e;return null==r||null===(t=r.replace)||void 0===t?void 0:t.call(r,/\/+$/,"")}},734:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return S}));var n=r(4),i=r.n(n),a=r(58),o=r(735),c=r(9),s=r(736),u=r(737),l=r(738),f
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
Object(p._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),i?E(i,b(b({},o),{},{unit:"second"})):"",n?E(n,b(b({},o),{},{unit:"minute"})):"",r?E(r,b(b({},o),{},{unit:"hour"})):"").trim()},formatDecimal:function(){var t=Object(p.sprintf)(// translators: %s: number of seconds with "s" as the abbreviated unit.
Object(p.__)("%ds","google-site-kit"),i);if(0===e)return t;var a=Object(p.sprintf)(// translators: %s: number of minutes with "m" as the abbreviated unit.
Object(p.__)("%dm","google-site-kit"),n),o=Object(p.sprintf)(// translators: %s: number of hours with "h" as the abbreviated unit.
Object(p.__)("%dh","google-site-kit"),r);return Object(p.sprintf)(
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
Object(p._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),i?t:"",n?a:"",r?o:"").trim()}}},h=function(e){return 1e6<=e?Math.round(e/1e5)/10:1e4<=e?Math.round(e/1e3):1e3<=e?Math.round(e/100)/10:e},O=function(e){var t={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in millions.
Object(p.__)("%sM","google-site-kit"),E(h(e),e%10==0?{}:t)):1e4<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
Object(p.__)("%sK","google-site-kit"),E(h(e))):1e3<=e?Object(p.sprintf)(// translators: %s: an abbreviated number in thousands.
Object(p.__)("%sK","google-site-kit"),E(h(e),e%10==0?{}:t)):E(e,{signDisplay:"never",maximumFractionDigits:1})};function S(e){var t={};return"%"===e?t={style:"percent",maximumFractionDigits:2}:"s"===e?t={style:"duration",unitDisplay:"narrow"}:e&&"string"==typeof e?t={style:"currency",currency:e}:Object(f.isPlainObject)(e)&&(t=b({},e)),t}function w(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=Object(f.isFinite)(e)?e:Number(e),Object(f.isFinite)(e)||(console.warn("Invalid number",e,o()(e)),e=0);var r=S(t),n=r.style,i=void 0===n?"metric":n;return"metric"===i?O(e):"duration"===i?y(e,r):E(e,r)}var j=g()(console.warn),E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.locale,n=void 0===r?_():r,a=l()(t,["locale"]);try{return new Intl.NumberFormat(n,a).format(e)}catch(t){j("Site Kit numberFormat error: Intl.NumberFormat( ".concat(JSON.stringify(n),", ").concat(JSON.stringify(a)," ).format( ").concat(o()(e)," )"),t.message)}for(var c={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},s=["signDisplay","compactDisplay"],u={},f=0,d=Object.entries(a);f<d.length;f++){var g=i()(d[f],2),p=g[0],v=g[1];c[p]&&v===c[p]||(s.includes(p)||(u[p]=v))}try{return new Intl.NumberFormat(n,u).format(e)}catch(t){return new Intl.NumberFormat(n).format(e)}},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.locale,n=void 0===r?_():r,i=t.style,a=void 0===i?"long":i,o=t.type,c=void 0===o?"conjunction":o;if(Intl.ListFormat){var s=new Intl.ListFormat(n,{style:a,type:c});return s.format(e)}
/* translators: used between list items, there is a space after the comma. */var u=Object(p.__)(", ","google-site-kit");return e.join(u)},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e,r=Object(f.get)(t,["_googlesitekitLegacyData","locale"]);if(r){var n=r.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return t.navigator.language}}).call(this,r(26))},740:function(e,t,r){"use strict";(function(e){var n=r(27),i=r(1),a=r(24),o={slug:"unifiedDashboard",contexts:[a.l,a.m],version:"1.68.0",gaEventCategory:function(e){return"".concat(e,"_unified-dashboard")},steps:[{target:".googlesitekit-navigation",title:Object(i.__)("New! Navigate your dashboard easily","google-site-kit"),content:Object(i.__)("Jump straight to the relevant section in your dashboard with just one click - no more scrolling.","google-site-kit"),placement:"bottom"},{target:".googlesitekit-entity-search",title:Object(i.__)("Check stats for a specific post","google-site-kit"),content:Object(i.__)("Search by URL or by post title and your dashboard will be filtered to show stats just for that URL.","google-site-kit"),placement:"bottom"},{target:".googlesitekit-widget--searchFunnel",title:Object(i.__)("See trends over time for your sites Search metrics","google-site-kit"),content:Object(i.__)("The updated Search Funnel shows you a more comprehensive view of how traffic from Search is changing.","google-site-kit"),placement:"top-end"}],callback:function(t){var r=t.type,i=t.index;n.b.TOOLTIP===r&&2===i&&setTimeout((function(){var t=e.document.querySelector(".googlesitekit-tour-tooltip"),r=e.document.querySelector("#wpadminbar");t&&r&&e.scrollTo({top:e.scrollY+t.getBoundingClientRect().top-r.offsetHeight,behavior:"smooth"})}),50)}};t.a=o}).call(this,r(26))},743:function(e,t,r){"use strict";var n=r(5),i=r.n(n),a=r(6),o=r.n(a),c=r(11),s=r.n(c),u=r(14),l=r(37),f=r.n(l),d=r(4),g=r.n(d),p=r(9),v=r(13),b=r(18),y=r(41),m=r(45),h=r(58);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=h.a.receiveError,j=h.a.clearError,E=g.a.createRegistrySelector,k={keyMetricsSettings:void 0},_=Object(m.a)({baseName:"getKeyMetricsSettings",controlCallback:function(){return f.a.get("core","user","key-metrics",void 0,{useCache:!1})},reducerCallback:function(e,t){return S(S({},e),{},{keyMetricsSettings:t})}}),x=Object(m.a)({baseName:"saveKeyMetricsSettings",controlCallback:function(e){return f.a.set("core","user","key-metrics",{settings:e})},reducerCallback:function(e,t){return S(S({},e),{},{keyMetricsSettings:t})},argsToParams:function(e){return e},validateParams:function(e){s()(Object(u.isPlainObject)(e),"Settings should be an object.")}}),T={setKeyMetricsSetting:function(e,t){return{type:"SET_KEY_METRICS_SETTING",payload:{settingID:e,value:t}}},saveKeyMetricsSettings:i.a.mark((function e(){var t,r,n,a,o,c,l=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=l.length>0&&void 0!==l[0]?l[0]:{},s()(Object(u.isPlainObject)(t),"key metric settings should be an object to save."),e.next=4,j("saveKeyMetricsSettings",[]);case 4:return e.next=6,g.a.commonActions.getRegistry();case 6:return r=e.sent,n=r.select(p.a).getKeyMetricsSettings(),e.next=10,x.actions.fetchSaveKeyMetricsSettings(S(S({},n),t));case 10:if(a=e.sent,o=a.response,!(c=a.error)){e.next=18;break}return e.next=16,w(c,"saveKeyMetricsSettings",[]);case 16:e.next=21;break;case 18:if(!Object(u.isEmpty)(t)&&!t.widgetSlugs){e.next=21;break}return e.next=21,r.dispatch(v.c).setKeyMetricsSetupCompleted(!0);case 21:return e.abrupt("return",{