14 lines
32 KiB
JavaScript
14 lines
32 KiB
JavaScript
|
|
(window.__googlesitekit_webpackJsonp=window.__googlesitekit_webpackJsonp||[]).push([[12],{1:function(t,r){t.exports=googlesitekit.i18n},100:function(t,r,e){"use strict";e.d(r,"a",(function(){return c}));var n=e(35),a=e.n(n),o=e(96),i=e.n(o),c=function(t){return i()(JSON.stringify(function t(r){var e={};return Object.keys(r).sort().forEach((function(n){var o=r[n];o&&"object"===a()(o)&&!Array.isArray(o)&&(o=t(o)),e[n]=o})),e}(t)))}},101:function(t,r,e){"use strict";(function(t){e(49),e(50)}).call(this,e(26))},102:function(t,r,e){"use strict";function n(t){return t.replace(new RegExp("\\[([^\\]]+)\\]\\((https?://[^/]+\\.\\w+/?.*?)\\)","gi"),'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>')}function a(t){return"<p>".concat(t.replace(/\n{2,}/g,"</p><p>"),"</p>")}function o(t){return t.replace(/\n/gi,"<br>")}function i(t){for(var r=t,e=0,i=[n,a,o];e<i.length;e++){r=(0,i[e])(r)}return r}e.d(r,"a",(function(){return i}))},103:function(t,r,e){"use strict";e.d(r,"b",(function(){return n})),e.d(r,"a",(function(){return a}));var n=function(t){return t=parseFloat(t),isNaN(t)||0===t?[0,0,0,0]:[Math.floor(t/60/60),Math.floor(t/60%60),Math.floor(t%60),Math.floor(1e3*t)-1e3*Math.floor(t)]},a=function(t){var r=t&&!Number.isInteger(t)?new Date(t).getTime():t;return isNaN(r)||!r?0:r}},104:function(t,r,e){"use strict";(function(t){e.d(r,"b",(function(){return o})),e.d(r,"a",(function(){return i}));var n=e(221),a=e(85),o=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Number.isNaN(Number(r)))return"";var o=e.invertColor,i=void 0!==o&&o;return Object(n.a)(t.createElement(a.a,{direction:r>0?"up":"down",invertColor:i}))},i=function(t,r){return t>0&&r>0?t/r-1:t>0?1:r>0?-1:0}}).call(this,e(3))},105:function(t,r,e){"use strict";function n(t){var r=parseFloat(t)||0;return!!Number.isInteger(r)&&r>0}e.d(r,"a",(function(){return n}))},1050:function(t,r,e){"use strict";e.r(r);var n=e(4),a=e.n(n),o=e(63),i=e(95),c=e(6),u=e.n(c),s=e(5),f=e.n(s),l=e(11),d=e.n(l),p=e(15),v=e(29);function g(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function b(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?g(Object(e),!0).forEach((function(r){u()(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):g(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var h={resetInViewHook:f.a.mark((function t(){var r,e;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.a.commonActions.getRegistry();case 2:return r=t.sent,e=r.select(v.b).getValue("useInViewResetCount"),t.next=6,h.setValue("useInViewResetCount",e+1);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})),setIsOnline:function(t){return d()(Object(p.isBoolean)(t),"value must be boolean."),h.setValue("isOnline",t)},setValues:function(t){return d()(Object(p.isPlainObject)(t),"values must be an object."),{payload:{values:t},type:"SET_VALUES"}},setValue:function(t,r){return d()(t,"key is required."),{payload:{key:t,value:r},type:"SET_VALUE"}}},y={initialState:{useInViewResetCount:0,isOnline:!0},actions:h,controls:{},reducer:function(t,r){var e=r.type,n=r.payload;switch(e){case"SET_VALUES":var a=n.values;return b(b({},t),a);case"SET_VALUE":var o=n.key,i=n.value;return b(b({},t),{},u()({},o,i));default:return t}},resolvers:{},selectors:{getValue:function(t,r){return t[r]},getInViewResetCount:function(t){return t.useInViewResetCount},getIsOnline:function(t){return t.isOnline}}},m=a.a.combineStores(a.a.commonStore,y,Object(i.a)(v.b),Object(o.b)(v.b));m.initialState,m.actions,m.controls,m.reducer,m.resolvers,m.selectors;a.a.registerStore(v.b,m)},106:function(t,r,e){"use strict";function n(t){if("number"==typeof t)return!0;var r=(t||"").toString();return!!r&&!isNaN(r)}e.d(r,"a",(function(){return n}))},107:function(t,r,e){
|
||
|
|
/* translators: %s: number of days */
|
||
|
|
Object(d._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}}}},65:function(t,r,e){"use strict";e.d(r,"b",(function(){return a})),e.d(r,"a",(function(){return o})),e.d(r,"c",(function(){return i})),e.d(r,"d",(function(){return c}));var n=e(112);function a(t){try{return new URL(t).pathname}catch(t){}return null}function o(t,r){try{return new URL(r,t).href}catch(t){}return("string"==typeof t?t:"")+("string"==typeof r?r:"")}function i(t){return"string"!=typeof t?t:t.replace(/^https?:\/\/(www\.)?/i,"").replace(/\/$/,"")}function c(t,r){if(!Object(n.a)(t))return t;if(t.length<=r)return t;var e=new URL(t),a=t.replace(e.origin,"");if(a.length<r)return a;var o=a.length-Math.floor(r)+1;return"…"+a.substr(o)}},73:function(t,r,e){"use strict";(function(t){e.d(r,"a",(function(){return k})),e.d(r,"d",(function(){return S})),e.d(r,"e",(function(){return _})),e.d(r,"c",(function(){return D})),e.d(r,"b",(function(){return A}));var n=e(17),a=e.n(n),o=e(35),i=e.n(o),c=e(6),u=e.n(c),s=e(23),f=e.n(s),l=e(15),d=e(79),p=e.n(d),v=e(1);function g(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function b(t){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?g(Object(e),!0).forEach((function(r){u()(t,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):g(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}var h=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=O(t,r),n=e.formatUnit,a=e.formatDecimal;try{return n()}catch(t){return a()}},y=function(t){var r=m(t),e=r.hours,n=r.minutes,a=r.seconds;return a=("0"+a).slice(-2),n=("0"+n).slice(-2),"00"===(e=("0"+e).slice(-2))?"".concat(n,":").concat(a):"".concat(e,":").concat(n,":").concat(a)},m=function(t){return t=parseInt(t,10),Number.isNaN(t)&&(t=0),{hours:Math.floor(t/60/60),minutes:Math.floor(t/60%60),seconds:Math.floor(t%60)}},O=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=m(t),n=e.hours,a=e.minutes,o=e.seconds;return{hours:n,minutes:a,seconds:o,formatUnit:function(){var e=r.unitDisplay,i=b(b({unitDisplay:void 0===e?"short":e},f()(r,["unitDisplay"])),{},{style:"unit"});return 0===t?_(o,b(b({},i),{},{unit:"second"})):Object(v.sprintf)(
|
||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
||
|
|
Object(v._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?_(o,b(b({},i),{},{unit:"second"})):"",a?_(a,b(b({},i),{},{unit:"minute"})):"",n?_(n,b(b({},i),{},{unit:"hour"})):"").trim()},formatDecimal:function(){var r=Object(v.sprintf)(// translators: %s: number of seconds with "s" as the abbreviated unit.
|
||
|
|
Object(v.__)("%ds","google-site-kit"),o);if(0===t)return r;var e=Object(v.sprintf)(// translators: %s: number of minutes with "m" as the abbreviated unit.
|
||
|
|
Object(v.__)("%dm","google-site-kit"),a),i=Object(v.sprintf)(// translators: %s: number of hours with "h" as the abbreviated unit.
|
||
|
|
Object(v.__)("%dh","google-site-kit"),n);return Object(v.sprintf)(
|
||
|
|
/* translators: 1: formatted seconds, 2: formatted minutes, 3: formatted hours */
|
||
|
|
Object(v._x)("%3$s %2$s %1$s","duration of time: hh mm ss","google-site-kit"),o?r:"",a?e:"",n?i:"").trim()}}},w=function(t){return 1e6<=t?Math.round(t/1e5)/10:1e4<=t?Math.round(t/1e3):1e3<=t?Math.round(t/100)/10:t},j=function(t){var r={minimumFractionDigits:1,maximumFractionDigits:1};return 1e6<=t?Object(v.sprintf)(// translators: %s: an abbreviated number in millions.
|
||
|
|
Object(v.__)("%sM","google-site-kit"),_(w(t),t%10==0?{}:r)):1e4<=t?Object(v.sprintf)(// translators: %s: an abbreviated number in thousands.
|
||
|
|
Object(v.__)("%sK","google-site-kit"),_(w(t))):1e3<=t?Object(v.sprintf)(// translators: %s: an abbreviated number in thousands.
|
||
|
|
Object(v.__)("%sK","google-site-kit"),_(w(t),t%10==0?{}:r)):_(t,{signDisplay:"never",maximumFractionDigits:1})};function k(t){var r={};return"%"===t?r={style:"percent",maximumFractionDigits:2}:"s"===t?r={style:"duration",unitDisplay:"narrow"}:t&&"string"==typeof t?r={style:"currency",currency:t}:Object(l.isPlainObject)(t)&&(r=b({},t)),r}function S(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Object(l.isFinite)(t)?t:Number(t),Object(l.isFinite)(t)||(console.warn("Invalid number",t,i()(t)),t=0);var e=k(r),n=e.style,a=void 0===n?"metric":n;return"metric"===a?j(t):"duration"===a?h(t,e):"durationISO"===a?y(t):_(t,e)}var E=p()(console.warn),_=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.locale,n=void 0===e?A():e,o=f()(r,["locale"]);try{return new Intl.NumberFormat(n,o).format(t)}catch(r){E("Site Kit numberFormat error: Intl.NumberFormat( ".concat(JSON.stringify(n),", ").concat(JSON.stringify(o)," ).format( ").concat(i()(t)," )"),r.message)}for(var c={currencyDisplay:"narrow",currencySign:"accounting",style:"unit"},u=["signDisplay","compactDisplay"],s={},l=0,d=Object.entries(o);l<d.length;l++){var p=a()(d[l],2),v=p[0],g=p[1];c[v]&&g===c[v]||(u.includes(v)||(s[v]=g))}try{return new Intl.NumberFormat(n,s).format(t)}catch(r){return new Intl.NumberFormat(n).format(t)}},D=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.locale,n=void 0===e?A():e,a=r.style,o=void 0===a?"long":a,i=r.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(v.__)(", ","google-site-kit");return t.join(s)},A=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,e=Object(l.get)(r,["_googlesitekitLegacyData","locale"]);if(e){var n=e.match(/^(\w{2})?(_)?(\w{2})/);if(n&&n[0])return n[0].replace(/_/g,"-")}return r.navigator.language}}).call(this,e(26))},78:function(t,r,e){"use strict";e.d(r,"a",(function(){return i})),e.d(r,"b",(function(){return c}));var n=e(35),a=e.n(n),o=e(84),i=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{__html:o.a.sanitize(t,r)}};function c(t){var r,e="object"===a()(t)?t.toString():t;return null==e||null===(r=e.replace)||void 0===r?void 0:r.call(e,/\/+$/,"")}},8:function(t,r,e){"use strict";(function(t){e.d(r,"p",(function(){return g})),e.d(r,"d",(function(){return b})),e.d(r,"E",(function(){return h})),e.d(r,"h",(function(){return y}));var n=e(15),a=e(34);e.d(r,"B",(function(){return a.b})),e.d(r,"C",(function(){return a.c}));var o=e(78);e.d(r,"y",(function(){return o.a})),e.d(r,"D",(function(){return o.b}));var i=e(100);e.d(r,"A",(function(){return i.a}));e(101);var c=e(73);e.d(r,"i",(function(){return c.a})),e.d(r,"n",(function(){return c.b})),e.d(r,"t",(function(){return c.c})),e.d(r,"w",(function(){return c.d})),e.d(r,"x",(function(){return c.e}));var u=e(102);e.d(r,"u",(function(){return u.a}));var s=e(103);e.d(r,"f",(function(){return s.a})),e.d(r,"g",(function(){return s.b}));var f=e(64);e.d(r,"a",(function(){return f.a})),e.d(r,"b",(function(){return f.b})),e.d(r,"c",(function(){return f.e})),e.d(r,"j",(function(){return f.f})),e.d(r,"l",(function(){return f.g})),e.d(r,"o",(function(){return f.h})),e.d(r,"z",(function(){return f.k}));var l=e(104);e.d(r,"e",(function(){return l.a})),e.d(r,"k",(function(){return l.b}));var d=e(65);e.d(r,"m",(function(){return d.a})),e.d(r,"q",(function(){return d.b})),e.d(r,"v",(function(){return d.c}));var p=e(105);e.d(r,"s",(function(){return p.a}));var v=e(106);e.d(r,"r",(function(){return v.a})),t._gsktag=a.b;var g=function(t){switch(t){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 b(t,r){var e=function(t){return"0"===t||0===t};if(e(t)&&e(r))return 0;if(e(t)||Number.isNaN(t))return null;var n=(r-t)/t;return Number.isNaN(n)||!Number.isFinite(n)?null:n}var h=function(t){try{return JSON.parse(t)&&!!t}catch(t){return!1}},y=function(t){if(!t)return"";var r=t.replace(/&#(\d+);/g,(function(t,r){return String.fromCharCode(r)})).replace(/(\\)/g,"");return Object(n.unescape)(r)}}).call(this,e(26))},84:function(t,r,e){"use strict";(function(t){e.d(r,"a",(function(){return a}));var n=e(144),a=e.n(n)()(t)}).call(this,e(26))},85:function(t,r,e){"use strict";(function(t){var n=e(0),a=e.n(n),o=e(12),i=e.n(o);function ChangeArrow(r){var e=r.direction,n=r.invertColor,a=r.width,o=r.height;return t.createElement("svg",{className:i()("googlesitekit-change-arrow","googlesitekit-change-arrow--".concat(e),{"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},r.a=ChangeArrow}).call(this,e(3))},95:function(t,r,e){"use strict";e.d(r,"a",(function(){return b})),e.d(r,"c",(function(){return y})),e.d(r,"b",(function(){return m}));var n=e(23),a=e.n(n),o=e(6),i=e.n(o),c=e(5),u=e.n(c),s=e(11),f=e.n(s),l=e(4),d=e.n(l),p=e(39),v=e(8),g=d.a.createRegistryControl,b=function(t){var r;f()(t,"storeName is required to create a snapshot store.");var e={},n={deleteSnapshot:u.a.mark((function t(){var r;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,{payload:{
|