WRMCB=function(e){var c=console;if(c&&c.log&&c.error){c.log('Error running batched script.');c.error(e);}}
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:util', location = 'js/util/is-boolean.js' */
define("confluence-browser-metrics/util/is-boolean",[],function(){return function(a){return typeof a==="boolean"}});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:util', location = 'js/util/is-number.js' */
define("confluence-browser-metrics/util/is-number",[],function(){return function(a){return typeof a==="number"}});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:util', location = 'js/util/is-string.js' */
define("confluence-browser-metrics/util/is-string",[],function(){return function(a){return typeof a==="string"}});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:server-duration', location = '/js/reporters/server-duration-reporter.js' */
define("confluence-browser-metrics/reporters/server-duration-reporter",["internal/browser-metrics","jquery"],function(c,d){var b=d.Deferred();d(function(){var e=JSON.parse(d("#confluence-server-performance").html());if(e!==null&&e.serverDuration){b.resolve(e)}else{b.resolve({})}});var a=function(e){if(e.isInitial){return b.promise()}else{return{}}};return a});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:server-duration', location = '/js/marshallers/server-duration-marshaller.js' */
define("confluence-browser-metrics/marshallers/server-duration-marshaller",["confluence-browser-metrics/util/is-number"],function(b){function c(d){return b(d.serverDuration)}var a=function(d){if(c(d)){return{serverDuration:""+Math.floor(d.serverDuration)}}};return a});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:server-duration', location = '/js/marshallers/request-correlation-id-marshaller.js' */
define("confluence-browser-metrics/marshallers/request-correlation-id-marshaller",["confluence-browser-metrics/util/is-string"],function(a){function b(d){return a(d.requestCorrelationId)}var c=function(d){if(b(d)){return{requestCorrelationId:d.requestCorrelationId}}};return c});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:bigpipe-reporter', location = '/js/reporters/bigpipe-reporter.js' */
define("confluence-browser-metrics/reporters/bigpipe-reporter",["jquery"],function(c){var a=c.Deferred();c(function(){if(typeof AJS.BigPipe!=="undefined"&&AJS.BigPipe.metrics){a.resolve(AJS.BigPipe.metrics)}else{a.resolve({})}});var b=function(d){if(d.isInitial){return a.promise()}else{return{}}};return b});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:bigpipe-reporter', location = '/js/marshallers/bigpipe-marshaller.js' */
define("confluence-browser-metrics/marshallers/bigpipe-marshaller",["confluence-browser-metrics/util/is-boolean"],function(c){function a(d){return c(d.isBigPipeEnabled)}var b=function(d){if(a(d)){return{isBigPipeEnabled:""+d.isBigPipeEnabled}}};return b});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:bigpipe-reporter', location = '/js/marshallers/page-end-marshaller.js' */
define("confluence-browser-metrics/marshallers/page-end-marshaller",["confluence-browser-metrics/util/is-number"],function(c){function b(d){return c(d.pageEnd)}var a=function(d){if(b(d)){return{pageEnd:""+Math.floor(d.pageEnd)}}};return a});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:spa-transitions', location = '/js/reporters/spa-transitions-reporter.js' */
define("confluence-browser-metrics/reporters/spa-transitions-reporter",["jquery","ajs","confluence/storage-manager"],function(c,i,l){var d=c.Deferred();var m="page-page";var k="dashboard-page";var a=l("confluence","spa-transition");i.toInit(function(){c(document).on("click","a",g);var o=null;if(a.doesContain(m)){o=m}else{if(a.doesContain(k)){o=k}}if(o){d.resolve({"confluence-spa-transition":o});a.removeItem(o)}else{d.resolve({})}});function g(p){var o=c(this).attr("href");if(o&&e(p)&&b(o)){a.setItemQuietly(h()?k:m,true,300)}return true}function e(o){return o.which===1&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey}function b(o){return(o.indexOf("/display/")!==-1||j(o)||o.indexOf("/viewpage.action")!==-1)&&(o.indexOf("~")===-1||n(o))}function n(o){return(o.indexOf("/",o.indexOf("~")+1)!==-1)&&o.slice(-1)!=="/"}function j(o){return/spaces\/(.*)\/pages\/(.*)/.test(o)}function h(){return c("body").hasClass("dashboard")}var f=function(o){if(o.isInitial){return d.promise()}else{return{}}};return f});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:spa-transitions', location = '/js/marshallers/spa-transitions-marshaller.js' */
define("confluence-browser-metrics/marshallers/spa-transitions-marshaller",["confluence-browser-metrics/util/is-string"],function(a){function c(d){return a(d["confluence-spa-transition"])}var b=function(d){if(c(d)){return{"confluence-spa-transition":d["confluence-spa-transition"]}}};return b});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:defer-js', location = '/js/reporters/defer-js-reporter.js' */
define("confluence-browser-metrics/reporters/defer-js-reporter",["confluence/dark-features","jquery"],function(a,c){return function b(d){if(d.isInitial&&a.isEnabled("defer.js.enable")&&c("#doctheme-anchor").length===0){return{deferJs:true}}else{return{}}}});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:defer-js', location = '/js/marshallers/defer-js-marshaller.js' */
define("confluence-browser-metrics/marshallers/defer-js-marshaller",["confluence-browser-metrics/util/is-boolean"],function(c){function b(d){return c(d.deferJs)}var a=function(d){if(b(d)){return{deferJs:""+d.deferJs}}};return a});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:spa-navigation', location = 'js/marshallers/spa-navigation-marshaller.js' */
define("confluence-browser-metrics/marshallers/spa-navigation-marshaller",["confluence-browser-metrics/util/is-string"],function(a){return function(b){if(a(b.transitionTo)){return{transitionTo:b.transitionTo}}}});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.confluence.plugins.confluence-browser-metrics:browser-metrics-reporters', location = '/js/register-reporters.js' */
window["browser-metrics-plugin"].install(function(a){require(["internal/browser-metrics","internal/browser-metrics-aa-beacon","confluence-browser-metrics/reporters/spa-transitions-reporter","confluence-browser-metrics/marshallers/spa-transitions-marshaller","confluence-browser-metrics/reporters/defer-js-reporter","confluence-browser-metrics/marshallers/defer-js-marshaller","confluence-browser-metrics/reporters/server-duration-reporter","confluence-browser-metrics/marshallers/server-duration-marshaller","confluence-browser-metrics/marshallers/request-correlation-id-marshaller","confluence-browser-metrics/reporters/bigpipe-reporter","confluence-browser-metrics/marshallers/bigpipe-marshaller","confluence-browser-metrics/marshallers/page-end-marshaller","confluence-browser-metrics/marshallers/spa-navigation-marshaller"],function(k,c,i,n,j,f,d,g,b,h,m,l,e){k.addReporter(i);k.addReporter(j);k.addReporter(d);k.addReporter(h);c.addReportMarshaller(n);c.addReportMarshaller(f);c.addReportMarshaller(g);c.addReportMarshaller(b);c.addReportMarshaller(m);c.addReportMarshaller(l);c.addReportMarshaller(e);a()})});
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.plugins.browser.metrics.browser-metrics-plugin:impl', location = 'internal/browser-metrics-aa-beacon/impl.js' */
!function(n,r){var t={},e={},o={},i={},u={},c={},a={},f={},d={},s={},v={},h={},l={},p={},m={},y={},E={},b={},g={},S={},w={},k={};t=function(){var n=function(n){return"number"==typeof n};return n}(t),e=function(n,r){function t(n){return r(n.apdex)}var e=function(n){return t(n)?{apdex:""+n.apdex}:void 0};return e}(e,t),o=function(){var n=function(n){return"boolean"==typeof n};return n}(o),i=function(){var n=function(n){return"string"==typeof n};return n}(i),u=function(n,r,t,e){var o=function(n){var o={};return Object.keys(n).forEach(function(i){var u=n[i];(t(u)||r(u)||e(u)||null===u)&&(o[i]=u)}),o};return o}(u,o,t,i),c=function(){var n=function(n){return""+Math.floor(n)};return n}(c),a=function(n,r,t){function e(n){return t(n.firstPaint)}var o=function(n){return e(n)?{firstPaint:r(n.firstPaint)}:void 0};return o}(a,c,t),f=function(){function n(n){return"boolean"==typeof n.isInitial}var r=function(r){return n(r)?{isInitial:""+r.isInitial}:void 0};return r}(f),d=function(n,r){function t(n){return r(n.journeyId)}var e=function(n){return t(n)?{journeyId:n.journeyId}:void 0};return e}(d,i),s=function(n,r){function t(n){return r(n.key)}var e=function(n){return t(n)?{key:n.key}:void 0};return e}(s,i),v=function(n,r){function t(n){return r(n.navigationType)}var e=function(n){return t(n)?{navigationType:""+n.navigationType}:void 0};return e}(v,t),h=function(n,r,t){function e(n){return t(n.readyForUser)}var o=function(n){return e(n)?{readyForUser:r(n.readyForUser)}:void 0};return o}(h,c,t),l=function(n,r){function t(n){return r(n.redirectCount)}var e=function(n){return t(n)?{redirectCount:""+n.redirectCount}:void 0};return e}(l,t),p=function(n,r,t){function e(n){return t(n.resourceLoadedEnd)}var o=function(n){return e(n)?{resourceLoadedEnd:r(n.resourceLoadedEnd)}:void 0};return o}(p,c,t),m=function(){var n=function(n,r){Object.keys(n).forEach(function(t){r(t,n[t])})};return n}(m),y=function(n,r){function t(n){return Object.keys(n).length}var e=function(){function n(){this.children={},this.values=[]}return n.prototype.add=function(r,t){0==r.length?this.values.push(t):(this.children.hasOwnProperty(r[0])||(this.children[r[0]]=new n),this.children[r[0]].add(r.substr(1),t))},n.prototype.toTrieObject=function(){var n={};return r(this.children,function(r,t){n[r]=t.toTrieObject()}),0===this.values.length?n:0===t(this.children)?this.values:[n,this.values]},n.prototype.condensed=function(){var e=new n;return e.values=this.values.concat(),r(this.children,function(n,o){var i=o.condensed();0===i.values.length&&1===t(i.children)?r(i.children,function(r,t){e.children[n+r]=t}):e.children[n]=i}),e},n}(),o=e;return o}(y,m),E=function(n,r,t){function e(n){return Array.isArray(n.resourceTiming)}function o(n){return n=Math.floor(n||0),n>0?i(n):""}function i(n){return n.toString(36)}function u(n){return[c[n.initiatorType]||a,o(n.startTime),o(n.responseEnd),o(n.responseStart),o(n.requestStart),o(n.connectEnd),o(n.secureConnectionStart),o(n.connectStart),o(n.domainLookupEnd),o(n.domainLookupStart),o(n.redirectEnd),o(n.redirectStart)].join(",").replace(/,+$/,"")}var c={other:0,img:1,link:2,script:3,css:4,xmlhttprequest:5},a=-1,f=function(n){if(e(n)){var o=new t;return n.resourceTiming.forEach(function(n){var t=r.cleanUrl(n.name);o.add(t||"☠",u(n))}),{resourceTiming:JSON.stringify(o.condensed().toTrieObject())}}};return f}(E,r,y),b=function(n,r,t){function e(n){return t(n.threshold)}var o=function(n){return e(n)?{threshold:r(n.threshold)}:void 0};return o}(b,c,t),g=function(n,r,t){var e="unloadEventStart,unloadEventEnd,redirectStart,redirectEnd,fetchStart,domainLookupStart,domainLookupEnd,connectStart,connectEnd,secureConnectionStart,requestStart,responseStart,responseEnd,domLoading,domInteractive,domContentLoadedEventStart,domContentLoadedEventEnd,domComplete,loadEventStart,loadEventEnd".split(","),o=function(n){var o={};return e.forEach(function(e){t(n[e])&&(o[e]=r(n[e]))}),o};return o}(g,c,t),S=function(n,r){function t(n){return r(n.userAgent)}var e=function(n){return t(n)?{userAgent:n.userAgent}:void 0};return e}(S,i),w=function(n,r){function t(n){return"object"==typeof n.marks}var e=function(n){if(t(n)){var e={},o={},i={};return n.marks.forEach(function(n){var r="mark."+n.name;o[r]=o[r]||[],o[r].push(Math.floor(n.time))}),r(o,function(n,r){e[n]=JSON.stringify(r)}),n.measures.forEach(function(n){var r="measure."+n.name;i[r]=i[r]||[],i[r].push([Math.floor(n.startTime),Math.floor(n.duration)])}),r(i,function(n,r){e[n]=JSON.stringify(r)}),e}};return e}(w,m),k=function(n,r,t,e,o,i,u,c,a,f,d,s,v,h,l,p,m,y){var E=t.addReportMarshaller;return E(o),E(e),E(i),E(u),E(c),E(a),E(f),E(d),E(s),E(v),E(h),E(l),E(p),E(m),E(y),r.subscribe(function(n){t.beacon(n.report)}),n}(k,n,r,e,u,a,f,d,s,v,h,l,p,E,b,g,S,w)}(window["browser-metrics"],window["browser-metrics-aa-beacon"]);
}catch(e){WRMCB(e)};
;
try {
/* module-key = 'com.atlassian.plugins.browser.metrics.browser-metrics-plugin:impl', location = 'impl.js' */
define("internal/browser-metrics-plugin/collector",function(){return{install:function(){!function(){var t,n,r,e,i,o,u,a,c,s,f,l,d,p,m,h,v,y,g,_,w,b,E,T,x,S,A,k,j,I,P,C,L,M,R,O;t=function(){function t(t){return{isInitial:"isInitial"in t&&t.isInitial,start:t.timestamp,end:null,key:t.key,threshold:t.threshold,reporters:t.reporters}}return t}(),n=function(){function t(t){return{readyForUser:t.end-t.start}}return t}(),r=function(t){return function(n){var r,e=t(n),i=n.threshold,o=4*n.threshold;return r=e.readyForUser<=i?1:e.readyForUser<=o?.5:0,{apdex:r}}}(n),function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function n(t){return"function"==typeof t}function r(t){return"object"==typeof t&&null!==t}function i(){}function o(){return function(){process.nextTick(s)}}function u(){var t=0,n=new B(s),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}function a(){var t=new MessageChannel;return t.port1.onmessage=s,function(){t.port2.postMessage(0)}}function c(){return function(){setTimeout(s,1)}}function s(){for(var t=0;t<O;t+=2){var n=D[t],r=D[t+1];n(r),D[t]=void 0,D[t+1]=void 0}O=0}function f(){}function l(){return new TypeError("You cannot resolve a promise with itself")}function d(){return new TypeError("A promises callback cannot return that same promise.")}function p(t){try{return t.then}catch(n){return Y.error=n,Y}}function m(t,n,r,e){try{t.call(n,r,e)}catch(i){return i}}function h(t,n,r){q(function(t){var e=!1,i=m(r,n,function(r){e||(e=!0,n!==r?g(t,r):w(t,r))},function(n){e||(e=!0,b(t,n))},"Settle: "+(t._label||" unknown promise"));!e&&i&&(e=!0,b(t,i))},t)}function v(t,n){n._state===$?w(t,n._result):t._state===N?b(t,n._result):E(n,void 0,function(n){g(t,n)},function(n){b(t,n)})}function y(t,r){if(r.constructor===t.constructor)v(t,r);else{var e=p(r);e===Y?b(t,Y.error):void 0===e?w(t,r):n(e)?h(t,r,e):w(t,r)}}function g(n,r){n===r?b(n,l()):t(r)?y(n,r):w(n,r)}function _(t){t._onerror&&t._onerror(t._result),T(t)}function w(t,n){t._state===H&&(t._result=n,t._state=$,0===t._subscribers.length||q(T,t))}function b(t,n){t._state===H&&(t._state=N,t._result=n,q(_,t))}function E(t,n,r,e){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=n,i[o+$]=r,i[o+N]=e,0===o&&t._state&&q(T,t)}function T(t){var n=t._subscribers,r=t._state;if(0!==n.length){for(var e,i,o=t._result,u=0;u<n.length;u+=3)e=n[u],i=n[u+r],e?A(r,e,i,o):i(o);t._subscribers.length=0}}function x(){this.error=null}function S(t,n){try{return t(n)}catch(r){return W.error=r,W}}function A(t,r,e,i){var o,u,a,c,s=n(e);if(s){if(o=S(e,i),o===W?(c=!0,u=o.error,o=null):a=!0,r===o)return void b(r,d())}else o=i,a=!0;r._state!==H||(s&&a?g(r,o):c?b(r,u):t===$?w(r,o):t===N&&b(r,o))}function k(t,n){try{n(function(n){g(t,n)},function(n){b(t,n)})}catch(r){b(t,r)}}function j(t,n,r,e){this._instanceConstructor=t,this.promise=new t(f,e),this._abortOnReject=r,this._validateInput(n)?(this._input=n,this.length=n.length,this._remaining=n.length,this._init(),0===this.length?w(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&w(this.promise,this._result))):b(this.promise,this._validationError())}function I(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function P(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function C(t,r){this._id=V++,this._label=r,this._state=void 0,this._result=void 0,this._subscribers=[],f!==t&&(n(t)||I(),this instanceof C||P(),k(this,t))}var L;L=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var M,R=L,O=(Date.now||function(){return(new Date).getTime()},Object.create||function(t){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof t)throw new TypeError("Argument must be an object");return i.prototype=t,new i},0),q=function(t,n){D[O]=t,D[O+1]=n,O+=2,2===O&&M()},F="undefined"!=typeof window?window:{},B=F.MutationObserver||F.WebKitMutationObserver,U="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,D=new Array(1e3);M="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?o():B?u():U?a():c();var H=void 0,$=1,N=2,Y=new x,W=new x;j.prototype._validateInput=function(t){return R(t)},j.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},j.prototype._init=function(){this._result=new Array(this.length)};var z=j;j.prototype._enumerate=function(){for(var t=this.length,n=this.promise,r=this._input,e=0;n._state===H&&e<t;e++)this._eachEntry(r[e],e)},j.prototype._eachEntry=function(t,n){var e=this._instanceConstructor;r(t)?t.constructor===e&&t._state!==H?(t._onerror=null,this._settledAt(t._state,n,t._result)):this._willSettleAt(e.resolve(t),n):(this._remaining--,this._result[n]=this._makeResult($,n,t))},j.prototype._settledAt=function(t,n,r){var e=this.promise;e._state===H&&(this._remaining--,this._abortOnReject&&t===N?b(e,r):this._result[n]=this._makeResult(t,n,r)),0===this._remaining&&w(e,this._result)},j.prototype._makeResult=function(t,n,r){return r},j.prototype._willSettleAt=function(t,n){var r=this;E(t,void 0,function(t){r._settledAt($,n,t)},function(t){r._settledAt(N,n,t)})};var J=function(t,n){return new z(this,t,(!0),n).promise},K=function(t,n){function r(t){g(o,t)}function e(t){b(o,t)}var i=this,o=new i(f,n);if(!R(t))return b(o,new TypeError("You must pass an array to race.")),o;for(var u=t.length,a=0;o._state===H&&a<u;a++)E(i.resolve(t[a]),void 0,r,e);return o},Q=function(t,n){var r=this;if(t&&"object"==typeof t&&t.constructor===r)return t;var e=new r(f,n);return g(e,t),e},G=function(t,n){var r=this,e=new r(f,n);return b(e,t),e},V=0,X=C;C.all=J,C.race=K,C.resolve=Q,C.reject=G,C.prototype={constructor:C,then:function(t,n,r){var e=this,i=e._state;if(i===$&&!t||i===N&&!n)return this;e._onerror=null;var o=new this.constructor(f,r),u=e._result;if(i){var a=arguments[i-1];q(function(){A(i,o,a,u)})}else E(e,o,t,n);return o},"catch":function(t,n){return this.then(null,t,n)}};var Z=function(){var t;t="undefined"!=typeof global?global:"undefined"!=typeof window&&window.document?window:self;var r="Promise"in t&&"resolve"in t.Promise&&"reject"in t.Promise&&"all"in t.Promise&&"race"in t.Promise&&function(){var r;return new t.Promise(function(t){r=t}),n(r)}();r||(t.Promise=X)},tt={Promise:X,polyfill:Z};e=function(){return tt}()}.call(this),i=function(t){return t.Promise}(e),o=function(t){function n(n,r){return new t(function(t){function e(){var r=n();void 0!==r&&(clearInterval(i),t(r))}var i;i=setInterval(e,r),e()})}return n}(i),u=function(){return window}(),a=function(t,n,r){function e(t){return t.isInitial?c().then(function(t){return{firstPaint:t}},function(){return{}}):{}}function i(){return r.top===r.self}function o(){return s&&s.loadTimes}function u(){return"undefined"!=typeof f.msFirstPaint}function a(){return o()&&s.loadTimes().firstPaintTime>0?1e3*s.loadTimes().firstPaintTime-f.navigationStart:u()&&f.msFirstPaint>0?f.msFirstPaint-f.navigationStart:void 0}function c(){return i()&&(o()||u())?t(a,250):n.reject("The browser does not have a first paint metric")}var s=r.chrome,f=r.performance.timing;return e}(o,i,u),c=function(t){return{isInitial:t.isInitial}},s=function(t,n){function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=16*n.Math.random()|0,e="x"===t?r:3&r|8;return e.toString(16)})}function e(){return"undefined"==typeof n.sessionStorage?t.reject("sessionStorage is required to produce a report for this transition."):(null===n.sessionStorage.getItem(i)&&n.sessionStorage.setItem(i,r()),t.resolve({journeyId:n.sessionStorage.getItem(i)}))}var i="browser-metrics-journey";return e}(i,u),f=function(){function t(t){return{key:t.key}}return t}(),l=function(t){return function(){return t.performance&&t.performance.navigation&&t.performance.timing&&"undefined"!=typeof t.performance.timing.navigationStart}}(u),d=function(t,n){function r(r){var e={};return r.isInitial&&n()&&(e.navigationType=t.performance.navigation.type),e}return r}(u,l),p=function(t,n,r){function e(e){var i={};if(e.isInitial){if(!n())return t.reject("The navigation timing API is required to produce a report for this transition.");"undefined"!=typeof r.performance.navigation.redirectCount&&(i.redirectCount=r.performance.navigation.redirectCount)}return t.resolve(i)}return e}(i,l,u),m=function(t){function n(n){var r=t.document.createElement("a");return r.href=n,r.href}return n}(u),h=function(t){return"function"==typeof t},v=function(t){return t.performance}(u),y=function(t,n){function r(){}return function(e){var i=n.onresourcetimingbufferfull||r;t(n.addEventListener)?n.addEventListener("resourcetimingbufferfull",e):n.onresourcetimingbufferfull=function(){e(),i()}}}(h,v),g=function(t,n){return function(){return n&&t(n.getEntriesByType)}}(h,v),_=function(t,n,r,e){function i(){return r.getEntriesByType("resource").filter(function(t){return"img"!==t.initiatorType})}function o(){t(r.clearResourceTimings)&&(a=i(),r.clearResourceTimings())}function u(){return a.concat(i())}var a=[];return e()?(o(),n(o),u):function(){return[]}}(h,y,v,g),w=function(t,n,r,e){function i(){var t=a.loadEventEnd>0,n={};if(t)return c.forEach(function(t){var r=a[t],e=r>0;e&&(n[t]=r-a.navigationStart)}),n}function o(){return r()?("undefined"==typeof u&&(u=t(i,250)),u):n.reject("The navigation timing API is required to produce a report for this transition.")}var u,a=e.timing,c="unloadEventStart,unloadEventEnd,redirectStart,redirectEnd,fetchStart,domainLookupStart,domainLookupEnd,connectStart,connectEnd,secureConnectionStart,requestStart,responseStart,responseEnd,domLoading,domInteractive,domContentLoadedEventStart,domContentLoadedEventEnd,domComplete,loadEventStart,loadEventEnd".split(",");return o}(o,i,l,v),b=function(t,n,r,e){function i(){var n=e.document.querySelectorAll("script[src][async]");return Array.prototype.map.call(n,function(n){return t(n.src)})}function o(){function t(t){return n().filter(function(t){return"link"===t.initiatorType||"script"===t.initiatorType}).filter(function(n){return n.responseEnd<t.domContentLoadedEventStart}).filter(function(t){return"script"!==t.initiatorType||e.indexOf(t.name)===-1})}var e=i();return r().then(t)}return o}(m,_,w,u),E=function(t){function n(n){return n.isInitial?t().then(function(t){if(0===t.length)return{resourceLoadedEnd:null};var n=t.map(function(t){return t.responseEnd}).reduce(function(t,n){return Math.max(t,n)});return{resourceLoadedEnd:n}}):{}}return n}(b),T=function(t){function n(n){return n.isInitial?t().then(function(t){if(0===t.length)return{resourceLoadedStart:null};var n=t.map(function(t){return t.startTime}),r=Math.min.apply(Math,n);return{resourceLoadedStart:r}}):{}}return n}(b),x=function(t,n){function r(r){if(!t())return{};var o=n().filter(function(t){var n=t.responseEnd;return n>=r.start&&n<=r.end&&t.startTime>=r.start});return{resourceTiming:o.map(function(t){var n={};return e.forEach(function(r){n[r]=t[r]}),i.forEach(function(e){n[e]=t[e]>0?t[e]-r.start:0}),n})}}var e="duration,initiatorType,name".split(","),i="startTime,connectEnd,connectStart,domainLookupEnd,domainLookupStart,fetchStart,redirectEnd,redirectStart,requestStart,responseEnd,responseStart,secureConnectionStart".split(",");return r}(g,_),S=function(){function t(t){return{threshold:t.threshold}}return t}(),A=function(t){function n(n){return n.isInitial?t():{}}return n}(w),k=function(t){function n(){return{userAgent:t.navigator.userAgent}}return n}(u),j=function(t,n){function r(r){if(!n||!t(n.getEntriesByType))return{};var e=n.getEntriesByType("mark").filter(function(t){return t.startTime>=r.start&&t.startTime<=r.end}),i=n.getEntriesByType("measure").filter(function(t){return t.startTime>=r.start&&t.startTime+t.duration<=r.end});return{marks:e.map(function(t){return{name:t.name,time:t.startTime-r.start}}),measures:i.map(function(t){return{name:t.name,startTime:t.startTime-r.start,duration:t.duration}})}}return r}(h,v),I=function(t,n,r,e,i,o,u,a,c,s,f,l,d,p,m){var h=[t,n,r,e,i,o,u,a,c,s,f,l,d,p,m];return{get:function(){return h.concat()},add:function(t){h.push(t)}}}(r,a,c,s,f,d,n,p,E,T,x,S,A,k,j),P=function(){function t(){for(var t,r,e={},i=0,o=arguments.length;i<o;i++){t=arguments[i];for(r in t)n.call(t,r)&&(e[r]=t[r])}return e}var n=Object.prototype.hasOwnProperty;return t}(),C=function(t){function n(n){(t.console.error||t.console.log).call(t.console,n.stack||n)}return n}(u),L=function(t,n,r,e,i,o){function u(t){return r.all([t]).then(function(t){return t[0]})}function a(t){return u(t).then(null,function(){return{}})}function c(t){var e=t.reporters,u=o.get().concat(e).map(function(n){var r;try{r=n(t)}catch(e){i(e),r={}}return a(r)});return r.all(u).then(function(t){return n.apply(void 0,t)})}return c}(o,P,i,u,C,I),M=function(t,n,r){function e(){function e(n){a=new t(n)}function i(t){a&&a.key===t.key&&(a.end=t.timestamp,r(a).then(function(t){s.push(t),c.forEach(function(n){n({report:t})})}),a=null)}function o(t){n.add(t)}function u(t){s.forEach(function(n){t({report:n})}),c.push(t)}var a,c=[],s=[];return function(t){t.start?e(t.start):t.end?i(t.end):t.addReporter?o(t.addReporter):t.subscribe&&u(t.subscribe)}}return e}(t,I,L),R=function(t){return t["browser-metrics"]}(u),O=function(t,n){var r=new t;n.delegateTo(r)}(M,R)}()}}}),window["browser-metrics-plugin"].install(function(t){require(["internal/browser-metrics","internal/browser-metrics-aa-beacon"],function(n,r){var e={},i={},o={},u={},a={},c={},s={},f={},l={},d={},p={},m={},h={},v={},y={},g={},_={},w={},b={};e=function(t){var n=window;return n}(e),i=function(t,n){var r;try{r=n.require("jquery")}catch(e){r=n.jQuery}return r}(i,e),o=function(t,n,r){function e(){return Array.prototype.slice.call(n.document.getElementsByTagName("script"))}function i(){var t=r.Deferred();return r(function(){var n=[];e().forEach(function(t){var r=t.getAttribute("src"),e=r&&(r.match(u)||r.match(o));if(e&&e.length>1){var i=e[1];n.push({name:i,async:t.async})}}),t.resolve(n)}),t.promise()}var o=/^(?:https?:)?\/\/[^\.]+\.cloudfront\.net\/p\/([^\/]+)\/main\.js$/,u=/^(?:https?:)?\/\/aes-artifacts--cdn\.[^\.]+\.atlassian\.io\/hashed\/([^\/]+)\/.+\.js$/,a=i().pipe(function(t){return{experiments:t}}),c=function(){return a};return c}(o,e,i),u=function(t){function n(t){return Array.isArray(t.experiments)}var r=function(t){if(n(t))return{experiments:JSON.stringify(t.experiments.map(function(t){return[t.name,t.async?1:0]}))}};return r}(u),a=function(t,n){var r=n.WRM;return r}(a,e),c=function(t,n){var r,e=function(){return r=n.data.claim("com.atlassian.plugins.browser.metrics.browser-metrics-plugin:impl.manifesto-hash-data-provider")||"",e=function(){return r},r},i=function(){return{manifestoHash:e()}};return i}(c,a),s=function(t){function n(t){return"string"==typeof t.manifestoHash}var r=function(t){if(n(t))return{manifestoHash:t.manifestoHash}};return r}(s),f=function(t,n){var r,e=function(){return r=n.data.claim("com.atlassian.plugins.browser.metrics.browser-metrics-plugin:impl.rack-data-provider")||"",e=function(){return r},r},i=function(){return{rack:e()}};return i}(f,a),l=function(t,n){var r,e=function(){return r=n.data.claim("com.atlassian.plugins.browser.metrics.browser-metrics-plugin:impl.datacenter-data-provider")||"",e=function(){return r},r},i=function(){return{dataCenter:e()}};return i}(l,a),d=function(t,n){var r,e=function(){return r=n.data.claim("com.atlassian.plugins.browser.metrics.browser-metrics-plugin:impl.environment-data-provider")||"",e=function(){return r},r},i=function(){return{environment:e()}};return i}(d,a),p=function(t){function n(t){return"string"==typeof t.rack}var r=function(t){if(n(t))return{rack:t.rack}};return r}(p),m=function(t){function n(t){return"string"==typeof t.dataCenter}var r=function(t){if(n(t))return{dataCenter:t.dataCenter}};return r}(m),h=function(t){function n(t){return"string"==typeof t.environment}var r=function(t){if(n(t))return{environment:t.environment}};return r}(h),v=function(t){var n=/^(true|false|\d+)$/gi,r=function(t){return!!t.match(n)};return r}(v),y=function(t,n){var r=/([&?][^&=]+)(=?)([^&#]*)/g,e=function(t){return t.replace(r,function(t,r,e,i){return r+e+(n(i)?i:"☠")})};return e}(y,v),g=function(t){var n=/(\/s\/).+(\/_\/)/,r=function(t){return t.replace(n,function(t,n,r){return n+"☠"+r})};return r}(g),_=function(t,n,r){var e=/^https:\/\/[^.]+\.cloudfront.net\/[^\/]+(\/wiki)?\/s\//g,i=function(t){return t.match(e)?(t=n(t),t=r(t)):""};return i}(_,y,g),w=function(t){var n=/^https:\/\/d2kryfvs3op226\.cloudfront\.net\/[a-f0-9]+\.[a-z]+$/g,r=function(t){return t.match(n)?t:""};return r}(w),b=function(t,n,r,e,i,o,u,a,c,s,f,l,d,p,m){var h=n.addReporter,v=r.addReportMarshaller,y=r.addUrlCleaner;return h(e),h(o),h(a),h(c),h(s),v(f),v(l),v(d),v(u),v(i),y(p),y(m),t}(b,n,r,o,u,c,s,f,l,d,p,m,h,_,w),t()})});
}catch(e){WRMCB(e)};