PageSourceSearch

https://canadadrivingtests.ca/firebase-analytics.0f855c1b8ca5b4885c46.js

js canadadrivingtests.ca collected 2026-10-02 00:44:56 UTC 11,568 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpractice_test_website=self.webpackChunkpractice_test_website||[]).push([[699],{389:(e,t,n)=>{n.r(t),n.d(t,{getAnalytics:()=>R,getGoogleAnalyticsClientId:()=>G,initializeAnalytics:()=>W,isSupported:()=>q,logEvent:()=>Q,setAnalyticsCollectionEnabled:()=>H,setConsent:()=>Y,setCurrentScreen:()=>B,setDefaultEventParameters:()=>J,setUserId:()=>V,setUserProperties:()=>X,settings:()=>U});var i=n(461),a=n(424),s=n(743),r=n(125);n(559);const o="analytics",c="firebase_id",l="origin",d=6e4,u="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",p="https://www.googletagmanager.com/gtag/js",f=new a.Vy("@firebase/analytics"),m={"already-exists":"A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."},h=new s.FA("analytics","Analytics",m);function g(e){if(!e.startsWith(p)){const t=h.create("invalid-gtag-resource",{gtagURL:e});return f.warn(t.message),""}return e}function y(e){return Promise.all(e.map((e=>e.catch((e=>e)))))}function w(e,t){const n=function(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}("firebase-js-sdk-policy",{createScriptURL:g}),i=document.createElement("script"),a=`${p}?l=${e}&id=${t}`;i.src=n?null==n?void 0:n.createScriptURL(a):a,i.async=!0,document.head.appendChild(i)}function I(e,t,n,i){return async function(a,...s){try{if("event"===a){const[i,a]=s;await async function(e,t,n,i,a){try{let s=[];if(a&&a.send_to){let e=a.send_to;Array.isArray(e)||(e=[e]);const i=await y(n);for(const n of e){const e=i.find((e=>e.measurementId===n)),a=e&&t[e.appId];if(!a){s=[];break}s.push(a)}}0===s.length&&(s=Object.values(t)),await Promise.all(s),e("event",i,a||{})}catch(e){f.error(e)}}(e,t,n,i,a)}else if("config"===a){const[a,r]=s;await async function(e,t,n,i,a,s){const r=i[a];try{if(r)await t[r];else{const e=(await y(n)).find((e=>e.measurementId===a));e&&await t[e.appId]}}catch(e){f.error(e)}e("config",a,s)}(e,t,n,i,a,r)}else if("consent"===a){const[t,n]=s;e("consent",t,n)}else if("get"===a){const[t,n,i]=s;e("get",t,n,i)}else if("set"===a){const[t]=s;e("set",t)}else e(a,...s)}catch(e){f.error(e)}}}const v=30;const b=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function T(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function A(e,t=b,n){const{appId:i,apiKey:a,measurementId:s}=e.options;if(!i)throw h.create("no-app-id");
1if(!a){if(s)return{measurementId:s,appId:i};throw h.create("no-api-key")}const r=t.getThrottleMetadata(i)||{backoffCount:0,throttleEndTimeMillis:Date.now()},o=new M;return setTimeout((async()=>{o.abort()}),void 0!==n?n:d),D({appId:i,apiKey:a,measurementId:s},r,o,t)}async function D(e,{throttleEndTimeMillis:t,backoffCount:n},i,a=b){var r;const{appId:o,measurementId:c}=e;try{await function(e,t){return new Promise(((n,i)=>{const a=Math.max(t-Date.now(),0),s=setTimeout(n,a);e.addEventListener((()=>{clearTimeout(s),i(h.create("fetch-throttle",{throttleEndTimeMillis:t}))}))}))}(i,t)}catch(e){if(c)return f.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${c} provided in the "measurementId" field in the local Firebase config. [${null==e?void 0:e.message}]`),{appId:o,measurementId:c};throw e}try{const t=await async function(e){var t;const{appId:n,apiKey:i}=e,a={method:"GET",headers:T(i)},s=u.replace("{app-id}",n),r=await fetch(s,a);if(200!==r.status&&304!==r.status){let e="";try{const n=await r.json();(null===(t=n.error)||void 0===t?void 0:t.message)&&(e=n.error.message)}catch(e){}throw h.create("config-fetch-failed",{httpStatus:r.status,responseMessage:e})}return r.json()}(e);return a.deleteThrottleMetadata(o),t}catch(t){const l=t;if(!function(e){if(!(e instanceof s.g&&e.customData))return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(l)){if(a.deleteThrottleMetadata(o),c)return f.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${c} provided in the "measurementId" field in the local Firebase config. [${null==l?void 0:l.message}]`),{appId:o,measurementId:c};throw t}const d=503===Number(null===(r=null==l?void 0:l.customData)||void 0===r?void 0:r.httpStatus)?(0,s.p9)(n,a.intervalMillis,v):(0,s.p9)(n,a.intervalMillis),u={throttleEndTimeMillis:Date.now()+d,backoffCount:n+1};return a.setThrottleMetadata(o,u),f.debug(`Calling attemptFetch again in ${d} millis`),D(e,u,i,a)}}class M{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach((e=>e()))}}let F,$;function k(e){$=e}function z(e){F=e}async function P(e,t,n,i,a,r,o){var d;const u=A(e);u.then((t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&f.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)})).catch((e=>f.error(e))),t.push(u);const m=async function(){if(!(0,s.zW)())return f.warn(h.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await(0,s.eX)()}catch(e){return f.warn(h.create("indexeddb-unavailable",{errorInfo:null==e?void 0:e.toString()}).message),!1}return!0}().then((e=>e?i.getId():void 0)),[g,y]=await Promise.all([u,m]);(function(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(p)&&n.src.includes(e))return n;return null})(r)||w(r,g.measurementId),$&&(a("consent","default",$),k(void 0)),a("js",new Date);const I=null!==(d=null==o?void 0:o.config)&&void 0!==d?d:{};return I[l]="firebase",I.update=!0,null!=y&&(I[c]=y),a("config",g.measurementId,I),F&&(a("set",F),z(void 0)),g.measurementId}class x{constructor(e){this.app=e}_delete(){return delete C[this.app.options.appId],Promise.resolve()}}let C={},_=[];const E={};let j,K,S="dataLayer",L="gtag",O=!1;function U(e){if(O)throw h.create("already-initialized");e.dataLayerName&&(S=e.dataLayerName),e.gtagName&&(L=e.gtagName)}function N(e,t,n){!function(){const e=[];if((0,s.sr)()&&e.push("This is a browser extension environment."),(0,s.dM)()||e.push("Cookies are not available."),e.length>0){const t=e.map(((e,t)=>`(${t+1}) ${e}`)).join(" "),n=h.create("invalid-analytics-context",{errorInfo:t});f.warn(n.message)}}();const i=e.options.appId;if(!i)throw h.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw h.create("no-api-key");f.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=C[i])throw h.create("already-exists",{id:i});if(!O){!function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(S);const{wrappedGtag:e,gtagCore:t}=function(e,t,n,i,a){let s=function(...e){window[i].push(arguments)};
1return window[a]&&"function"==typeof window[a]&&(s=window[a]),window[a]=I(s,e,t,n),{gtagCore:s,wrappedGtag:window[a]}}(C,_,E,S,L);K=e,j=t,O=!0}C[i]=P(e,_,E,t,j,S,n);return new x(e)}function R(e=(0,i.Sx)()){e=(0,s.Ku)(e);const t=(0,i.j6)(e,o);return t.isInitialized()?t.getImmediate():W(e)}function W(e,t={}){const n=(0,i.j6)(e,o);if(n.isInitialized()){const e=n.getImmediate();if((0,s.bD)(t,n.getOptions()))return e;throw h.create("already-initialized")}return n.initialize({options:t})}async function q(){if((0,s.sr)())return!1;if(!(0,s.dM)())return!1;if(!(0,s.zW)())return!1;try{return await(0,s.eX)()}catch(e){return!1}}function B(e,t,n){e=(0,s.Ku)(e),async function(e,t,n,i){if(i&&i.global)return e("set",{screen_name:n}),Promise.resolve();e("config",await t,{update:!0,screen_name:n})}(K,C[e.app.options.appId],t,n).catch((e=>f.error(e)))}async function G(e){return e=(0,s.Ku)(e),async function(e,t){const n=await t;return new Promise(((t,i)=>{e("get",n,"client_id",(e=>{e||i(h.create("no-client-id")),t(e)}))}))}(K,C[e.app.options.appId])}function V(e,t,n){e=(0,s.Ku)(e),async function(e,t,n,i){if(i&&i.global)return e("set",{user_id:n}),Promise.resolve();e("config",await t,{update:!0,user_id:n})}(K,C[e.app.options.appId],t,n).catch((e=>f.error(e)))}function X(e,t,n){e=(0,s.Ku)(e),async function(e,t,n,i){if(i&&i.global){const t={};for(const e of Object.keys(n))t[`user_properties.${e}`]=n[e];return e("set",t),Promise.resolve()}e("config",await t,{update:!0,user_properties:n})}(K,C[e.app.options.appId],t,n).catch((e=>f.error(e)))}function H(e,t){e=(0,s.Ku)(e),async function(e,t){const n=await e;window[`ga-disable-${n}`]=!t}(C[e.app.options.appId],t).catch((e=>f.error(e)))}function J(e){K?K("set",e):z(e)}function Q(e,t,n,i){e=(0,s.Ku)(e),async function(e,t,n,i,a){if(a&&a.global)e("event",n,i);else{const a=await t;e("event",n,Object.assign(Object.assign({},i),{send_to:a}))}}(K,C[e.app.options.appId],t,n,i).catch((e=>f.error(e)))}function Y(e){K?K("consent","update",e):k(e)}const Z="@firebase/analytics",ee="0.10.8";(0,i.om)(new r.uA(o,((e,{options:t})=>N(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t)),"PUBLIC")),(0,i.om)(new r.uA("analytics-internal",(function(e){try{const t=e.getProvider(o).getImmediate();return{logEvent:(e,n,i)=>Q(t,e,n,i)}}catch(e){throw h.create("interop-component-reg-failed",{reason:e})}}),"PRIVATE")),(0,i.KO)(Z,ee),(0,i.KO)(Z,ee,"esm2017")}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.