1import{_ as Ne,C as Pe,b as re,c as F,e as Ce,f as ve,i as xe,S as De,j as Le,F as Be,k as Me}from"./index.f85cd6de.js";var Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** 2 * @license 3 * Copyright 2017 Google LLC 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */const he="firebasestorage.googleapis.com",de="storageBucket",qe=2*60*1e3,Fe=10*60*1e3,He=1e3;/** 17 * @license 18 * Copyright 2017 Google LLC 19 * 20 * Licensed under the Apache License, Version 2.0 (the "License"); 21 * you may not use this file except in compliance with the License. 22 * You may obtain a copy of the License at 23 * 24 * http://www.apache.org/licenses/LICENSE-2.0 25 * 26 * Unless required by applicable law or agreed to in writing, software 27 * distributed under the License is distributed on an "AS IS" BASIS, 28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 29 * See the License for the specific language governing permissions and 30 * limitations under the License. 31 */class d extends Be{constructor(e,n,s=0){super(W(e),`Firebase Storage: ${n} (${W(e)})`),this.status_=s,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,d.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return W(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage} 32${this.customData.serverResponse}`:this.message=this._baseMessage}}var c;(function(t){t.UNKNOWN="unknown",t.OBJECT_NOT_FOUND="object-not-found",t.BUCKET_NOT_FOUND="bucket-not-found",t.PROJECT_NOT_FOUND="project-not-found",t.QUOTA_EXCEEDED="quota-exceeded",t.UNAUTHENTICATED="unauthenticated",t.UNAUTHORIZED="unauthorized",t.UNAUTHORIZED_APP="unauthorized-app",t.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",t.INVALID_CHECKSUM="invalid-checksum",t.CANCELED="canceled",t.INVALID_EVENT_NAME="invalid-event-name",t.INVALID_URL="invalid-url",t.INVALID_DEFAULT_BUCKET="invalid-default-bucket",t.NO_DEFAULT_BUCKET="no-default-bucket",t.CANNOT_SLICE_BLOB="cannot-slice-blob",t.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",t.NO_DOWNLOAD_URL="no-download-url",t.INVALID_ARGUMENT="invalid-argument",t.INVALID_ARGUMENT_COUNT="invalid-argument-count",t.APP_DELETED="app-deleted",t.INVALID_ROOT_OPERATION="invalid-root-operation",t.INVALID_FORMAT="invalid-format",t.INTERNAL_ERROR="internal-error",t.UNSUPPORTED_ENVIRONMENT="unsupported-environment"})(c||(c={}));function W(t){return"storage/"+t}function J(){const t="An unknown error occurred, please check the error payload for server response.";return new d(c.UNKNOWN,t)}function ze(t){return new d(c.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")}function je(t){return new d(c.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function $e(){const t="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new d(c.UNAUTHENTICATED,t)}function Ge(){return new d(c.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project.")}function Xe(t){return new d(c.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")}function fe(){return new d(c.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function _e(){return new d(c.CANCELED,"User canceled the upload/download.")}function Ve(t){return new d(c.INVALID_URL,"Invalid URL '"+t+"'.")}function We(t){return new d(c.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")}function Ke(){return new d(c.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+de+"' property when initializing the app?")}function pe(){return new d(c.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function Ze(){return new d(c.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")}function Ye(){return new d(c.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")}function Je(t){return new d(c.UNSUPPORTED_ENVIRONMENT,`${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`)}function Y(t){return new d(c.INVALID_ARGUMENT,t)}function me(){return new d(c.APP_DELETED,"The Firebase app was deleted.")}function Qe(t){return new d(c.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function q(t,e){return new d(c.INVALID_FORMAT,"String does not match format '"+t+"': "+e)}function M(t){throw new d(c.INTERNAL_ERROR,"Internal error: "+t)}/** 33 * @license 34 * Copyright 2017 Google LLC 35 * 36 * Licensed under the Apache License, Version 2.0 (the "License");
37 * you may not use this file except in compliance with the License. 38 * You may obtain a copy of the License at 39 * 40 * http://www.apache.org/licenses/LICENSE-2.0 41 * 42 * Unless required by applicable law or agreed to in writing, software 43 * distributed under the License is distributed on an "AS IS" BASIS, 44 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 45 * See the License for the specific language governing permissions and 46 * limitations under the License. 47 */class k{constructor(e,n){this.bucket=e,this.path_=n}get path(){return this.path_}get isRoot(){return this.path.length===0}fullServerUrl(){const e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,n){let s;try{s=k.makeFromUrl(e,n)}catch{return new k(e,"")}if(s.path==="")return s;throw We(e)}static makeFromUrl(e,n){let s=null;const r="([A-Za-z0-9.\\-_]+)";function i(b){b.path.charAt(b.path.length-1)==="/"&&(b.path_=b.path_.slice(0,-1))}const o="(/(.*))?$",u=new RegExp("^gs://"+r+o,"i"),a={bucket:1,path:3};function l(b){b.path_=decodeURIComponent(b.path)}const h="v[A-Za-z0-9_]+",f=n.replace(/[.]/g,"\\."),p="(/([^?#]*).*)?$",m=new RegExp(`^https?://${f}/${h}/b/${r}/o${p}`,"i"),g={bucket:1,path:3},y=n===he?"(?:storage.googleapis.com|storage.cloud.google.com)":n,_="([^?#]*)",U=new RegExp(`^https?://${y}/${r}/${_}`,"i"),R=[{regex:u,indices:a,postModify:i},{regex:m,indices:g,postModify:l},{regex:U,indices:{bucket:1,path:2},postModify:l}];for(let b=0;b<R.length;b++){const v=R[b],x=v.regex.exec(e);if(x){const X=x[v.indices.bucket];let B=x[v.indices.path];B||(B=""),s=new k(X,B),v.postModify(s);break}}if(s==null)throw Ve(e);return s}}class et{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}/** 48 * @license 49 * Copyright 2017 Google LLC 50 * 51 * Licensed under the Apache License, Version 2.0 (the "License"); 52 * you may not use this file except in compliance with the License. 53 * You may obtain a copy of the License at 54 * 55 * http://www.apache.org/licenses/LICENSE-2.0 56 * 57 * Unless required by applicable law or agreed to in writing, software 58 * distributed under the License is distributed on an "AS IS" BASIS, 59 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 60 * See the License for the specific language governing permissions and 61 * limitations under the License. 62 */function tt(t,e,n){let s=1,r=null,i=null,o=!1,u=0;function a(){return u===2}let l=!1;function h(..._){l||(l=!0,e.apply(null,_))}function f(_){r=setTimeout(()=>{r=null,t(m,a())},_)}function p(){i&&clearTimeout(i)}function m(_,...U){if(l){p();return}if(_){p(),h.call(null,_,...U);return}if(a()||o){p(),h.call(null,_,...U);return}s<64&&(s*=2);let R;u===1?(u=2,R=0):R=(s+Math.random())*1e3,f(R)}let g=!1;function y(_){g||(g=!0,p(),!l&&(r!==null?(_||(u=2),clearTimeout(r),f(0)):_||(u=1)))}return f(0),i=setTimeout(()=>{o=!0,y(!0)},n),y}function nt(t){t(!1)}/** 63 * @license 64 * Copyright 2017 Google LLC 65 * 66 * Licensed under the Apache License, Version 2.0 (the "License"); 67 * you may not use this file except in compliance with the License. 68 * You may obtain a copy of the License at 69 * 70 * http://www.apache.org/licenses/LICENSE-2.0 71 * 72 * Unless required by applicable law or agreed to in writing, software 73 * distributed under the License is distributed on an "AS IS" BASIS, 74 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 75 * See the License for the specific language governing permissions and 76 * limitations under the License. 77 */function st(t){return t!==void 0}function rt(t){return typeof t=="function"}function it(t){return typeof t=="object"&&!Array.isArray(t)}function G(t){return typeof t=="string"||t instanceof String}function ie(t){return Q()&&t instanceof Blob}function Q(){return typeof Blob<"u"&&!Me()}function oe(t,e,n,s){if(s<e)throw Y(`Invalid value for '${t}'. Expected ${e} or greater.`);if(s>n)throw Y(`Invalid value for '${t}'. Expected ${n} or less.`)}/** 78 * @license 79 * Copyright 2017 Google LLC 80 * 81 * Licensed under the Apache License, Version 2.0 (the "License");
82 * you may not use this file except in compliance with the License. 83 * You may obtain a copy of the License at 84 * 85 * http://www.apache.org/licenses/LICENSE-2.0 86 * 87 * Unless required by applicable law or agreed to in writing, software 88 * distributed under the License is distributed on an "AS IS" BASIS, 89 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 90 * See the License for the specific language governing permissions and 91 * limitations under the License. 92 */function L(t,e,n){let s=e;return n==null&&(s=`https://${e}`),`${n}://${s}/v0${t}`}function ge(t){const e=encodeURIComponent;let n="?";for(const s in t)if(t.hasOwnProperty(s)){const r=e(s)+"="+e(t[s]);n=n+r+"&"}return n=n.slice(0,-1),n}/** 93 * @license 94 * Copyright 2017 Google LLC 95 * 96 * Licensed under the Apache License, Version 2.0 (the "License"); 97 * you may not use this file except in compliance with the License. 98 * You may obtain a copy of the License at 99 * 100 * http://www.apache.org/licenses/LICENSE-2.0 101 * 102 * Unless required by applicable law or agreed to in writing, software 103 * distributed under the License is distributed on an "AS IS" BASIS, 104 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 105 * See the License for the specific language governing permissions and 106 * limitations under the License. 107 */var N;(function(t){t[t.NO_ERROR=0]="NO_ERROR",t[t.NETWORK_ERROR=1]="NETWORK_ERROR",t[t.ABORT=2]="ABORT"})(N||(N={}));/** 108 * @license 109 * Copyright 2022 Google LLC 110 * 111 * Licensed under the Apache License, Version 2.0 (the "License"); 112 * you may not use this file except in compliance with the License. 113 * You may obtain a copy of the License at 114 * 115 * http://www.apache.org/licenses/LICENSE-2.0 116 * 117 * Unless required by applicable law or agreed to in writing, software 118 * distributed under the License is distributed on an "AS IS" BASIS, 119 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 120 * See the License for the specific language governing permissions and 121 * limitations under the License. 122 */function be(t,e){const n=t>=500&&t<600,r=[408,429].indexOf(t)!==-1,i=e.indexOf(t)!==-1;return n||r||i}/** 123 * @license 124 * Copyright 2017 Google LLC 125 * 126 * Licensed under the Apache License, Version 2.0 (the "License"); 127 * you may not use this file except in compliance with the License. 128 * You may obtain a copy of the License at 129 * 130 * http://www.apache.org/licenses/LICENSE-2.0 131 * 132 * Unless required by applicable law or agreed to in writing, software 133 * distributed under the License is distributed on an "AS IS" BASIS, 134 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 135 * See the License for the specific language governing permissions and 136 * limitations under the License. 137 */class ot{constructor(e,n,s,r,i,o,u,a,l,h,f,p=!0){this.url_=e,this.method_=n,this.headers_=s,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=o,this.callback_=u,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=h,this.connectionFactory_=f,this.retry=p,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((m,g)=>{this.resolve_=m,this.reject_=g,this.start_()})}start_(){const e=(s,r)=>{if(r){s(!1,new z(!1,null,!0));return}const i=this.connectionFactory_();this.pendingConnection_=i;const o=u=>{const a=u.loaded,l=u.lengthComputable?u.total:-1;this.progressCallback_!==null&&this.progressCallback_(a,l)};this.progressCallback_!==null&&i.addUploadProgressListener(o),i.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{this.progressCallback_!==null&&i.removeUploadProgressListener(o),this.pendingConnection_=null;const u=i.getErrorCode()===N.NO_ERROR,a=i.getStatus();if(!u||be(a,this.additionalRetryCodes_)&&this.retry){const h=i.getErrorCode()===N.ABORT;s(!1,new z(!1,null,h));return}const l=this.successCodes_.indexOf(a)!==-1;s(!0,new z(l,i))})},n=(s,r)=>{const i=this.resolve_,o=this.reject_,u=r.connection;if(r.wasSuccessCode)try{const a=this.callback_(u,u.getResponse());st(a)?i(a):i()}catch(a){o(a)}else if(u!==null){const a=J();a.serverResponse=u.getErrorText(),this.errorCallback_?o(this.errorCallback_(u,a)):o(a)}else if(r.canceled){const a=this.appDelete_?me():_e();o(a)}else{const a=fe();o(a)}};this.canceled_?n(!1,new z(!1,null,!0)):this.backoffId_=tt(e,n,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,this.backoffId_!==null&&nt(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()}}class z{constructor(e,n,s){this.wasSuccessCode=e,this.connection=n,this.canceled=!!s}}function at(t,e){e!==null&&e.length>0&&(t.Authorization="Firebase "+e)}function ut(t,e){t["X-Firebase-Storage-Version"]="webjs/"+(e??"AppManager")}function lt(t,e){e&&(t["X-Firebase-GMPID"]=e)}function ct(t,e){e!==null&&(t["X-Firebase-AppCheck"]=e)}
137function ht(t,e,n,s,r,i,o=!0){const u=ge(t.urlParams),a=t.url+u,l=Object.assign({},t.headers);return lt(l,e),at(l,n),ut(l,i),ct(l,s),new ot(a,t.method,l,t.body,t.successCodes,t.additionalRetryCodes,t.handler,t.errorHandler,t.timeout,t.progressCallback,r,o)}/** 138 * @license 139 * Copyright 2017 Google LLC 140 * 141 * Licensed under the Apache License, Version 2.0 (the "License"); 142 * you may not use this file except in compliance with the License. 143 * You may obtain a copy of the License at 144 * 145 * http://www.apache.org/licenses/LICENSE-2.0 146 * 147 * Unless required by applicable law or agreed to in writing, software 148 * distributed under the License is distributed on an "AS IS" BASIS, 149 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 150 * See the License for the specific language governing permissions and 151 * limitations under the License. 152 */function dt(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function ft(...t){const e=dt();if(e!==void 0){const n=new e;for(let s=0;s<t.length;s++)n.append(t[s]);return n.getBlob()}else{if(Q())return new Blob(t);throw new d(c.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to support creating Blobs")}}function _t(t,e,n){return t.webkitSlice?t.webkitSlice(e,n):t.mozSlice?t.mozSlice(e,n):t.slice?t.slice(e,n):null}/** 153 * @license 154 * Copyright 2021 Google LLC 155 * 156 * Licensed under the Apache License, Version 2.0 (the "License"); 157 * you may not use this file except in compliance with the License. 158 * You may obtain a copy of the License at 159 * 160 * http://www.apache.org/licenses/LICENSE-2.0 161 * 162 * Unless required by applicable law or agreed to in writing, software 163 * distributed under the License is distributed on an "AS IS" BASIS, 164 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 165 * See the License for the specific language governing permissions and 166 * limitations under the License. 167 */function pt(t){if(typeof atob>"u")throw Je("base-64");return atob(t)}/** 168 * @license 169 * Copyright 2017 Google LLC 170 * 171 * Licensed under the Apache License, Version 2.0 (the "License"); 172 * you may not use this file except in compliance with the License. 173 * You may obtain a copy of the License at 174 * 175 * http://www.apache.org/licenses/LICENSE-2.0 176 * 177 * Unless required by applicable law or agreed to in writing, software 178 * distributed under the License is distributed on an "AS IS" BASIS, 179 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 180 * See the License for the specific language governing permissions and 181 * limitations under the License. 182 */const E={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class K{constructor(e,n){this.data=e,this.contentType=n||null}}function mt(t,e){switch(t){case E.RAW:return new K(Re(e));case E.BASE64:case E.BASE64URL:return new K(Te(t,e));case E.DATA_URL:return new K(bt(e),Rt(e))}throw J()}function Re(t){const e=[];for(let n=0;n<t.length;n++){let s=t.charCodeAt(n);if(s<=127)e.push(s);else if(s<=2047)e.push(192|s>>6,128|s&63);else if((s&64512)===55296)if(!(n<t.length-1&&(t.charCodeAt(n+1)&64512)===56320))e.push(239,191,189);else{const i=s,o=t.charCodeAt(++n);s=65536|(i&1023)<<10|o&1023,e.push(240|s>>18,128|s>>12&63,128|s>>6&63,128|s&63)}else(s&64512)===56320?e.push(239,191,189):e.push(224|s>>12,128|s>>6&63,128|s&63)}return new Uint8Array(e)}function gt(t){let e;try{e=decodeURIComponent(t)}catch{throw q(E.DATA_URL,"Malformed data URL.")}return Re(e)}function Te(t,e){switch(t){case E.BASE64:{const r=e.indexOf("-")!==-1,i=e.indexOf("_")!==-1;if(r||i)throw q(t,"Invalid character '"+(r?"-":"_")+"' found: is it base64url encoded?");break}case E.BASE64URL:{const r=e.indexOf("+")!==-1,i=e.indexOf("/")!==-1;if(r||i)throw q(t,"Invalid character '"+(r?"+":"/")+"' found: is it base64 encoded?");e=e.replace(/-/g,"+").replace(/_/g,"/");break}}let n;try{n=pt(e)}catch(r){throw r.message.includes("polyfill")?r:q(t,"Invalid character found")}const s=new Uint8Array(n.length);for(let r=0;r<n.length;r++)s[r]=n.charCodeAt(r);return s}class we{constructor(e){this.base64=!1,this.contentType=null;const n=e.match(/^data:([^,]+)?,/);if(n===null)throw q(E.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");const s=n[1]||null;s!=null&&(this.base64=Tt(s,";base64"),this.contentType=this.base64?s.substring(0,s.length-7):s),this.rest=e.substring(e.indexOf(",")+1)}}function bt(t){const e=new we(t);return e.base64?Te(E.BASE64,e.rest):gt(e.rest)}function Rt(t){return new we(t).contentType}function Tt(t,e){return t.length>=e.length?t.substring(t.length-e.length)===e:!1}/** 183 * @license 184 * Copyright 2017 Google LLC 185 * 186 * Licensed under the Apache License, Version 2.0 (the "License");
187 * you may not use this file except in compliance with the License. 188 * You may obtain a copy of the License at 189 * 190 * http://www.apache.org/licenses/LICENSE-2.0 191 * 192 * Unless required by applicable law or agreed to in writing, software 193 * distributed under the License is distributed on an "AS IS" BASIS, 194 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 195 * See the License for the specific language governing permissions and 196 * limitations under the License. 197 */class S{constructor(e,n){let s=0,r="";ie(e)?(this.data_=e,s=e.size,r=e.type):e instanceof ArrayBuffer?(n?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),s=this.data_.length):e instanceof Uint8Array&&(n?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),s=e.length),this.size_=s,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,n){if(ie(this.data_)){const s=this.data_,r=_t(s,e,n);return r===null?null:new S(r)}else{const s=new Uint8Array(this.data_.buffer,e,n-e);return new S(s,!0)}}static getBlob(...e){if(Q()){const n=e.map(s=>s instanceof S?s.data_:s);return new S(ft.apply(null,n))}else{const n=e.map(o=>G(o)?mt(E.RAW,o).data:o.data_);let s=0;n.forEach(o=>{s+=o.byteLength});const r=new Uint8Array(s);let i=0;return n.forEach(o=>{for(let u=0;u<o.length;u++)r[i++]=o[u]}),new S(r,!0)}}uploadData(){return this.data_}}/** 198 * @license 199 * Copyright 2017 Google LLC 200 * 201 * Licensed under the Apache License, Version 2.0 (the "License"); 202 * you may not use this file except in compliance with the License. 203 * You may obtain a copy of the License at 204 * 205 * http://www.apache.org/licenses/LICENSE-2.0 206 * 207 * Unless required by applicable law or agreed to in writing, software 208 * distributed under the License is distributed on an "AS IS" BASIS, 209 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 210 * See the License for the specific language governing permissions and 211 * limitations under the License. 212 */function ke(t){let e;try{e=JSON.parse(t)}catch{return null}return it(e)?e:null}/** 213 * @license 214 * Copyright 2017 Google LLC 215 * 216 * Licensed under the Apache License, Version 2.0 (the "License"); 217 * you may not use this file except in compliance with the License. 218 * You may obtain a copy of the License at 219 * 220 * http://www.apache.org/licenses/LICENSE-2.0 221 * 222 * Unless required by applicable law or agreed to in writing, software 223 * distributed under the License is distributed on an "AS IS" BASIS, 224 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 225 * See the License for the specific language governing permissions and 226 * limitations under the License. 227 */function wt(t){if(t.length===0)return null;const e=t.lastIndexOf("/");return e===-1?"":t.slice(0,e)}function kt(t,e){const n=e.split("/").filter(s=>s.length>0).join("/");return t.length===0?n:t+"/"+n}function ye(t){const e=t.lastIndexOf("/",t.length-2);return e===-1?t:t.slice(e+1)}/** 228 * @license 229 * Copyright 2017 Google LLC 230 * 231 * Licensed under the Apache License, Version 2.0 (the "License"); 232 * you may not use this file except in compliance with the License. 233 * You may obtain a copy of the License at 234 * 235 * http://www.apache.org/licenses/LICENSE-2.0 236 * 237 * Unless required by applicable law or agreed to in writing, software 238 * distributed under the License is distributed on an "AS IS" BASIS, 239 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 240 * See the License for the specific language governing permissions and 241 * limitations under the License. 242 */function yt(t,e){return e}class T{constructor(e,n,s,r){this.server=e,this.local=n||e,this.writable=!!s,this.xform=r||yt}}let j=null;function Et(t){return!G(t)||t.length<2?t:ye(t)}function Ee(){if(j)return j;const t=[];t.push(new T("bucket")),t.push(new T("generation")),t.push(new T("metageneration")),t.push(new T("name","fullPath",!0));function e(i,o){return Et(o)}const n=new T("name");n.xform=e,t.push(n);function s(i,o){return o!==void 0?Number(o):o}const r=new T("size");return r.xform=s,t.push(r),t.push(new T("timeCreated")),t.push(new T("updated")),t.push(new T("md5Hash",null,!0)),t.push(new T("cacheControl",null,!0)),t.push(new T("contentDisposition",null,!0)),t.push(new T("contentEncoding",null,!0)),t.push(new T("contentLanguage",null,!0)),t.push(new T("contentType",null,!0)),t.push(new T("metadata","customMetadata",!0)),j=t,j}function Ut(t,e){function n(){const s=t.bucket,r=t.fullPath,i=new k(s,r);return e._makeStorageReference(i)}Object.defineProperty(t,"ref",{get:n})}function Ot(t,e,n){const s={};s.type="file";const r=n.length;for(let i=0;i<r;i++){const o=n[i];s[o.local]=o.xform(s,e[o.server])}return Ut(s,t),s}function Ue(t,e,n){const s=ke(e);return s===null?null:Ot(t,s,n)}function At(t,e,n,s){const r=ke(e);if(r===null||!G(r.downloadTokens))return null;const i=r.downloadTokens;if(i.length===0)return null;const o=encodeURIComponent;return i.split(",").map(l=>{const h=t.bucket,f=t.fullPath,p="/b/"+o(h)+"/o/"+o(f),m=L(p,n,s),g=ge({alt:"media",token:l});return m+g})[0]}function Oe(t,e){const n={},s=e.length;for(let r=0;r<s;r++){const i=e[r];i.writable&&(n[i.server]=t[i.local])}return JSON.stringify(n)}class C{constructor(e,n,s,r){this.url=e,this.method=n,this.handler=s,this.timeout=r,this.urlParam
242s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}/** 243 * @license 244 * Copyright 2017 Google LLC 245 * 246 * Licensed under the Apache License, Version 2.0 (the "License"); 247 * you may not use this file except in compliance with the License. 248 * You may obtain a copy of the License at 249 * 250 * http://www.apache.org/licenses/LICENSE-2.0 251 * 252 * Unless required by applicable law or agreed to in writing, software 253 * distributed under the License is distributed on an "AS IS" BASIS, 254 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 255 * See the License for the specific language governing permissions and 256 * limitations under the License. 257 */function A(t){if(!t)throw J()}function ee(t,e){function n(s,r){const i=Ue(t,r,e);return A(i!==null),i}return n}function St(t,e){function n(s,r){const i=Ue(t,r,e);return A(i!==null),At(i,r,t.host,t._protocol)}return n}function H(t){function e(n,s){let r;return n.getStatus()===401?n.getErrorText().includes("Firebase App Check token is invalid")?r=Ge():r=$e():n.getStatus()===402?r=je(t.bucket):n.getStatus()===403?r=Xe(t.path):r=s,r.status=n.getStatus(),r.serverResponse=s.serverResponse,r}return e}function te(t){const e=H(t);function n(s,r){let i=e(s,r);return s.getStatus()===404&&(i=ze(t.path)),i.serverResponse=r.serverResponse,i}return n}function It(t,e,n){const s=e.fullServerUrl(),r=L(s,t.host,t._protocol),i="GET",o=t.maxOperationRetryTime,u=new C(r,i,ee(t,n),o);return u.errorHandler=te(e),u}function Nt(t,e,n){const s=e.fullServerUrl(),r=L(s,t.host,t._protocol),i="GET",o=t.maxOperationRetryTime,u=new C(r,i,St(t,n),o);return u.errorHandler=te(e),u}function Pt(t,e){const n=e.fullServerUrl(),s=L(n,t.host,t._protocol),r="DELETE",i=t.maxOperationRetryTime;function o(a,l){}const u=new C(s,r,o,i);return u.successCodes=[200,204],u.errorHandler=te(e),u}function Ct(t,e){return t&&t.contentType||e&&e.type()||"application/octet-stream"}function Ae(t,e,n){const s=Object.assign({},n);return s.fullPath=t.path,s.size=e.size(),s.contentType||(s.contentType=Ct(null,e)),s}function vt(t,e,n,s,r){const i=e.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"};function u(){let R="";for(let b=0;b<2;b++)R=R+Math.random().toString().slice(2);return R}const a=u();o["Content-Type"]="multipart/related; boundary="+a;const l=Ae(e,s,r),h=Oe(l,n),f="--"+a+`\r 258Content-Type: application/json; charset=utf-8\r 259\r 260`+h+`\r 261--`+a+`\r 262Content-Type: `+l.contentType+`\r 263\r 264`,p=`\r 265--`+a+"--",m=S.getBlob(f,s,p);if(m===null)throw pe();const g={name:l.fullPath},y=L(i,t.host,t._protocol),_="POST",U=t.maxUploadRetryTime,O=new C(y,_,ee(t,n),U);return O.urlParams=g,O.headers=o,O.body=m.uploadData(),O.errorHandler=H(e),O}class ${constructor(e,n,s,r){this.current=e,this.total=n,this.finalized=!!s,this.metadata=r||null}}function ne(t,e){let n=null;try{n=t.getResponseHeader("X-Goog-Upload-Status")}catch{A(!1)}return A(!!n&&(e||["active"]).indexOf(n)!==-1),n}function xt(t,e,n,s,r){const i=e.bucketOnlyServerUrl(),o=Ae(e,s,r),u={name:o.fullPath},a=L(i,t.host,t._protocol),l="POST",h={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${s.size()}`,"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},f=Oe(o,n),p=t.maxUploadRetryTime;function m(y){ne(y);let _;try{_=y.getResponseHeader("X-Goog-Upload-URL")}catch{A(!1)}return A(G(_)),_}const g=new C(a,l,m,p);return g.urlParams=u,g.headers=h,g.body=f,g.errorHandler=H(e),g}function Dt(t,e,n,s){const r={"X-Goog-Upload-Command":"query"};function i(l){const h=ne(l,["active","final"]);let f=null;try{f=l.getResponseHeader("X-Goog-Upload-Size-Received")}catch{A(!1)}f||A(!1);const p=Number(f);return A(!isNaN(p)),new $(p,s.size(),h==="final")}const o="POST",u=t.maxUploadRetryTime,a=new C(n,o,i,u);return a.headers=r,a.errorHandler=H(e),a}const ae=256*1024;function Lt(t,e,n,s,r,i,o,u){const a=new $(0,0);if(o?(a.current=o.current,a.total=o.total):(a.current=0,a.total=s.size()),s.size()!==a.total)throw Ze();const l=a.total-a.current;let h=l;r>0&&(h=Math.min(h,r));const f=a.current,p=f+h;let m="";h===0?m="finalize":l===h?m="upload, finalize":m="upload";const g={"X-Goog-Upload-Command":m,"X-Goog-Upload-Offset":`${a.current}`},y=s.slice(f,p);if(y===null)throw pe();function _(b,v){const x=ne(b,["active","final"]),X=a.current+h,B=s.size();let V;return x==="final"?V=ee(e,i)(b,v):V=null,new $(X,B,x==="final",V)}const U="POST",O=e.maxUploadRetryTime,R=new C(n,U,_,O);return R.headers=g,R.body=y.uploadData(),R.progressCallback=u||null,R.errorHandler=H(t),R}const w={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function Z(t){switch(t){case"running":case"pausing":case"canceling":return w.RUNNING;case"paused":return w.PAUSED;case"success":return w.SUCCESS;case"canceled":return w.CANCELED;case"error":return w.ERROR;default:return w.ERROR}}/** 266 * @license 267 * Copyright 2017 Google LLC 268 * 269 * Licensed under the Apache License, Version 2.0 (the "License");
270 * you may not use this file except in compliance with the License. 271 * You may obtain a copy of the License at 272 * 273 * http://www.apache.org/licenses/LICENSE-2.0 274 * 275 * Unless required by applicable law or agreed to in writing, software 276 * distributed under the License is distributed on an "AS IS" BASIS, 277 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 278 * See the License for the specific language governing permissions and 279 * limitations under the License. 280 */class Bt{constructor(e,n,s){if(rt(e)||n!=null||s!=null)this.next=e,this.error=n??void 0,this.complete=s??void 0;else{const i=e;this.next=i.next,this.error=i.error,this.complete=i.complete}}}/** 281 * @license 282 * Copyright 2017 Google LLC 283 * 284 * Licensed under the Apache License, Version 2.0 (the "License"); 285 * you may not use this file except in compliance with the License. 286 * You may obtain a copy of the License at 287 * 288 * http://www.apache.org/licenses/LICENSE-2.0 289 * 290 * Unless required by applicable law or agreed to in writing, software 291 * distributed under the License is distributed on an "AS IS" BASIS, 292 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 293 * See the License for the specific language governing permissions and 294 * limitations under the License. 295 */function D(t){return(...e)=>{Promise.resolve().then(()=>t(...e))}}class Mt{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=N.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=N.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=N.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,n,s,r){if(this.sent_)throw M("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,e,!0),r!==void 0)for(const i in r)r.hasOwnProperty(i)&&this.xhr_.setRequestHeader(i,r[i].toString());return s!==void 0?this.xhr_.send(s):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw M("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw M("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}}getResponse(){if(!this.sent_)throw M("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw M("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",e)}}class qt extends Mt{initXhr(){this.xhr_.responseType="text"}}function I(){return new qt}/** 296 * @license 297 * Copyright 2017 Google LLC 298 * 299 * Licensed under the Apache License, Version 2.0 (the "License"); 300 * you may not use this file except in compliance with the License. 301 * You may obtain a copy of the License at 302 * 303 * http://www.apache.org/licenses/LICENSE-2.0 304 * 305 * Unless required by applicable law or agreed to in writing, software 306 * distributed under the License is distributed on an "AS IS" BASIS, 307 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 308 * See the License for the specific language governing permissions and 309 * limitations under the License. 310 */class Ft{constructor(e,n,s=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=e,this._blob=n,this._metadata=s,this._mappings=Ee(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=r=>{if(this._request=void 0,this._chunkMultiplier=1,r._codeEquals(c.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{const i=this.isExponentialBackoffExpired();if(be(r.status,[]))if(i)r=fe();else{this.sleepTime=Math.max(this.sleepTime*2,He),this._needToFetchStatus=!0,this.completeTransitions_();return}this._error=r,this._transition("error")}},this._metadataErrorHandler=r=>{this._request=void 0,r._codeEquals(c.CANCELED)?this.completeTransitions_():(this._error=r,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((r,i)=>{this._resolve=r,this._reject=i,this._start()}),this._promise.then(null,()=>{})}isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}_makeProgressCallback(){const e=this._transferred;return n=>this._updateProgress(e+n)}_shouldDoResumable(e){return e.size()>256*1024}_start(){this._state==="running"&&this._request===void 0&&(this._resumable?this._uploadUrl===void 0?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(e){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([n,s])=>{switch(this._state){case"running":e(n,s);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused");break}})}_createResumable(){this._resolveToken((e,n)=>{const s=xt(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest
vendor: 4,399 bytes, lines 310-314
310(s,I,e,n);this._request=r,r.getPromise().then(i=>{this._request=void 0,this._uploadUrl=i,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){const e=this._uploadUrl;this._resolveToken((n,s)=>{const r=Dt(this._ref.storage,this._ref._location,e,this._blob),i=this._ref.storage._makeRequest(r,I,n,s);this._request=i,i.getPromise().then(o=>{o=o,this._request=void 0,this._updateProgress(o.current),this._needToFetchStatus=!1,o.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){const e=ae*this._chunkMultiplier,n=new $(this._transferred,this._blob.size()),s=this._uploadUrl;this._resolveToken((r,i)=>{let o;try{o=Lt(this._ref._location,this._ref.storage,s,this._blob,e,this._mappings,n,this._makeProgressCallback())}catch(a){this._error=a,this._transition("error");return}const u=this._ref.storage._makeRequest(o,I,r,i,!1);this._request=u,u.getPromise().then(a=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(a.current),a.finalized?(this._metadata=a.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){ae*this._chunkMultiplier*2<32*1024*1024&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((e,n)=>{const s=It(this._ref.storage,this._ref._location,this._mappings),r=this._ref.storage._makeRequest(s,I,e,n);this._request=r,r.getPromise().then(i=>{this._request=void 0,this._metadata=i,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((e,n)=>{const s=vt(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(s,I,e,n);this._request=r,r.getPromise().then(i=>{this._request=void 0,this._metadata=i,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(e){const n=this._transferred;this._transferred=e,this._transferred!==n&&this._notifyObservers()}_transition(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,this._request!==void 0?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":const n=this._state==="paused";this._state=e,n&&(this._notifyObservers(),this._start());break;case"paused":this._state=e,this._notifyObservers();break;case"canceled":this._error=_e(),this._state=e,this._notifyObservers();break;case"error":this._state=e,this._notifyObservers();break;case"success":this._state=e,this._notifyObservers();break}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start();break}}get snapshot(){const e=Z(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}on(e,n,s,r){const i=new Bt(n||void 0,s||void 0,r||void 0);return this._addObserver(i),()=>{this._removeObserver(i)}}then(e,n){return this._promise.then(e,n)}catch(e){return this.then(null,e)}_addObserver(e){this._observers.push(e),this._notifyObserver(e)}_removeObserver(e){const n=this._observers.indexOf(e);n!==-1&&this._observers.splice(n,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(n=>{this._notifyObserver(n)})}_finishPromise(){if(this._resolve!==void 0){let e=!0;switch(Z(this._state)){case w.SUCCESS:D(this._resolve.bind(null,this.snapshot))();break;case w.CANCELED:case w.ERROR:const n=this._reject;D(n.bind(null,this._error))();break;default:e=!1;break}e&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(e){switch(Z(this._state)){case w.RUNNING:case w.PAUSED:e.next&&D(e.next.bind(e,this.snapshot))();break;case w.SUCCESS:e.complete&&D(e.complete.bind(e))();break;case w.CANCELED:case w.ERROR:e.error&&D(e.error.bind(e,this._error))();break;default:e.error&&D(e.error.bind(e,this._error))()}}resume(){const e=this._state==="paused"||this._state==="pausing";return e&&this._transition("running"),e}pause(){const e=this._state==="running";return e&&this._transition("pausing"),e}cancel(){const e=this._state==="running"||this._state==="pausing";return e&&this._transition("canceling"),e}}/** 311 * @license 312 * Copyright 2019 Google LLC 313 * 314 * Licensed under the Apache License, Version 2.0 (the "License");
315 * you may not use this file except in compliance with the License. 316 * You may obtain a copy of the License at 317 * 318 * http://www.apache.org/licenses/LICENSE-2.0 319 * 320 * Unless required by applicable law or agreed to in writing, software 321 * distributed under the License is distributed on an "AS IS" BASIS, 322 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 323 * See the License for the specific language governing permissions and 324 * limitations under the License. 325 */class P{constructor(e,n){this._service=e,n instanceof k?this._location=n:this._location=k.makeFromUrl(n,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,n){return new P(e,n)}get root(){const e=new k(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return ye(this._location.path)}get storage(){return this._service}get parent(){const e=wt(this._location.path);if(e===null)return null;const n=new k(this._location.bucket,e);return new P(this._service,n)}_throwIfRoot(e){if(this._location.path==="")throw Qe(e)}}function Ht(t,e,n){return t._throwIfRoot("uploadBytesResumable"),new Ft(t,new S(e),n)}function zt(t){t._throwIfRoot("getDownloadURL");const e=Nt(t.storage,t._location,Ee());return t.storage.makeRequestWithTokens(e,I).then(n=>{if(n===null)throw Ye();return n})}function jt(t){t._throwIfRoot("deleteObject");const e=Pt(t.storage,t._location);return t.storage.makeRequestWithTokens(e,I)}function $t(t,e){const n=kt(t._location.path,e),s=new k(t._location.bucket,n);return new P(t.storage,s)}/** 326 * @license 327 * Copyright 2017 Google LLC 328 * 329 * Licensed under the Apache License, Version 2.0 (the "License"); 330 * you may not use this file except in compliance with the License. 331 * You may obtain a copy of the License at 332 * 333 * http://www.apache.org/licenses/LICENSE-2.0 334 * 335 * Unless required by applicable law or agreed to in writing, software 336 * distributed under the License is distributed on an "AS IS" BASIS, 337 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 338 * See the License for the specific language governing permissions and 339 * limitations under the License. 340 */function Gt(t){return/^[A-Za-z]+:\/\//.test(t)}function Xt(t,e){return new P(t,e)}function Se(t,e){if(t instanceof se){const n=t;if(n._bucket==null)throw Ke();const s=new P(n,n._bucket);return e!=null?Se(s,e):s}else return e!==void 0?$t(t,e):t}function Vt(t,e){if(e&&Gt(e)){if(t instanceof se)return Xt(t,e);throw Y("To use ref(service, url), the first argument must be a Storage instance.")}else return Se(t,e)}function ue(t,e){const n=e==null?void 0:e[de];return n==null?null:k.makeFromBucketSpec(n,t)}function Wt(t,e,n,s={}){t.host=`${e}:${n}`,t._protocol="http";const{mockUserToken:r}=s;r&&(t._overrideAuthToken=typeof r=="string"?r:Le(r,t.app.options.projectId))}class se{constructor(e,n,s,r,i){this.app=e,this._authProvider=n,this._appCheckProvider=s,this._url=r,this._firebaseVersion=i,this._bucket=null,this._host=he,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=qe,this._maxUploadRetryTime=Fe,this._requests=new Set,r!=null?this._bucket=k.makeFromBucketSpec(r,this._host):this._bucket=ue(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,this._url!=null?this._bucket=k.makeFromBucketSpec(this._url,e):this._bucket=ue(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){oe("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){oe("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;const e=this._authProvider.getImmediate({optional:!0});if(e){const n=await e.getToken();if(n!==null)return n.accessToken}return null}async _getAppCheckToken(){const e=this._appCheckProvider.getImmediate({optional:!0});return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEac
340h(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new P(this,e)}_makeRequest(e,n,s,r,i=!0){if(this._deleted)return new et(me());{const o=ht(e,this._appId,s,r,n,this._firebaseVersion,i);return this._requests.add(o),o.getPromise().then(()=>this._requests.delete(o),()=>this._requests.delete(o)),o}}async makeRequestWithTokens(e,n){const[s,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,n,s,r).getPromise()}}const le="@firebase/storage",ce="0.11.1";/** 341 * @license 342 * Copyright 2020 Google LLC 343 * 344 * Licensed under the Apache License, Version 2.0 (the "License"); 345 * you may not use this file except in compliance with the License. 346 * You may obtain a copy of the License at 347 * 348 * http://www.apache.org/licenses/LICENSE-2.0 349 * 350 * Unless required by applicable law or agreed to in writing, software 351 * distributed under the License is distributed on an "AS IS" BASIS, 352 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 353 * See the License for the specific language governing permissions and 354 * limitations under the License. 355 */const Ie="storage";function en(t,e,n){return t=F(t),Ht(t,e,n)}function tn(t){return t=F(t),zt(t)}function nn(t){return t=F(t),jt(t)}function sn(t,e){return t=F(t),Vt(t,e)}function rn(t=xe(),e){t=F(t);const s=Ce(t,Ie).getImmediate({identifier:e}),r=ve("storage");return r&&Kt(s,...r),s}function Kt(t,e,n,s={}){Wt(t,e,n,s)}function Zt(t,{instanceIdentifier:e}){const n=t.getProvider("app").getImmediate(),s=t.getProvider("auth-internal"),r=t.getProvider("app-check-internal");return new se(n,s,r,e,De)}function Yt(){Ne(new Pe(Ie,Zt,"PUBLIC").setMultipleInstances(!0)),re(le,ce,""),re(le,ce,"esm2017")}Yt();export{tn as a,Qt as c,nn as d,rn as g,sn as r,en as u};
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.