firebase 12.0.0 → 12.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/dist/esm/index.esm.js +1 -1
- package/app/dist/index.cjs.js +1 -1
- package/app/dist/index.mjs +1 -1
- package/compat/app/dist/esm/index.esm.js +1 -1
- package/compat/app/dist/index.cjs.js +1 -1
- package/compat/app/dist/index.mjs +1 -1
- package/compat/dist/esm/index.esm.js +2 -2
- package/compat/dist/index.node.cjs +2 -2
- package/compat/dist/index.rn.cjs.js +2 -2
- package/firebase-ai.js +1 -1
- package/firebase-ai.js.map +1 -1
- package/firebase-analytics.js +1 -1
- package/firebase-app-check-compat.js +1 -1
- package/firebase-app-check-compat.js.map +1 -1
- package/firebase-app-check.js +1 -1
- package/firebase-app-check.js.map +1 -1
- package/firebase-app-compat.js +2 -2
- package/firebase-app-compat.js.map +1 -1
- package/firebase-app.js +5 -5
- package/firebase-app.js.map +1 -1
- package/firebase-auth-cordova.js +1 -1
- package/firebase-auth-web-extension.js +1 -1
- package/firebase-auth.js +1 -1
- package/firebase-compat.js +5 -5
- package/firebase-compat.js.map +1 -1
- package/firebase-data-connect.js +1 -1
- package/firebase-database.js +1 -1
- package/firebase-firestore-compat.js +1 -1
- package/firebase-firestore-compat.js.map +1 -1
- package/firebase-firestore-lite.js +1 -1
- package/firebase-firestore.js +1 -1
- package/firebase-firestore.js.map +1 -1
- package/firebase-functions.js +1 -1
- package/firebase-installations.js +1 -1
- package/firebase-messaging-sw.js +1 -1
- package/firebase-messaging.js +1 -1
- package/firebase-performance-compat.js +1 -1
- package/firebase-performance-compat.js.map +1 -1
- package/firebase-performance-standalone-compat.js +15 -15
- package/firebase-performance-standalone-compat.js.map +1 -1
- package/firebase-performance.js +1 -1
- package/firebase-performance.js.map +1 -1
- package/firebase-remote-config.js +1 -1
- package/firebase-storage.js +1 -1
- package/package.json +6 -6
|
@@ -96,7 +96,7 @@ function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window
|
|
|
96
96
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
97
97
|
* See the License for the specific language governing permissions and
|
|
98
98
|
* limitations under the License.
|
|
99
|
-
*/function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function
|
|
99
|
+
*/function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function b(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],a=t[i];if(v(n)&&v(a)){if(!b(n,a))return!1}else if(n!==a)return!1}for(const e of r)if(!n.includes(e))return!1;return!0}function v(e){return null!==e&&"object"==typeof e}
|
|
100
100
|
/**
|
|
101
101
|
* @license
|
|
102
102
|
* Copyright 2021 Google LLC
|
|
@@ -193,7 +193,7 @@ function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window
|
|
|
193
193
|
* See the License for the specific language governing permissions and
|
|
194
194
|
* limitations under the License.
|
|
195
195
|
*/
|
|
196
|
-
class K{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===t?.type}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const J="@firebase/app",G="0.14.
|
|
196
|
+
class K{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===t?.type}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const J="@firebase/app",G="0.14.1",X=new k("@firebase/app"),Y="@firebase/app-compat",Z="@firebase/analytics-compat",Q="@firebase/analytics",ee="@firebase/app-check-compat",te="@firebase/app-check",ne="@firebase/auth",re="@firebase/auth-compat",ie="@firebase/database",ae="@firebase/data-connect",oe="@firebase/database-compat",se="@firebase/functions",ce="@firebase/functions-compat",le="@firebase/installations",ue="@firebase/installations-compat",fe="@firebase/messaging",de="@firebase/messaging-compat",pe="@firebase/performance",he="@firebase/performance-compat",ge="@firebase/remote-config",me="@firebase/remote-config-compat",be="@firebase/storage",ve="@firebase/storage-compat",ye="@firebase/firestore",_e="@firebase/ai",we="@firebase/firestore-compat",Ee="firebase",Se="[DEFAULT]",Ie={[J]:"fire-core",[Y]:"fire-core-compat",[Q]:"fire-analytics",[Z]:"fire-analytics-compat",[te]:"fire-app-check",[ee]:"fire-app-check-compat",[ne]:"fire-auth",[re]:"fire-auth-compat",[ie]:"fire-rtdb",[ae]:"fire-data-connect",[oe]:"fire-rtdb-compat",[se]:"fire-fn",[ce]:"fire-fn-compat",[le]:"fire-iid",[ue]:"fire-iid-compat",[fe]:"fire-fcm",[de]:"fire-fcm-compat",[pe]:"fire-perf",[he]:"fire-perf-compat",[ge]:"fire-rc",[me]:"fire-rc-compat",[be]:"fire-gcs",[ve]:"fire-gcs-compat",[ye]:"fire-fst",[we]:"fire-fst-compat",[_e]:"fire-vertex","fire-js":"fire-js",[Ee]:"fire-js-all"},Te=new Map,Ce=new Map,Ae=new Map;function De(e,t){try{e.container.addComponent(t)}catch(n){X.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function ke(e){const t=e.name;if(Ae.has(t))return X.debug(`There were multiple attempts to register component ${t}.`),!1;Ae.set(t,e);for(const t of Te.values())De(t,e);for(const t of Ce.values())De(t,e);return!0}function Ne(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function Me(e){return void 0!==e.options}function Oe(e){return!Me(e)&&("authIdToken"in e||"appCheckToken"in e||"releaseOnDeref"in e||"automaticDataCollectionEnabled"in e)}
|
|
197
197
|
/**
|
|
198
198
|
* @license
|
|
199
199
|
* Copyright 2019 Google LLC
|
|
@@ -259,7 +259,7 @@ class Pe{constructor(e,t,n){this._isDeleted=!1,this._options={...e},this._config
|
|
|
259
259
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
260
260
|
* See the License for the specific language governing permissions and
|
|
261
261
|
* limitations under the License.
|
|
262
|
-
*/const Fe="12.
|
|
262
|
+
*/const Fe="12.1.0";function $e(e,t={}){let n=e;if("object"!=typeof t){t={name:t}}const r={name:Se,automaticDataCollectionEnabled:!0,...t},i=r.name;if("string"!=typeof i||!i)throw Le.create("bad-app-name",{appName:String(i)});if(n||(n=c()),!n)throw Le.create("no-options");const a=Te.get(i);if(a){if(b(n,a.options)&&b(r,a.config))return a;throw Le.create("duplicate-app",{appName:i})}const o=new E(i);for(const e of Ae.values())o.addComponent(e);const s=new Pe(n,r,o);return Te.set(i,s),s}async function Ue(e){let t=!1;const n=e.name;if(Te.has(n))t=!0,Te.delete(n);else if(Ce.has(n)){e.decRefCount()<=0&&(Ce.delete(n),t=!0)}t&&(await Promise.all(e.container.getProviders().map((e=>e.delete()))),e.isDeleted=!0)}function je(e,t,n){let r=Ie[e]??e;n&&(r+=`-${n}`);const i=r.match(/\s|\//),a=t.match(/\s|\//);if(i||a){const e=[`Unable to register library "${r}" with version "${t}":`];return i&&e.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void X.warn(e.join(" "))}ke(new y(`${r}-version`,(()=>({library:r,version:t})),"VERSION"))}function xe(e,t){if(null!==e&&"function"!=typeof e)throw Le.create("invalid-log-argument");!function(e,t){for(const n of S){let r=null;t&&t.level&&(r=T[t.level]),n.userLogHandler=null===e?null:(t,n,...i)=>{const a=i.map((e=>{if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((e=>e)).join(" ");n>=(r??t.logLevel)&&e({level:I[n].toLowerCase(),message:a,args:i,type:t.name})}}}(e,t)}function ze(e){var t;t=e,S.forEach((e=>{e.setLogLevel(t)}))}
|
|
263
263
|
/**
|
|
264
264
|
* @license
|
|
265
265
|
* Copyright 2021 Google LLC
|
|
@@ -406,7 +406,7 @@ const rt=function(){const e=nt(et);e.SDK_VERSION=`${e.SDK_VERSION}_LITE`;const t
|
|
|
406
406
|
* See the License for the specific language governing permissions and
|
|
407
407
|
* limitations under the License.
|
|
408
408
|
*/
|
|
409
|
-
function(e){je("@firebase/app-compat","0.5.
|
|
409
|
+
function(e){je("@firebase/app-compat","0.5.1",e)}("lite");
|
|
410
410
|
/**
|
|
411
411
|
* @license
|
|
412
412
|
* Copyright 2020 Google LLC
|
|
@@ -423,7 +423,7 @@ function(e){je("@firebase/app-compat","0.5.0",e)}("lite");
|
|
|
423
423
|
* See the License for the specific language governing permissions and
|
|
424
424
|
* limitations under the License.
|
|
425
425
|
*/
|
|
426
|
-
rt.registerVersion("firebase","12.0.0","app-compat");var it,at,ot=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},st=function(e){if("loading"===document.readyState)return"loading";var t=ot();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},ct=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},lt=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:ct(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},ut=-1,ft=function(e){addEventListener("pageshow",(function(t){t.persisted&&(ut=t.timeStamp,e(t))}),!0)},dt=function(){var e=ot();return e&&e.activationStart||0},pt=function(e,t){var n=ot(),r="navigate";return ut>=0?r="back-forward-cache":n&&(document.prerendering||dt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},ht=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},gt=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},mt=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},vt=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},bt=function(e){var t=!1;return function(){t||(e(),t=!0)}},yt=-1,_t=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},wt=function(e){"hidden"===document.visibilityState&&yt>-1&&(yt="visibilitychange"===e.type?e.timeStamp:0,St())},Et=function(){addEventListener("visibilitychange",wt,!0),addEventListener("prerenderingchange",wt,!0)},St=function(){removeEventListener("visibilitychange",wt,!0),removeEventListener("prerenderingchange",wt,!0)},It=function(){return yt<0&&(yt=_t(),Et(),ft((function(){setTimeout((function(){yt=_t(),Et()}),0)}))),{get firstHiddenTime(){return yt}}},Tt=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Ct=[1800,3e3],At=[.1,.25],Dt=function(e,t){!function(e,t){t=t||{},function(e,t){t=t||{},Tt((function(){var n,r=It(),i=pt("FCP"),a=ht("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(a.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-dt(),0),i.entries.push(e),n(!0)))}))}));a&&(n=gt(e,i,Ct,t.reportAllChanges),ft((function(r){i=pt("FCP"),n=gt(e,i,Ct,t.reportAllChanges),mt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(bt((function(){var n,r=pt("CLS",0),i=0,a=[],o=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=a[0],n=a[a.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e])}})),i>r.value&&(r.value=i,r.entries=a,n())},s=ht("layout-shift",o);s&&(n=gt(e,r,At,t.reportAllChanges),vt((function(){o(s.takeRecords()),n(!0)})),ft((function(){i=0,r=pt("CLS",0),n=gt(e,r,At,t.reportAllChanges),mt((function(){return n()}))})),setTimeout(n,0))})))}((function(t){var n=function(e){var t,n={};if(e.entries.length){var r=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(r&&r.sources&&r.sources.length){var i=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(n={largestShiftTarget:lt(i.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:i,largestShiftEntry:r,loadState:st(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},kt=0,Nt=1/0,Mt=0,Ot=function(e){e.forEach((function(e){e.interactionId&&(Nt=Math.min(Nt,e.interactionId),Mt=Math.max(Mt,e.interactionId),kt=Mt?(Mt-Nt)/7+1:0)}))},Lt=function(){return it?kt:performance.interactionCount||0},Pt=function(){"interactionCount"in performance||it||(it=ht("event",Ot,{type:"event",buffered:!0,durationThreshold:0}))},Bt=[],Rt=new Map,Ft=0,$t=[],Ut=function(e){if($t.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Bt[Bt.length-1],n=Rt.get(e.interactionId);if(n||Bt.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Rt.set(r.id,r),Bt.push(r)}Bt.sort((function(e,t){return t.latency-e.latency})),Bt.length>10&&Bt.splice(10).forEach((function(e){return Rt.delete(e.id)}))}}},jt=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=bt(e),"hidden"===document.visibilityState?e():(n=t(e),vt(e)),n},xt=[200,500],zt=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},Tt((function(){var n;Pt();var r,i=pt("INP"),a=function(e){jt((function(){e.forEach(Ut);var t=function(){var e=Math.min(Bt.length-1,Math.floor((Lt()-Ft)/50));return Bt[e]}();t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,r())}))},o=ht("event",a,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=gt(e,i,xt,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),vt((function(){a(o.takeRecords()),r(!0)})),ft((function(){Ft=Lt(),Bt.length=0,Rt.clear(),i=pt("INP"),r=gt(e,i,xt,t.reportAllChanges)})))})))},Vt=[],Ht=[],qt=0,Wt=new WeakMap,Kt=new Map,Jt=-1,Gt=function(e){Vt=Vt.concat(e),Xt()},Xt=function(){Jt<0&&(Jt=jt(Yt))},Yt=function(){Kt.size>10&&Kt.forEach((function(e,t){Rt.has(t)||Kt.delete(t)}));var e=Bt.map((function(e){return Wt.get(e.entries[0])})),t=Ht.length-50;Ht=Ht.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Ht.length;r++){var i=Ht[r];Zt(i.startTime,i.processingEnd).forEach((function(e){n.add(e)}))}var a=Vt.length-1-50;Vt=Vt.filter((function(e,t){return e.startTime>qt&&t>a||n.has(e)})),Jt=-1};$t.push((function(e){e.interactionId&&e.target&&!Kt.has(e.interactionId)&&Kt.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;qt=Math.max(qt,e.processingEnd);for(var r=Ht.length-1;r>=0;r--){var i=Ht[r];if(Math.abs(n-i.renderTime)<=8){(t=i).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},Ht.push(t)),(e.interactionId||"first-input"===e.entryType)&&Wt.set(e,t),Xt()}));var Zt=function(e,t){for(var n,r=[],i=0;n=Vt[i];i++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},Qt=function(e,t){at||(at=ht("long-animation-frame",Gt)),zt((function(t){var n=function(e){var t=e.entries[0],n=Wt.get(t),r=t.processingStart,i=n.processingEnd,a=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),o=Zt(t.startTime,i),s=e.entries.find((function(e){return e.target})),c=s&&s.target||Kt.get(t.interactionId),l=[t.startTime+t.duration,i].concat(o.map((function(e){return e.startTime+e.duration}))),u=Math.max.apply(Math,l),f={interactionTarget:lt(c),interactionTargetElement:c,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:u,processedEventEntries:a,longAnimationFrameEntries:o,inputDelay:r-t.startTime,processingDuration:i-r,presentationDelay:Math.max(u-i,0),loadState:st(t.startTime)};return Object.assign(e,{attribution:f})}(t);e(n)}),t)},en=[2500,4e3],tn={},nn=function(e,t){!function(e,t){t=t||{},Tt((function(){var n,r=It(),i=pt("LCP"),a=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-dt(),0),i.entries=[e],n())}))},o=ht("largest-contentful-paint",a);if(o){n=gt(e,i,en,t.reportAllChanges);var s=bt((function(){tn[i.id]||(a(o.takeRecords()),o.disconnect(),tn[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return jt(s)}),{once:!0,capture:!0})})),vt(s),ft((function(r){i=pt("LCP"),n=gt(e,i,en,t.reportAllChanges),mt((function(){i.value=performance.now()-r.timeStamp,tn[i.id]=!0,n(!0)}))}))}}))}((function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=ot();if(n){var r=n.activationStart||0,i=e.entries[e.entries.length-1],a=i.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===i.url}))[0],o=Math.max(0,n.responseStart-r),s=Math.max(o,a?(a.requestStart||a.startTime)-r:0),c=Math.max(s,a?a.responseEnd-r:0),l=Math.max(c,i.startTime-r);t={element:lt(i.element),timeToFirstByte:o,resourceLoadDelay:s-o,resourceLoadDuration:c-s,elementRenderDelay:l-c,navigationEntry:n,lcpEntry:i},i.url&&(t.url=i.url),a&&(t.lcpResourceEntry=a)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)};const rn="@firebase/installations",an="0.6.19",on=1e4,sn=`w:${an}`,cn="FIS_v2",ln=36e5,un=new h("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function fn(e){return e instanceof p&&e.code.includes("request-failed")}
|
|
426
|
+
rt.registerVersion("firebase","12.1.0","app-compat");var it,at,ot=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},st=function(e){if("loading"===document.readyState)return"loading";var t=ot();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},ct=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},lt=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:ct(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},ut=-1,ft=function(e){addEventListener("pageshow",(function(t){t.persisted&&(ut=t.timeStamp,e(t))}),!0)},dt=function(){var e=ot();return e&&e.activationStart||0},pt=function(e,t){var n=ot(),r="navigate";return ut>=0?r="back-forward-cache":n&&(document.prerendering||dt()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},ht=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},gt=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},mt=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},bt=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},vt=function(e){var t=!1;return function(){t||(e(),t=!0)}},yt=-1,_t=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},wt=function(e){"hidden"===document.visibilityState&&yt>-1&&(yt="visibilitychange"===e.type?e.timeStamp:0,St())},Et=function(){addEventListener("visibilitychange",wt,!0),addEventListener("prerenderingchange",wt,!0)},St=function(){removeEventListener("visibilitychange",wt,!0),removeEventListener("prerenderingchange",wt,!0)},It=function(){return yt<0&&(yt=_t(),Et(),ft((function(){setTimeout((function(){yt=_t(),Et()}),0)}))),{get firstHiddenTime(){return yt}}},Tt=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},Ct=[1800,3e3],At=[.1,.25],Dt=function(e,t){!function(e,t){t=t||{},function(e,t){t=t||{},Tt((function(){var n,r=It(),i=pt("FCP"),a=ht("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(a.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-dt(),0),i.entries.push(e),n(!0)))}))}));a&&(n=gt(e,i,Ct,t.reportAllChanges),ft((function(r){i=pt("FCP"),n=gt(e,i,Ct,t.reportAllChanges),mt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))}(vt((function(){var n,r=pt("CLS",0),i=0,a=[],o=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=a[0],n=a[a.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e])}})),i>r.value&&(r.value=i,r.entries=a,n())},s=ht("layout-shift",o);s&&(n=gt(e,r,At,t.reportAllChanges),bt((function(){o(s.takeRecords()),n(!0)})),ft((function(){i=0,r=pt("CLS",0),n=gt(e,r,At,t.reportAllChanges),mt((function(){return n()}))})),setTimeout(n,0))})))}((function(t){var n=function(e){var t,n={};if(e.entries.length){var r=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(r&&r.sources&&r.sources.length){var i=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(n={largestShiftTarget:lt(i.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:i,largestShiftEntry:r,loadState:st(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)},kt=0,Nt=1/0,Mt=0,Ot=function(e){e.forEach((function(e){e.interactionId&&(Nt=Math.min(Nt,e.interactionId),Mt=Math.max(Mt,e.interactionId),kt=Mt?(Mt-Nt)/7+1:0)}))},Lt=function(){return it?kt:performance.interactionCount||0},Pt=function(){"interactionCount"in performance||it||(it=ht("event",Ot,{type:"event",buffered:!0,durationThreshold:0}))},Bt=[],Rt=new Map,Ft=0,$t=[],Ut=function(e){if($t.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Bt[Bt.length-1],n=Rt.get(e.interactionId);if(n||Bt.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Rt.set(r.id,r),Bt.push(r)}Bt.sort((function(e,t){return t.latency-e.latency})),Bt.length>10&&Bt.splice(10).forEach((function(e){return Rt.delete(e.id)}))}}},jt=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=vt(e),"hidden"===document.visibilityState?e():(n=t(e),bt(e)),n},xt=[200,500],zt=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},Tt((function(){var n;Pt();var r,i=pt("INP"),a=function(e){jt((function(){e.forEach(Ut);var t=function(){var e=Math.min(Bt.length-1,Math.floor((Lt()-Ft)/50));return Bt[e]}();t&&t.latency!==i.value&&(i.value=t.latency,i.entries=t.entries,r())}))},o=ht("event",a,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=gt(e,i,xt,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),bt((function(){a(o.takeRecords()),r(!0)})),ft((function(){Ft=Lt(),Bt.length=0,Rt.clear(),i=pt("INP"),r=gt(e,i,xt,t.reportAllChanges)})))})))},Vt=[],Ht=[],qt=0,Wt=new WeakMap,Kt=new Map,Jt=-1,Gt=function(e){Vt=Vt.concat(e),Xt()},Xt=function(){Jt<0&&(Jt=jt(Yt))},Yt=function(){Kt.size>10&&Kt.forEach((function(e,t){Rt.has(t)||Kt.delete(t)}));var e=Bt.map((function(e){return Wt.get(e.entries[0])})),t=Ht.length-50;Ht=Ht.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Ht.length;r++){var i=Ht[r];Zt(i.startTime,i.processingEnd).forEach((function(e){n.add(e)}))}var a=Vt.length-1-50;Vt=Vt.filter((function(e,t){return e.startTime>qt&&t>a||n.has(e)})),Jt=-1};$t.push((function(e){e.interactionId&&e.target&&!Kt.has(e.interactionId)&&Kt.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;qt=Math.max(qt,e.processingEnd);for(var r=Ht.length-1;r>=0;r--){var i=Ht[r];if(Math.abs(n-i.renderTime)<=8){(t=i).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},Ht.push(t)),(e.interactionId||"first-input"===e.entryType)&&Wt.set(e,t),Xt()}));var Zt=function(e,t){for(var n,r=[],i=0;n=Vt[i];i++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},Qt=function(e,t){at||(at=ht("long-animation-frame",Gt)),zt((function(t){var n=function(e){var t=e.entries[0],n=Wt.get(t),r=t.processingStart,i=n.processingEnd,a=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),o=Zt(t.startTime,i),s=e.entries.find((function(e){return e.target})),c=s&&s.target||Kt.get(t.interactionId),l=[t.startTime+t.duration,i].concat(o.map((function(e){return e.startTime+e.duration}))),u=Math.max.apply(Math,l),f={interactionTarget:lt(c),interactionTargetElement:c,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:u,processedEventEntries:a,longAnimationFrameEntries:o,inputDelay:r-t.startTime,processingDuration:i-r,presentationDelay:Math.max(u-i,0),loadState:st(t.startTime)};return Object.assign(e,{attribution:f})}(t);e(n)}),t)},en=[2500,4e3],tn={},nn=function(e,t){!function(e,t){t=t||{},Tt((function(){var n,r=It(),i=pt("LCP"),a=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-dt(),0),i.entries=[e],n())}))},o=ht("largest-contentful-paint",a);if(o){n=gt(e,i,en,t.reportAllChanges);var s=vt((function(){tn[i.id]||(a(o.takeRecords()),o.disconnect(),tn[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return jt(s)}),{once:!0,capture:!0})})),bt(s),ft((function(r){i=pt("LCP"),n=gt(e,i,en,t.reportAllChanges),mt((function(){i.value=performance.now()-r.timeStamp,tn[i.id]=!0,n(!0)}))}))}}))}((function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=ot();if(n){var r=n.activationStart||0,i=e.entries[e.entries.length-1],a=i.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===i.url}))[0],o=Math.max(0,n.responseStart-r),s=Math.max(o,a?(a.requestStart||a.startTime)-r:0),c=Math.max(s,a?a.responseEnd-r:0),l=Math.max(c,i.startTime-r);t={element:lt(i.element),timeToFirstByte:o,resourceLoadDelay:s-o,resourceLoadDuration:c-s,elementRenderDelay:l-c,navigationEntry:n,lcpEntry:i},i.url&&(t.url=i.url),a&&(t.lcpResourceEntry=a)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)};const rn="@firebase/installations",an="0.6.19",on=1e4,sn=`w:${an}`,cn="FIS_v2",ln=36e5,un=new h("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function fn(e){return e instanceof p&&e.code.includes("request-failed")}
|
|
427
427
|
/**
|
|
428
428
|
* @license
|
|
429
429
|
* Copyright 2019 Google LLC
|
|
@@ -455,7 +455,7 @@ rt.registerVersion("firebase","12.0.0","app-compat");var it,at,ot=function(){var
|
|
|
455
455
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
456
456
|
* See the License for the specific language governing permissions and
|
|
457
457
|
* limitations under the License.
|
|
458
|
-
*/(t)),n}async function
|
|
458
|
+
*/(t)),n}async function bn(e){const t=await e();return t.status>=500&&t.status<600?e():t}
|
|
459
459
|
/**
|
|
460
460
|
* @license
|
|
461
461
|
* Copyright 2019 Google LLC
|
|
@@ -472,7 +472,7 @@ rt.registerVersion("firebase","12.0.0","app-compat");var it,at,ot=function(){var
|
|
|
472
472
|
* See the License for the specific language governing permissions and
|
|
473
473
|
* limitations under the License.
|
|
474
474
|
*/
|
|
475
|
-
function
|
|
475
|
+
function vn(e){return new Promise((t=>{setTimeout(t,e)}))}
|
|
476
476
|
/**
|
|
477
477
|
* @license
|
|
478
478
|
* Copyright 2019 Google LLC
|
|
@@ -570,7 +570,7 @@ const Cn="firebase-installations-store";let An=null;function Dn(){return An||(An
|
|
|
570
570
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
571
571
|
* See the License for the specific language governing permissions and
|
|
572
572
|
* limitations under the License.
|
|
573
|
-
*/async function On(e){let t;const n=await Mn(e.appConfig,(n=>{const r=function(e){const t=e||{fid:_n(),registrationStatus:0};return Bn(t)}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(un.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=dn(e),i=gn(e),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={fid:n,authVersion:cn,appId:e.appId,sdkVersion:sn},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await
|
|
573
|
+
*/async function On(e){let t;const n=await Mn(e.appConfig,(n=>{const r=function(e){const t=e||{fid:_n(),registrationStatus:0};return Bn(t)}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(un.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=dn(e),i=gn(e),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={fid:n,authVersion:cn,appId:e.appId,sdkVersion:sn},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await bn((()=>fetch(r,s)));if(c.ok){const e=await c.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:pn(e.authToken)}}throw await hn("Create Installation",c)}(e,t);return kn(e.appConfig,n)}catch(n){throw fn(n)&&409===n.customData.serverCode?await Nn(e.appConfig):await kn(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:Ln(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry}));return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function Ln(e){let t=await Pn(e.appConfig);for(;1===t.registrationStatus;)await vn(100),t=await Pn(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await On(e);return n||t}return t}function Pn(e){return Mn(e,(e=>{if(!e)throw un.create("installation-not-found");return Bn(e)}))}function Bn(e){return 1===(t=e).registrationStatus&&t.registrationTime+on<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t;
|
|
574
574
|
/**
|
|
575
575
|
* @license
|
|
576
576
|
* Copyright 2019 Google LLC
|
|
@@ -602,7 +602,7 @@ const Cn="firebase-installations-store";let An=null;function Dn(){return An||(An
|
|
|
602
602
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
603
603
|
* See the License for the specific language governing permissions and
|
|
604
604
|
* limitations under the License.
|
|
605
|
-
*/(e,n),i=mn(e,n),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={installation:{sdkVersion:sn,appId:e.appId}},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await
|
|
605
|
+
*/(e,n),i=mn(e,n),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={installation:{sdkVersion:sn,appId:e.appId}},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await bn((()=>fetch(r,s)));if(c.ok){return pn(await c.json())}throw await hn("Generate Auth Token",c)}async function Fn(e,t=!1){let n;const r=await Mn(e.appConfig,(r=>{if(!Un(r))throw un.create("not-registered");const i=r.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+ln}(e)}(i))return r;if(1===i.requestStatus)return n=async function(e,t){let n=await $n(e.appConfig);for(;1===n.authToken.requestStatus;)await vn(100),n=await $n(e.appConfig);const r=n.authToken;return 0===r.requestStatus?Fn(e,t):r}(e,t),r;{if(!navigator.onLine)throw un.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}(r);return n=async function(e,t){try{const n=await Rn(e,t),r={...t,authToken:n};return await kn(e.appConfig,r),n}catch(n){if(!fn(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n={...t,authToken:{requestStatus:0}};await kn(e.appConfig,n)}else await Nn(e.appConfig);throw n}}(e,t),t}}));return n?await n:r.authToken}function $n(e){return Mn(e,(e=>{if(!Un(e))throw un.create("not-registered");const t=e.authToken;return 1===(n=t).requestStatus&&n.requestTime+on<Date.now()?{...e,authToken:{requestStatus:0}}:e;var n;
|
|
606
606
|
/**
|
|
607
607
|
* @license
|
|
608
608
|
* Copyright 2019 Google LLC
|
|
@@ -667,7 +667,7 @@ async function jn(e,t=!1){const n=e;await async function(e){const{registrationPr
|
|
|
667
667
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
668
668
|
* See the License for the specific language governing permissions and
|
|
669
669
|
* limitations under the License.
|
|
670
|
-
*/const zn="installations",Vn=e=>{const t=Ne(e.getProvider("app").getImmediate(),zn).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await On(t);return r?r.catch(console.error):Fn(t).catch(console.error),n.fid}(t),getToken:e=>jn(t,e)}};ke(new y(zn,(e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw xn("App Configuration");if(!e.name)throw xn("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw xn(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:Ne(t,"heartbeat"),_delete:()=>Promise.resolve()}}),"PUBLIC")),ke(new y("installations-internal",Vn,"PRIVATE")),je(rn,an),je(rn,an,"esm2020");const Hn="@firebase/performance",qn="0.7.
|
|
670
|
+
*/const zn="installations",Vn=e=>{const t=Ne(e.getProvider("app").getImmediate(),zn).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await On(t);return r?r.catch(console.error):Fn(t).catch(console.error),n.fid}(t),getToken:e=>jn(t,e)}};ke(new y(zn,(e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw xn("App Configuration");if(!e.name)throw xn("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw xn(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:Ne(t,"heartbeat"),_delete:()=>Promise.resolve()}}),"PUBLIC")),ke(new y("installations-internal",Vn,"PRIVATE")),je(rn,an),je(rn,an,"esm2020");const Hn="@firebase/performance",qn="0.7.9",Wn=qn,Kn="FB-PERF-TRACE-MEASURE",Jn="_wt_",Gn="_fcp",Xn="_fid",Yn="_lcp",Zn="_inp",Qn="_cls",er="@firebase/performance/config",tr="@firebase/performance/configexpire",nr="Performance",rr=new h("performance",nr,{"trace started":"Trace {$traceName} was started before.","trace stopped":"Trace {$traceName} is not running.","nonpositive trace startTime":"Trace {$traceName} startTime should be positive.","nonpositive trace duration":"Trace {$traceName} duration should be positive.","no window":"Window is not available.","no app id":"App id is not available.","no project id":"Project id is not available.","no api key":"Api key is not available.","invalid cc log":"Attempted to queue invalid cc event","FB not default":"Performance can only start when Firebase app instance is the default one.","RC response not ok":"RC response is not ok","invalid attribute name":"Attribute name {$attributeName} is invalid.","invalid attribute value":"Attribute value {$attributeValue} is invalid.","invalid custom metric name":"Custom metric name {$customMetricName} is invalid","invalid String merger input":"Input for String merger is invalid, contact support team to resolve.","already initialized":"initializePerformance() has already been called with different options. To avoid this error, call initializePerformance() with the same options as when it was originally called, or call getPerformance() to return the already initialized instance."}),ir=new k(nr);
|
|
671
671
|
/**
|
|
672
672
|
* @license
|
|
673
673
|
* Copyright 2020 Google LLC
|
|
@@ -733,7 +733,7 @@ function fr(e,t){const n=e.length-t.length;if(n<0||n>1)throw rr.create("invalid
|
|
|
733
733
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
734
734
|
* See the License for the specific language governing permissions and
|
|
735
735
|
* limitations under the License.
|
|
736
|
-
*/var pr;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.VISIBLE=1]="VISIBLE",e[e.HIDDEN=2]="HIDDEN"}(pr||(pr={}));const hr=["firebase_","google_","ga_"],gr=new RegExp("^[a-zA-Z]\\w*$");function mr(){const e=lr.getInstance().navigator;return e?.serviceWorker?e.serviceWorker.controller?2:3:1}function
|
|
736
|
+
*/var pr;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.VISIBLE=1]="VISIBLE",e[e.HIDDEN=2]="HIDDEN"}(pr||(pr={}));const hr=["firebase_","google_","ga_"],gr=new RegExp("^[a-zA-Z]\\w*$");function mr(){const e=lr.getInstance().navigator;return e?.serviceWorker?e.serviceWorker.controller?2:3:1}function br(){switch(lr.getInstance().document.visibilityState){case"visible":return pr.VISIBLE;case"hidden":return pr.HIDDEN;default:return pr.UNKNOWN}}function vr(){const e=lr.getInstance().navigator.connection;switch(e&&e.effectiveType){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}
|
|
737
737
|
/**
|
|
738
738
|
* @license
|
|
739
739
|
* Copyright 2020 Google LLC
|
|
@@ -815,7 +815,7 @@ const _r="0.0.1",wr={loggingEnabled:!0},Er="FIREBASE_INSTALLATIONS_AUTH";functio
|
|
|
815
815
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
816
816
|
* See the License for the specific language governing permissions and
|
|
817
817
|
* limitations under the License.
|
|
818
|
-
*/function xr(e,t){Lr||(Lr={send:Ur(Hr),flush:jr}),Lr.send(e,t)}function zr(e){const t=dr.getInstance();!t.instrumentationEnabled&&e.isAuto||(t.dataCollectionEnabled||e.isAuto)&&lr.getInstance().requiredApisAvailable()&&(3===Dr?Vr(e):kr(e.performanceController).then((()=>Vr(e)),(()=>Vr(e))))}function Vr(e){if(!ur())return;const t=dr.getInstance();t.loggingEnabled&&t.logTraceAfterSampling&&xr(e,1)}function Hr(e,t){return 0===t?function(e){const t={url:e.url,http_method:e.httpMethod||0,http_response_code:200,response_payload_bytes:e.responsePayloadBytes,client_start_time_us:e.startTimeUs,time_to_response_initiated_us:e.timeToResponseInitiatedUs,time_to_response_completed_us:e.timeToResponseCompletedUs},n={application_info:qr(e.performanceController.app),network_request_metric:t};return JSON.stringify(n)}(e):function(e){const t={name:e.name,is_auto:e.isAuto,client_start_time_us:e.startTimeUs,duration_us:e.durationUs};0!==Object.keys(e.counters).length&&(t.counters=e.counters);const n=e.getAttributes();0!==Object.keys(n).length&&(t.custom_attributes=n);const r={application_info:qr(e.performanceController.app),trace_metric:t};return JSON.stringify(r)}(e)}function qr(e){return{google_app_id:yr(e),app_instance_id:ur(),web_app_info:{sdk_version:Wn,page_url:lr.getInstance().getUrl(),service_worker_status:mr(),visibility_state:
|
|
818
|
+
*/function xr(e,t){Lr||(Lr={send:Ur(Hr),flush:jr}),Lr.send(e,t)}function zr(e){const t=dr.getInstance();!t.instrumentationEnabled&&e.isAuto||(t.dataCollectionEnabled||e.isAuto)&&lr.getInstance().requiredApisAvailable()&&(3===Dr?Vr(e):kr(e.performanceController).then((()=>Vr(e)),(()=>Vr(e))))}function Vr(e){if(!ur())return;const t=dr.getInstance();t.loggingEnabled&&t.logTraceAfterSampling&&xr(e,1)}function Hr(e,t){return 0===t?function(e){const t={url:e.url,http_method:e.httpMethod||0,http_response_code:200,response_payload_bytes:e.responsePayloadBytes,client_start_time_us:e.startTimeUs,time_to_response_initiated_us:e.timeToResponseInitiatedUs,time_to_response_completed_us:e.timeToResponseCompletedUs},n={application_info:qr(e.performanceController.app),network_request_metric:t};return JSON.stringify(n)}(e):function(e){const t={name:e.name,is_auto:e.isAuto,client_start_time_us:e.startTimeUs,duration_us:e.durationUs};0!==Object.keys(e.counters).length&&(t.counters=e.counters);const n=e.getAttributes();0!==Object.keys(n).length&&(t.custom_attributes=n);const r={application_info:qr(e.performanceController.app),trace_metric:t};return JSON.stringify(r)}(e)}function qr(e){return{google_app_id:yr(e),app_instance_id:ur(),web_app_info:{sdk_version:Wn,page_url:lr.getInstance().getUrl(),service_worker_status:mr(),visibility_state:br(),effective_connection_type:vr()},application_process_state:0}}
|
|
819
819
|
/**
|
|
820
820
|
* @license
|
|
821
821
|
* Copyright 2020 Google LLC
|
|
@@ -864,7 +864,7 @@ const _r="0.0.1",wr={loggingEnabled:!0},Er="FIREBASE_INSTALLATIONS_AUTH";functio
|
|
|
864
864
|
* See the License for the specific language governing permissions and
|
|
865
865
|
* limitations under the License.
|
|
866
866
|
*/
|
|
867
|
-
class Jr{constructor(e,t,n=!1,r){this.performanceController=e,this.name=t,this.isAuto=n,this.state=1,this.customAttributes={},this.counters={},this.api=lr.getInstance(),this.randomId=Math.floor(1e6*Math.random()),this.isAuto||(this.traceStartMark=`FB-PERF-TRACE-START-${this.randomId}-${this.name}`,this.traceStopMark=`FB-PERF-TRACE-STOP-${this.randomId}-${this.name}`,this.traceMeasure=r||`${Kn}-${this.randomId}-${this.name}`,r&&this.calculateTraceMetrics())}start(){if(1!==this.state)throw rr.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2}stop(){if(2!==this.state)throw rr.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),zr(this)}record(e,t,n){if(e<=0)throw rr.create("nonpositive trace startTime",{traceName:this.name});if(t<=0)throw rr.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(1e3*t),this.startTimeUs=Math.floor(1e3*e),n&&n.attributes&&(this.customAttributes={...n.attributes}),n&&n.metrics)for(const e of Object.keys(n.metrics))isNaN(Number(n.metrics[e]))||(this.counters[e]=Math.floor(Number(n.metrics[e])));zr(this)}incrementMetric(e,t=1){void 0===this.counters[e]?this.putMetric(e,t):this.putMetric(e,this.counters[e]+t)}putMetric(e,t){if(!function(e,t){return!(0===e.length||e.length>100)&&(t&&t.startsWith(Jn)&&Kr.indexOf(e)>-1||!e.startsWith("_"))}(e,this.name))throw rr.create("invalid custom metric name",{customMetricName:e});this.counters[e]=function(e){const t=Math.floor(e);return t<e&&ir.info(`Metric value should be an Integer, setting the value as : ${t}.`),t}(t??0)}getMetric(e){return this.counters[e]||0}putAttribute(e,t){const n=function(e){return!(0===e.length||e.length>40)&&(!hr.some((t=>e.startsWith(t)))&&!!e.match(gr))}(e),r=function(e){return 0!==e.length&&e.length<=100}(t);if(n&&r)this.customAttributes[e]=t;else{if(!n)throw rr.create("invalid attribute name",{attributeName:e});if(!r)throw rr.create("invalid attribute value",{attributeValue:t})}}getAttribute(e){return this.customAttributes[e]}removeAttribute(e){void 0!==this.customAttributes[e]&&delete this.customAttributes[e]}getAttributes(){return{...this.customAttributes}}setStartTime(e){this.startTimeUs=e}setDuration(e){this.durationUs=e}calculateTraceMetrics(){const e=this.api.getEntriesByName(this.traceMeasure),t=e&&e[0];t&&(this.durationUs=Math.floor(1e3*t.duration),this.startTimeUs=Math.floor(1e3*(t.startTime+this.api.getTimeOrigin())))}static createOobTrace(e,t,n,r,i){const a=lr.getInstance().getUrl();if(!a)return;const o=new Jr(e,Jn+a,!0),s=Math.floor(1e3*lr.getInstance().getTimeOrigin());o.setStartTime(s),t&&t[0]&&(o.setDuration(Math.floor(1e3*t[0].duration)),o.putMetric("domInteractive",Math.floor(1e3*t[0].domInteractive)),o.putMetric("domContentLoadedEventEnd",Math.floor(1e3*t[0].domContentLoadedEventEnd)),o.putMetric("loadEventEnd",Math.floor(1e3*t[0].loadEventEnd)));if(n){const e=n.find((e=>"first-paint"===e.name));e&&e.startTime&&o.putMetric("_fp",Math.floor(1e3*e.startTime));const t=n.find((e=>"first-contentful-paint"===e.name));t&&t.startTime&&o.putMetric(Gn,Math.floor(1e3*t.startTime)),i&&o.putMetric(Xn,Math.floor(1e3*i))}this.addWebVitalMetric(o,Yn,"lcp_element",r.lcp),this.addWebVitalMetric(o,Qn,"cls_largestShiftTarget",r.cls),this.addWebVitalMetric(o,Zn,"inp_interactionTarget",r.inp),zr(o),Lr&&Lr.flush()}static addWebVitalMetric(e,t,n,r){r&&(e.putMetric(t,Math.floor(1e3*r.value)),r.elementAttribution&&e.putAttribute(n,r.elementAttribution))}static createUserTimingTrace(e,t){zr(new Jr(e,t,!1,t))}}
|
|
867
|
+
class Jr{constructor(e,t,n=!1,r){this.performanceController=e,this.name=t,this.isAuto=n,this.state=1,this.customAttributes={},this.counters={},this.api=lr.getInstance(),this.randomId=Math.floor(1e6*Math.random()),this.isAuto||(this.traceStartMark=`FB-PERF-TRACE-START-${this.randomId}-${this.name}`,this.traceStopMark=`FB-PERF-TRACE-STOP-${this.randomId}-${this.name}`,this.traceMeasure=r||`${Kn}-${this.randomId}-${this.name}`,r&&this.calculateTraceMetrics())}start(){if(1!==this.state)throw rr.create("trace started",{traceName:this.name});this.api.mark(this.traceStartMark),this.state=2}stop(){if(2!==this.state)throw rr.create("trace stopped",{traceName:this.name});this.state=3,this.api.mark(this.traceStopMark),this.api.measure(this.traceMeasure,this.traceStartMark,this.traceStopMark),this.calculateTraceMetrics(),zr(this)}record(e,t,n){if(e<=0)throw rr.create("nonpositive trace startTime",{traceName:this.name});if(t<=0)throw rr.create("nonpositive trace duration",{traceName:this.name});if(this.durationUs=Math.floor(1e3*t),this.startTimeUs=Math.floor(1e3*e),n&&n.attributes&&(this.customAttributes={...n.attributes}),n&&n.metrics)for(const e of Object.keys(n.metrics))isNaN(Number(n.metrics[e]))||(this.counters[e]=Math.floor(Number(n.metrics[e])));zr(this)}incrementMetric(e,t=1){void 0===this.counters[e]?this.putMetric(e,t):this.putMetric(e,this.counters[e]+t)}putMetric(e,t){if(!function(e,t){return!(0===e.length||e.length>100)&&(t&&t.startsWith(Jn)&&Kr.indexOf(e)>-1||!e.startsWith("_"))}(e,this.name))throw rr.create("invalid custom metric name",{customMetricName:e});this.counters[e]=function(e){const t=Math.floor(e);return t<e&&ir.info(`Metric value should be an Integer, setting the value as : ${t}.`),t}(t??0)}getMetric(e){return this.counters[e]||0}putAttribute(e,t){const n=function(e){return!(0===e.length||e.length>40)&&(!hr.some((t=>e.startsWith(t)))&&!!e.match(gr))}(e),r=function(e){return 0!==e.length&&e.length<=100}(t);if(n&&r)this.customAttributes[e]=t;else{if(!n)throw rr.create("invalid attribute name",{attributeName:e});if(!r)throw rr.create("invalid attribute value",{attributeValue:t})}}getAttribute(e){return this.customAttributes[e]}removeAttribute(e){void 0!==this.customAttributes[e]&&delete this.customAttributes[e]}getAttributes(){return{...this.customAttributes}}setStartTime(e){this.startTimeUs=e}setDuration(e){this.durationUs=e}calculateTraceMetrics(){const e=this.api.getEntriesByName(this.traceMeasure),t=e&&e[0];t&&(this.durationUs=Math.floor(1e3*t.duration),this.startTimeUs=Math.floor(1e3*(t.startTime+this.api.getTimeOrigin())))}static createOobTrace(e,t,n,r,i){const a=lr.getInstance().getUrl();if(!a)return;const o=new Jr(e,Jn+a,!0),s=Math.floor(1e3*lr.getInstance().getTimeOrigin());o.setStartTime(s),t&&t[0]&&(o.setDuration(Math.floor(1e3*t[0].duration)),o.putMetric("domInteractive",Math.floor(1e3*t[0].domInteractive)),o.putMetric("domContentLoadedEventEnd",Math.floor(1e3*t[0].domContentLoadedEventEnd)),o.putMetric("loadEventEnd",Math.floor(1e3*t[0].loadEventEnd)));if(n){const e=n.find((e=>"first-paint"===e.name));e&&e.startTime&&o.putMetric("_fp",Math.floor(1e3*e.startTime));const t=n.find((e=>"first-contentful-paint"===e.name));t&&t.startTime&&o.putMetric(Gn,Math.floor(1e3*t.startTime)),i&&o.putMetric(Xn,Math.floor(1e3*i))}this.addWebVitalMetric(o,Yn,"lcp_element",r.lcp),this.addWebVitalMetric(o,Qn,"cls_largestShiftTarget",r.cls),this.addWebVitalMetric(o,Zn,"inp_interactionTarget",r.inp),zr(o),Lr&&Lr.flush()}static addWebVitalMetric(e,t,n,r){r&&(e.putMetric(t,Math.floor(1e3*r.value)),r.elementAttribution&&(r.elementAttribution.length>100?e.putAttribute(n,r.elementAttribution.substring(0,100)):e.putAttribute(n,r.elementAttribution)))}static createUserTimingTrace(e,t){zr(new Jr(e,t,!1,t))}}
|
|
868
868
|
/**
|
|
869
869
|
* @license
|
|
870
870
|
* Copyright 2020 Google LLC
|
|
@@ -946,7 +946,7 @@ class ni{constructor(e,t){this.app=e,this._delegate=t}get instrumentationEnabled
|
|
|
946
946
|
* See the License for the specific language governing permissions and
|
|
947
947
|
* limitations under the License.
|
|
948
948
|
*/
|
|
949
|
-
var ii;(ii=rt).INTERNAL.registerComponent(new y("performance-compat",ri,"PUBLIC")),ii.registerVersion("@firebase/performance-compat","0.2.
|
|
949
|
+
var ii;(ii=rt).INTERNAL.registerComponent(new y("performance-compat",ri,"PUBLIC")),ii.registerVersion("@firebase/performance-compat","0.2.22");
|
|
950
950
|
/**
|
|
951
951
|
* @license
|
|
952
952
|
* Copyright 2019 Google LLC
|
|
@@ -963,5 +963,5 @@ var ii;(ii=rt).INTERNAL.registerComponent(new y("performance-compat",ri,"PUBLIC"
|
|
|
963
963
|
* See the License for the specific language governing permissions and
|
|
964
964
|
* limitations under the License.
|
|
965
965
|
*/
|
|
966
|
-
return rt.registerVersion("firebase","12.
|
|
966
|
+
return rt.registerVersion("firebase","12.1.0","compat-lite"),rt}));
|
|
967
967
|
//# sourceMappingURL=firebase-performance-standalone-compat.js.map
|