kollapsminoriteten/wp-content/plugins/google-site-kit/dist/assets/js/googlesitekit-modules-analy...

18 lines
84 KiB
JavaScript
Raw Normal View History

2023-01-25 20:43:46 +01:00
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[19],{1:function(t,e){t.exports=googlesitekit.i18n},107:function(t,e,r){"use strict";r.d(e,"a",(function(){return b})),r.d(e,"c",(function(){return m})),r.d(e,"b",(function(){return h}));var n=r(22),a=r.n(n),o=r(6),i=r.n(o),c=r(5),u=r.n(c),s=r(7),l=r.n(s),f=r(4),p=r.n(f),d=r(50),g=r(9),v=p.a.createRegistryControl,b=function(t){var e;l()(t,"storeName is required to create a snapshot store.");var r={},n={deleteSnapshot:u.a.mark((function t(){var e;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,{payload:{},type:"DELETE_SNAPSHOT"};case 2:return e=t.sent,t.abrupt("return",e);case 4:case"end":return t.stop()}}),t)})),restoreSnapshot:u.a.mark((function t(){var e,r,n,a,o,i,c=arguments;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=c.length>0&&void 0!==c[0]?c[0]:{},r=e.clearAfterRestore,n=void 0===r||r,t.next=4,{payload:{},type:"RESTORE_SNAPSHOT"};case 4:if(a=t.sent,o=a.cacheHit,i=a.value,!o){t.next=13;break}return t.next=10,{payload:{snapshot:i},type:"SET_STATE_FROM_SNAPSHOT"};case 10:if(!n){t.next=13;break}return t.next=13,{payload:{},type:"DELETE_SNAPSHOT"};case 13:return t.abrupt("return",o);case 14:case"end":return t.stop()}}),t)})),createSnapshot:u.a.mark((function t(){var e;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,{payload:{},type:"CREATE_SNAPSHOT"};case 2:return e=t.sent,t.abrupt("return",e);case 4:case"end":return t.stop()}}),t)}))},o=(e={},i()(e,"DELETE_SNAPSHOT",(function(){return Object(d.a)("datastore::cache::".concat(t))})),i()(e,"CREATE_SNAPSHOT",v((function(e){return function(){return Object(d.d)("datastore::cache::".concat(t),e.stores[t].store.getState())}}))),i()(e,"RESTORE_SNAPSHOT",(function(){return Object(d.b)("datastore::cache::".concat(t),g.b)})),e);return{initialState:r,actions:n,controls:o,reducer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,e=arguments.length>1?arguments[1]:void 0,n=e.type,o=e.payload;switch(n){case"SET_STATE_FROM_SNAPSHOT":var i=o.snapshot,c=(i.error,a()(i,["error"]));return c;default:return t}}}},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.a;return Object.values(t.stores).filter((function(t){return Object.keys(t.getActions()).includes("restoreSnapshot")}))},m=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.a;return Promise.all(y(t).map((function(t){return t.getActions().createSnapshot()})))},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.a;return Promise.all(y(t).map((function(t){return t.getActions().restoreSnapshot()})))}},1086:function(t,e,r){"use strict";r.r(e);var n=r(4),a=r.n(n),o=r(143),i=r.n(o),c=r(25),u=r(5),s=r.n(u),l=r(6),f=r.n(l),p=r(35),d=r.n(p),g=r(45);function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){f()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var y=Object(g.a)({baseName:"getAccountSummaries",controlCallback:function(){return d.a.get("modules","analytics-4","account-summaries",{},{useCache:!1})},reducerCallback:function(t,e){return b(b({},t),{},{accountSummaries:e})}}),m={accountSummaries:void 0},h={getAccountSummaries:s.a.mark((function t(){var e;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.commonActions.getRegistry();case 2:if(e=t.sent,void 0!==e.select(c.b).getAccountSummaries()){t.next=7;break}return t.next=7,y.actions.fetchGetAccountSummaries();case 7:case"end":return t.stop()}}),t)}))},O=a.a.combineStores(y,{initialState:m,actions:{},controls:{},reducer:f
/* translators: 1: date for user stats, 2: previous date for user stats comparison */
Object(u._x)("%1$s vs %2$s","Date range for chart tooltip","google-site-kit"),t[0].toLocaleDateString(R,C),T[r][0].toLocaleDateString(R,C)),s=Object(u.sprintf)(
/* translators: 1: selected stat label, 2: numeric value of selected stat, 3: up or down arrow , 4: different change in percentage */
Object(u._x)("%1$s: <strong>%2$s</strong> <em>%3$s %4$s</em>","Stat information for chart tooltip","google-site-kit"),g[e],v[e](t[1]),o,Object(f.u)(Math.abs(a),"%"));k.push([t[0],'<div class="'.concat(c()("googlesitekit-visualization-tooltip",{"googlesitekit-visualization-tooltip--up":a>0,"googlesitekit-visualization-tooltip--down":a<0}),'">\n\t\t\t\t<p>').concat(i,"</p>\n\t\t\t\t<p>").concat(s,"</p>\n\t\t\t</div>"),D?Object(f.f)(t[1]):t[1],D?Object(f.f)(T[r][1]):T[r][1]])}})),k}},67:function(t,e,r){"use strict";(function(t){var n=r(0),a=r.n(n),o=r(11),i=r.n(o);function ChangeArrow(e){var r=e.direction,n=e.invertColor,a=e.width,o=e.height;return t.createElement("svg",{className:i()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(r),{"googlesitekit-change-arrow--inverted-color":n}),width:a,height:o,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement("path",{d:"M5.625 10L5.625 2.375L9.125 5.875L10 5L5 -1.76555e-07L-2.7055e-07 5L0.875 5.875L4.375 2.375L4.375 10L5.625 10Z",fill:"currentColor"}))}ChangeArrow.propTypes={direction:a.a.string,invertColor:a.a.bool,width:a.a.number,height:a.a.number},ChangeArrow.defaultProps={direction:"up",invertColor:!1,width:9,height:9},e.a=ChangeArrow}).call(this,r(3))},69:function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return c}));var n=r(30),a=r.n(n),o=r(77),i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:o.a.sanitize(t,e)}};function c(t){var e,r="object"===a()(t)?t.toString():t;return null==r||null===(e=r.replace)||void 0===e?void 0:e.call(r,/\/+$/,"")}},71:function(t,e,r){"use strict";r.d(e,"a",(function(){return A})),r.d(e,"b",(function(){return I})),r.d(e,"c",(function(){return E})),r.d(e,"d",(function(){return _})),r.d(e,"e",(function(){return T})),r.d(e,"g",(function(){return C})),r.d(e,"f",(function(){return N}));var n,a=r(5),o=r.n(a),i=r(24),c=r.n(i),u=r(6),s=r.n(u),l=r(7),f=r.n(l),p=r(206),d=r.n(p),g=r(74),v=r.n(g),b=r(116);function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach((function(e){s()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var h=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e.reduce((function(t,e){return m(m({},t),e)}),{}),a=e.reduce((function(t,e){return[].concat(c()(t),c()(Object.keys(e)))}),[]),o=P(a);return f()(0===o.length,"collect() cannot accept collections with duplicate keys. Your call to collect() contains the following duplicated functions: ".concat(o.join(", "),". Check your data stores for duplicates.")),n},O=h,w=h,S=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,a=[].concat(e);return"function"!=typeof a[0]&&(n=a.shift()),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a.reduce((function(t,r){return r(t,e)}),t)}},j=h,D=h,x=h,k=function(t){return t},A=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=x.apply(void 0,c()(e.map((function(t){return t.initialState||{}}))));return{initialState:n,controls:w.apply(void 0,c()(e.map((function(t){return t.controls||{}})))),actions:O.apply(void 0,c()(e.map((function(t){return t.actions||{}})))),reducer:S.apply(void 0,[n].concat(c()(e.map((function(t){return t.reducer||k}))))),resolvers:j.apply(void 0,c()(e.map((function(t){return t.resolvers||{}})))),selectors:D.apply(void 0,c()(e.map((function(t){return t.selectors||{}}))))}},I={getRegistry:function(){return{payload:{},type:"GET_REGISTRY"}},await:o.a.mark((function t(e){r
/* translators: %s: number of days */
Object(p._n)("Last %s day","Last %s days",t,"google-site-kit"),t)};return{"last-7-days":{slug:"last-7-days",label:t(7),days:7},"last-14-days":{slug:"last-14-days",label:t(14),days:14},"last-28-days":{slug:"last-28-days",label:t(28),days:28},"last-90-days":{slug:"last-90-days",label:t(90),days:90}}}},75:function(t,e,r){"use strict";(function(t){r.d(e,"c",(function(){return w})),r.d(e,"d",(function(){return j})),r.d(e,"b",(function(){return D})),r.d(e,"a",(function(){return x}));var n=r(14),a=r.n(n),o=r(30),i=r.n(o),c=r(6),u=r.n(c),s=r(22),l=r.n(s),f=r(29),p=r(74),d=r.n(p),g=r(1);function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){u()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var y=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=m(t,e),n=r.formatUnit,a=r.formatDecimal;try{return n()}catch(t){return a()}},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=parseInt(t,10),Number.isNaN(t)&&(t=0);var r=Math.floor(t/60/60),n=Math.floor(t/60%60),a=Math.floor(t%60);return{hours:r,minutes:n,seconds:a,formatUnit:function(){var o=e.unitDisplay,i=b(b({unitDisplay:void 0===o?"short":o},l()(e,["unitDisplay"])),{},{style:"unit"});return 0===t?j(a,b(b({},i),{},{unit:"second"})):Object(g.sprintf)(
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
Object(g._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),a?j(a,b(b({},i),{},{unit:"second"})):"",n?j(n,b(b({},i),{},{unit:"minute"})):"",r?j(r,b(b({},i),{},{unit:"hour"})):"").trim()},formatDecimal:function(){var e=Object(g.sprintf)(// translators: %s: number of seconds with "s" as the abbreviated unit.
Object(g.__)("%ds","google-site-kit"),a);if(0===t)return e;var o=Object(g.sprintf)(// translators: %s: number of minutes with "m" as the abbreviated unit.
Object(g.__)("%dm","google-site-kit"),n),i=Object(g.sprintf)(// translators: %s: number of hours with "h" as the abbreviated unit.
Object(g.__)("%dh","google-site-kit"),r);return Object(g.sprintf)(
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
Object(g._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),a?e:"",n?o:"",r?i:"").trim()}}},h=function(t){return 1e6<=t?Math.round(t/1e5)/10:1e4<=t?Math.round(t/1e3):1e3<=t?Math.round(t/100)/10:t},O=function(t){var e={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=t?Object(g.sprintf)(// translators: %s: an abbreviated number in millions.
Object(g.__)("%sM","google-site-kit"),j(h(t),t%10==0?{}:e)):1e4<=t?Object(g.sprintf)(// translators: %s: an abbreviated number in thousands.
Object(g.__)("%sK","google-site-kit"),j(h(t))):1e3<=t?Object(g.sprintf)(// translators: %s: an abbreviated number in thousands.
Object(g.__)("%sK","google-site-kit"),j(h(t),t%10==0?{}:e)):j(t,{signDisplay:"never",maximumFractionDigits:1})},w=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object(f.isFinite)(t)?t:Number(t),Object(f.isFinite)(t)||(console.warn("Invalid number",t,i()(t)),t=0);var r={};if("%"===e)r={style:"percent",maximumFractionDigits:2};else{if("s"===e)return y(t,{unitDisplay:"narrow"});e&&"string"==typeof e?r={style:"currency",currency:e}:Object(f.isPlainObject)(e)&&(r=b({},e))}var n=r,a=n.style,o=void 0===a?"metric":a;return"metric"===o?O(t):"duration"===o?y(t,e):j(t,r)},S=d()(console.warn),j=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.locale,n=void 0===r?x():r,o=l()(e,["locale"]);try{return new Intl.NumberFormat(n,o).format(t)}catch(e){S("Site Kit numberFormat error: Intl.NumberFormat( ".concat(JSON.stringify(n),", ").concat(JSON.stringify(o)," ).format( ").concat(i()(t)," )"),e.message)}for(var c={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},u=["signDisplay","compactDisplay"],s={},f=0,p=Object.entries(o);f<p.length;f++){var d=a()(p[f],2),g=d[0],v=d[1];c[g]&&v===c[g]||(u.includes(g)||(s[g]=v))}try{return new Intl.NumberFormat(n,s).format(t)}catch(e){return new Intl.NumberFormat(n).format(t)}},D=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.locale,n=void 0===r?x():r,a=e.style,o=void 0===a?"long":a,i=e.type,c=void 0===i?"conjunction":i;if(Intl.ListFormat){var u=new Intl.ListFormat(n,{style:o,type:c});return u.format(t)}
/* translators: used between list items, there is a space after the comma. */var s=Object(g.__)(", ","google-site-kit");return t.join(s)},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,r=Object(f.get)(e,["_googlesitekitLegacyData","locale"]);if(r){var n=r.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return e.navigator.language}}).call(this,r(21))},77:function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var n=r(130),a=r.n(n)()(t)}).call(this,r(21))},8:function(t,e,r){"use strict";r.d(e,"f",(function(){return n})),r.d(e,"a",(function(){return a})),r.d(e,"h",(function(){return o})),r.d(e,"g",(function(){return i})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return u})),r.d(e,"k",(function(){return s})),r.d(e,"c",(function(){return l})),r.d(e,"b",(function(){return f})),r.d(e,"r",(function(){return p})),r.d(e,"q",(function(){return d})),r.d(e,"s",(function(){return g})),r.d(e,"o",(function(){return v})),r.d(e,"p",(function(){return b})),r.d(e,"n",(function(){return y})),r.d(e,"l",(function(){return m})),r.d(e,"m",(function(){return h})),r.d(e,"j",(function(){return O})),r.d(e,"i",(function(){return w}));var n="modules/analytics",a="account_create",o="property_create",i="profile_create",c="analyticsAccountCreate",u="analyticsSetup",s="https://www.googleapis.com/auth/analytics.provision",l="https://www.googleapis.com/auth/analytics.edit",f=1,p="dashboardAllTrafficWidgetDimensionName",d="dashboardAllTrafficWidgetDimensionColor",g="dashboardAllTrafficWidgetDimensionValue",v="dashboardAllTrafficWidgetActiveRowIndex",b="dashboardAllTrafficWidgetLoaded",y="ua",m="ga4",h="ga4-transitional",O="ua",w="ga4"},85:function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return s}));var n=r(14),a=r.n(n);function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,a=function(){};return{s:a,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){u=!0,o=t},f:function(){try{c||null==r.return||r.return()}finally{if(u)throw o}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var c=function(){t.localStorage&&t.localStorage.clear(),t.sessionStorage&&t.sessionStorage.clear()},u=function(t){for(var e=location.search.substr(1).split("&"),r={},n=0;n<e.length;n++)r[e[n].split("=")[0]]=decodeURIComponent(e[n].split("=")[1]);return t?r.hasOwnProperty(t)?decodeURIComponent(r[t].replace(/\+/g," ")):"":r},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:location,r=new URL(e.href);if(t)return r.searchParams&&r.searchParams.get?r.searchParams.get(t):u(t);var n,i={},c=o(r.searchParams.entries());try{for(c.s();!(n=c.n()).done;){var s=a()(n.value,2),l=s[0],f=s[1];i[l]=f}}catch(t){c.e(t)}finally{c.f()}return i}}).call(this,r(21))},86:function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return a})),r.d(e,"c",(function(){return o}));var n=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},a=function(t){return t.replace(/([a-z0-9]{1})([A-Z]{1})/g,"$1_$2").toUpperCase()};function o(t){return t.split("-").map((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})).join("")}},88:function(t,e,r){"use strict";(function(t){r(41),r(42)}).call(this,r(21))},89:function(t,e,r){"use strict";(function(t){r.d(e,"b",(functio