1import{_ as t,C as e,r as n,c as i,l as s,d as a,y as r,n as o,k as h,p as c,u as p}from"./firebase-core-IgwuAbwy.js"; 2/** 3 * @license 4 * Copyright 2020 Google LLC 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */const u="functions"; 18/** 19 * @license 20 * Copyright 2017 Google LLC 21 * 22 * Licensed under the Apache License, Version 2.0 (the "License"); 23 * you may not use this file except in compliance with the License. 24 * You may obtain a copy of the License at 25 * 26 * http://www.apache.org/licenses/LICENSE-2.0 27 * 28 * Unless required by applicable law or agreed to in writing, software 29 * distributed under the License is distributed on an "AS IS" BASIS, 30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 31 * See the License for the specific language governing permissions and 32 * limitations under the License. 33 */class g{constructor(t,e,n,s){this.app=t,this.auth=null,this.messaging=null,this.appCheck=null,this.serverAppAppCheckToken=null,i(t)&&t.settings.appCheckToken&&(this.serverAppAppCheckToken=t.settings.appCheckToken),this.auth=e.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||e.get().then(t=>this.auth=t,()=>{}),this.messaging||n.get().then(t=>this.messaging=t,()=>{}),this.appCheck||null==s||s.get().then(t=>this.appCheck=t,()=>{})}async getAuthToken(){if(this.auth)try{const t=await this.auth.getToken();return null==t?void 0:t.accessToken}catch(t){return}}async getMessagingToken(){if(this.messaging&&"Notification"in self&&"granted"===Notification.permission)try{return await this.messaging.getToken()}catch(t){return}}async getAppCheckToken(t){if(this.serverAppAppCheckToken)return this.serverAppAppCheckToken;if(this.appCheck){const e=t?await this.appCheck.getLimitedUseToken():await this.appCheck.getToken();return e.error?null:e.token}return null}async getContext(t){return{authToken:await this.getAuthToken(),messagingToken:await this.getMessagingToken(),appCheckToken:await this.getAppCheckToken(t)}}} 34/** 35 * @license 36 * Copyright 2017 Google LLC 37 * 38 * Licensed under the Apache License, Version 2.0 (the "License"); 39 * you may not use this file except in compliance with the License. 40 * You may obtain a copy of the License at 41 * 42 * http://www.apache.org/licenses/LICENSE-2.0 43 * 44 * Unless required by applicable law or agreed to in writing, software 45 * distributed under the License is distributed on an "AS IS" BASIS, 46 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 47 * See the License for the specific language governing permissions and 48 * limitations under the License. 49 */const l="us-central1";class m{constructor(t,e,n,i,s=l,a=(...t)=>fetch(...t)){this.app=t,this.fetchImpl=a,this.emulatorOrigin=null,this.contextProvider=new g(t,e,n,i),this.cancelAllRequests=new Promise(t=>{this.deleteService=()=>Promise.resolve(t())});try{const t=new URL(s);this.customDomain=t.origin+("/"===t.pathname?"":t.pathname),this.region=l}catch(r){this.customDomain=null,this.region=s}}_delete(){return this.deleteService()}_url(t){const e=this.app.options.projectId;if(null!==this.emulatorOrigin){return`${this.emulatorOrigin}/${e}/${this.region}/${t}`}return null!==this.customDomain?`${this.customDomain}/${t}`:`https://${this.region}-${e}.cloudfunctions.net/${t}`}}const k="@firebase/functions",f="0.12.9"; 50/** 51 * @license 52 * Copyright 2020 Google LLC 53 * 54 * Licensed under the Apache License, Version 2.0 (the "License"); 55 * you may not use this file except in compliance with the License. 56 * You may obtain a copy of the License at 57 * 58 * http://www.apache.org/licenses/LICENSE-2.0 59 * 60 * Unless required by applicable law or agreed to in writing, softw
60are 61 * distributed under the License is distributed on an "AS IS" BASIS, 62 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 63 * See the License for the specific language governing permissions and 64 * limitations under the License. 65 */ 66function d(t=o(),e=l){const n=s(a(t),u).getImmediate({identifier:e}),i=r("functions");return i&&function(t,e,n){!function(t,e,n){const i=h(e);t.emulatorOrigin=`http${i?"s":""}://${e}:${n}`,i&&(c(t.emulatorOrigin),p("Functions",!0))}(a(t),e,n)}(n,...i),n}var T;t(new e(u,(t,{instanceIdentifier:e})=>{const n=t.getProvider("app").getImmediate(),i=t.getProvider("auth-internal"),s=t.getProvider("messaging-internal"),a=t.getProvider("app-check-internal");return new m(n,i,s,a,e)},"PUBLIC").setMultipleInstances(!0)),n(k,f,T),n(k,f,"esm2017");export{d as g};
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.